mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
Compare commits
215
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
476d72b9e3 | ||
|
|
bdc557612b | ||
|
|
1e2d850ec4 | ||
|
|
703e9a2fad | ||
|
|
4ec605fc9b | ||
|
|
061c225621 | ||
|
|
07c23f2ca4 | ||
|
|
5608fe0abb | ||
|
|
a5b8d6fcb5 | ||
|
|
390e6e124f | ||
|
|
459dd927df | ||
|
|
beb9a1b182 | ||
|
|
747a919a06 | ||
|
|
114013096e | ||
|
|
10a24f3ea1 | ||
|
|
a925846b1f | ||
|
|
fe64a4765e | ||
|
|
7293597b90 | ||
|
|
1648e88687 | ||
|
|
a6b5187d76 | ||
|
|
7da9a041b3 | ||
|
|
2b7050bdf3 | ||
|
|
4f5ed502c6 | ||
|
|
f04ee2219d | ||
|
|
6b4b99e571 | ||
|
|
7af64d1ebe | ||
|
|
2c3aeaf378 | ||
|
|
3216a3c1e3 | ||
|
|
7ef99c046c | ||
|
|
1604b9df9d | ||
|
|
fd75f0f487 | ||
|
|
99c1602fcd | ||
|
|
16c2464e24 | ||
|
|
5ecff82230 | ||
|
|
8966e775a5 | ||
|
|
3608a49541 | ||
|
|
049d9ecb3c | ||
|
|
66d623d118 | ||
|
|
3e76198aa4 | ||
|
|
fb26dfd84f | ||
|
|
6434153d8b | ||
|
|
cc0632e4f3 | ||
|
|
ff5e4b074f | ||
|
|
45c7df08f4 | ||
|
|
e6d44f7ce4 | ||
|
|
4a85530472 | ||
|
|
6c97670c23 | ||
|
|
4988ad56ad | ||
|
|
4365dce8b7 | ||
|
|
a7919897e8 | ||
|
|
9e02c677aa | ||
|
|
3c1ee41b12 | ||
|
|
63d98369c6 | ||
|
|
893099f23f | ||
|
|
5d9caa2373 | ||
|
|
8c035c2144 | ||
|
|
3683f7d2b8 | ||
|
|
91adcb5cd1 | ||
|
|
b454f5a9d0 | ||
|
|
df37100e76 | ||
|
|
7581fffa8a | ||
|
|
d53c952790 | ||
|
|
6fbdb372b8 | ||
|
|
47a3d9204d | ||
|
|
5dc37d7ee6 | ||
|
|
8b837cb9ca | ||
|
|
84bc821cdc | ||
|
|
f93add7b16 | ||
|
|
a5e772c4a1 | ||
|
|
0c44ef150f | ||
|
|
9df9494bcf | ||
|
|
216d2b2724 | ||
|
|
17ac7dcfc7 | ||
|
|
cec37277df | ||
|
|
1b250ede0a | ||
|
|
844d5d7c91 | ||
|
|
c16ec8c31a | ||
|
|
761220d914 | ||
|
|
f06da77a36 | ||
|
|
c6949d7e3d | ||
|
|
0cd93e984c | ||
|
|
d8286ce40b | ||
|
|
4b7a92e09a | ||
|
|
31bf75ed23 | ||
|
|
4f29e313aa | ||
|
|
afcf28a366 | ||
|
|
5bd33de631 | ||
|
|
a375e6a090 | ||
|
|
4db3b960c0 | ||
|
|
ad226f5d37 | ||
|
|
aef3c4c16b | ||
|
|
a2bcc639e1 | ||
|
|
c636636084 | ||
|
|
1c919ea11c | ||
|
|
4b15f9b3ee | ||
|
|
17520a8622 | ||
|
|
048d95d86d | ||
|
|
c63edc338b | ||
|
|
74e1f4cbf9 | ||
|
|
a79115dd7f | ||
|
|
d410e07d8b | ||
|
|
058d207f58 | ||
|
|
a5b77554e4 | ||
|
|
ce68c20971 | ||
|
|
edc9e70e04 | ||
|
|
ea8da188ef | ||
|
|
fe2a0a8810 | ||
|
|
7fd5a4da49 | ||
|
|
f688049114 | ||
|
|
a56786e89e | ||
|
|
675c744a7e | ||
|
|
5098258cce | ||
|
|
4ec4736af4 | ||
|
|
5debe32373 | ||
|
|
5898c9fd07 | ||
|
|
aed9c000ec | ||
|
|
ba719acaa2 | ||
|
|
dfd02351f4 | ||
|
|
4c710e041c | ||
|
|
d99e13bdea | ||
|
|
c608cf3eaf | ||
|
|
90d32a9d62 | ||
|
|
329145ee73 | ||
|
|
a48723b842 | ||
|
|
08dd9882ce | ||
|
|
16bf40461d | ||
|
|
91f98eb2c8 | ||
|
|
2629c6d8f8 | ||
|
|
972d548394 | ||
|
|
39e8153c00 | ||
|
|
0f75b36c0f | ||
|
|
ffbba36f45 | ||
|
|
567964aff5 | ||
|
|
f55e0a671c | ||
|
|
3702e62c7d | ||
|
|
41aad78a9d | ||
|
|
fc63d85a38 | ||
|
|
605f7f04fc | ||
|
|
d8e2a049fc | ||
|
|
9fd0d07cfb | ||
|
|
8c50c1a047 | ||
|
|
89867fd4ea | ||
|
|
25a7d8c97c | ||
|
|
dec365d6fd | ||
|
|
68d1fceba9 | ||
|
|
9bfdc5c38b | ||
|
|
ce79aff5be | ||
|
|
f481f794ce | ||
|
|
ed3321827e | ||
|
|
c5d9285ad3 | ||
|
|
d707d745a6 | ||
|
|
d0294cf582 | ||
|
|
3b576e58c7 | ||
|
|
2878c33dfe | ||
|
|
1398a3d33a | ||
|
|
6bed4fc2ff | ||
|
|
f74dc9a395 | ||
|
|
b2987f714b | ||
|
|
b869c961ce | ||
|
|
3379668399 | ||
|
|
a49a3ea553 | ||
|
|
71e0854e2a | ||
|
|
9d1153af22 | ||
|
|
6091b8f209 | ||
|
|
7fcdd9f318 | ||
|
|
5c36c00915 | ||
|
|
a099adcbce | ||
|
|
70732b33a8 | ||
|
|
d68b18c9c2 | ||
|
|
02311a91c1 | ||
|
|
0d00315b97 | ||
|
|
f73b774483 | ||
|
|
507c4d8c99 | ||
|
|
b60c60f2ab | ||
|
|
c15b300298 | ||
|
|
6752005e64 | ||
|
|
a2424f031e | ||
|
|
1517a02c09 | ||
|
|
c7a57444dc | ||
|
|
7cf9bf95d4 | ||
|
|
1477c73eba | ||
|
|
897621178b | ||
|
|
f85685911c | ||
|
|
7490bdd567 | ||
|
|
23bac8c6e6 | ||
|
|
e1ebf711eb | ||
|
|
46f7a64e38 | ||
|
|
a020195ec7 | ||
|
|
43f00b12ad | ||
|
|
e126d67a6e | ||
|
|
0ef4a3b0d9 | ||
|
|
9a5bddb57d | ||
|
|
05e324bce7 | ||
|
|
b96e503690 | ||
|
|
c2c9c2e012 | ||
|
|
547b34f0ed | ||
|
|
63a2ab73ed | ||
|
|
ddef564e34 | ||
|
|
fed776b886 | ||
|
|
23b831032a | ||
|
|
2efb7058f5 | ||
|
|
efddb9595c | ||
|
|
c84d913f41 | ||
|
|
a59e941662 | ||
|
|
b33f230a80 | ||
|
|
a2ffc3d3d5 | ||
|
|
8cfcd89a7a | ||
|
|
f1fda814c2 | ||
|
|
8ec87bbaec | ||
|
|
1e6cd29e60 | ||
|
|
829949df54 | ||
|
|
c28e96bda1 | ||
|
|
989433530a | ||
|
|
03bdf62922 | ||
|
|
da1fa28109 |
No files matched your search
+5
-47
@@ -1,60 +1,18 @@
|
||||
|
||||
Mono uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the Mono software.
|
||||
distributed under licenses different than the .NET Core software.
|
||||
|
||||
Attributions and license notices for test cases originally authored by
|
||||
Attributions and license notices for test cases originally authored by
|
||||
third parties can be found in the respective test directories.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
[email protected]
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for Mono
|
||||
-----------------------
|
||||
|
||||
Note: multiple license notices are provided that occure in source code.
|
||||
They are equivalent forms of the the MIT license from various copyright holders.
|
||||
|
||||
// Dual licensed under the terms of the MIT X11 or GNU GPL
|
||||
// Copyright 2003-2011 Novell, Inc.
|
||||
// Copyright 2011 Xamarin Inc
|
||||
|
||||
/**
|
||||
*
|
||||
* Copyright 2001-2003 Ximian, Inc
|
||||
* Copyright 2003-2010 Novell, Inc.
|
||||
* Copyright (C) 2012 Xamarin Inc
|
||||
*
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* The MIT License
|
||||
* Copyright (c) 2003 Novell Inc. www.novell.com
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the Software), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS 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 Apple
|
||||
|
||||
License notice for Apple
|
||||
-------------------------
|
||||
Content: https://github.com/mono/mono/blob/435f968102d0820ca65d63e1e741e4130b4d1303/support/ios/net/route.h
|
||||
License: https://opensource.apple.com/apsl/
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"name": "roslyn",
|
||||
"url": "git://github.com/mono/roslyn.git",
|
||||
"rev": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
|
||||
"rev": "13a40eedacc799a78710aba5c8e4b2dcc80a7e61",
|
||||
"remote-branch": "origin/mono-testing",
|
||||
"branch": "mono-testing",
|
||||
"directory": "roslyn"
|
||||
|
||||
+10
-4
@@ -4,7 +4,7 @@
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
AC_INIT(mono, [6.5.0],
|
||||
AC_INIT(mono, [6.4.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -2646,6 +2646,8 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_FUNCS(pthread_attr_setstacksize)
|
||||
AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
|
||||
AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
|
||||
dnl check that pthread_mutexattr_setprotocol is declared
|
||||
AC_CHECK_DECLS([pthread_mutexattr_setprotocol], [], [], [[#include <pthread.h>]])
|
||||
AC_CHECK_FUNCS(mincore mlock munlock)
|
||||
|
||||
dnl ***********************************
|
||||
@@ -5865,8 +5867,8 @@ fi
|
||||
AC_SUBST(mono_runtime)
|
||||
AC_SUBST(mono_runtime_wrapper)
|
||||
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.1.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.1.0/VBCSCompiler.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.1/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.1/VBCSCompiler.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -6110,6 +6112,10 @@ elif test x$target_osx = xyes; then
|
||||
MONO_NATIVE_PLATFORM=macos
|
||||
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_MACOS"
|
||||
|
||||
if test x$enable_gss = xyes; then
|
||||
MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -framework GSS"
|
||||
fi
|
||||
|
||||
AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer],
|
||||
[!(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12)])
|
||||
|
||||
@@ -6759,5 +6765,5 @@ echo "
|
||||
$disabled
|
||||
"
|
||||
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
|
||||
AC_MSG_WARN(Turning off static Mono is a risk, you might run into unexpected bugs)
|
||||
AC_MSG_WARN([Turning off static Mono is a risk, you might run into unexpected bugs])
|
||||
fi
|
||||
@@ -3,13 +3,13 @@
|
||||
<ProductDependencies>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19302.2">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19279.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>e6a5d5f970bb872451c6310ae34eda31041fb552</Sha>
|
||||
<Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19302.2">
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19279.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>e6a5d5f970bb872451c6310ae34eda31041fb552</Sha>
|
||||
<Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
@@ -1,146 +0,0 @@
|
||||
# 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
|
||||
}
|
||||
@@ -133,8 +133,9 @@ try {
|
||||
Build
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTaskError -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
+22
-81
@@ -92,68 +92,6 @@ 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
|
||||
@@ -196,7 +134,7 @@ function InitializeDotNetCli([bool]$install) {
|
||||
if ($install) {
|
||||
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
||||
} else {
|
||||
Write-PipelineTaskError "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||
Write-Host "Unable to find dotnet with SDK version '$dotnetSdkVersion'" -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
@@ -209,10 +147,12 @@ function InitializeDotNetCli([bool]$install) {
|
||||
# It also ensures that VS msbuild will use the downloaded sdk targets.
|
||||
$env:PATH = "$dotnetRoot;$env:PATH"
|
||||
|
||||
# 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'
|
||||
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"
|
||||
}
|
||||
|
||||
return $global:_DotNetInstallDir = $dotnetRoot
|
||||
}
|
||||
@@ -244,7 +184,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
|
||||
|
||||
& $installScript @installParameters
|
||||
if ($lastExitCode -ne 0) {
|
||||
Write-PipelineTaskError -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
|
||||
Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red
|
||||
ExitWithExitCode $lastExitCode
|
||||
}
|
||||
}
|
||||
@@ -418,7 +358,7 @@ function InitializeBuildTool() {
|
||||
|
||||
if ($msbuildEngine -eq "dotnet") {
|
||||
if (!$dotnetRoot) {
|
||||
Write-PipelineTaskError "/global.json must specify 'tools.dotnet'."
|
||||
Write-Host "/global.json must specify 'tools.dotnet'." -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -427,13 +367,13 @@ function InitializeBuildTool() {
|
||||
try {
|
||||
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
|
||||
} catch {
|
||||
Write-PipelineTaskError $_
|
||||
Write-Host $_ -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
|
||||
} else {
|
||||
Write-PipelineTaskError "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
||||
Write-Host "Unexpected value of -msbuildEngine: '$msbuildEngine'." -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -450,7 +390,7 @@ function GetDefaultMSBuildEngine() {
|
||||
return "dotnet"
|
||||
}
|
||||
|
||||
Write-PipelineTaskError "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
||||
Write-Host "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -501,7 +441,7 @@ function InitializeToolset() {
|
||||
}
|
||||
|
||||
if (-not $restore) {
|
||||
Write-PipelineTaskError "Toolset version $toolsetVersion has not been restored."
|
||||
Write-Host "Toolset version $toolsetVersion has not been restored." -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -586,7 +526,7 @@ function MSBuild-Core() {
|
||||
$exitCode = Exec-Process $buildTool.Path $cmdArgs
|
||||
|
||||
if ($exitCode -ne 0) {
|
||||
Write-PipelineTaskError "Build failed."
|
||||
Write-Host "Build failed." -ForegroundColor Red
|
||||
|
||||
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
|
||||
if ($buildLog -ne $null) {
|
||||
@@ -614,8 +554,6 @@ 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"
|
||||
@@ -631,8 +569,11 @@ Create-Directory $ToolsetDir
|
||||
Create-Directory $TempDir
|
||||
Create-Directory $LogDir
|
||||
|
||||
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
|
||||
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
|
||||
}
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 56249f9f34...45048758b1.
Vendored
+1
-1
Submodule external/bockbuild updated: ea42169ff7...48ac8f41d6.
Vendored
+1
-1
Submodule external/corefx updated: eb203dc4a8...b11584abdd.
Vendored
+1
-1
Submodule external/ikvm updated: 847e05fced...caa8e7f542.
Vendored
+1
-1
Submodule external/linker updated: 15b5a5f682...ebe2a1f4b9.
Vendored
+1
-1
Submodule external/llvm updated: 64c0343537...29f36fd315.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: dcf1fe8981...ce5594e229.
+2
-2
@@ -3,7 +3,7 @@
|
||||
"dotnet": "3.0.100-preview5-011568"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19302.2",
|
||||
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19302.2"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19279.5",
|
||||
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19279.5"
|
||||
}
|
||||
}
|
||||
+20
-17
@@ -1179,23 +1179,26 @@ If set, tells mono to attempt using native asynchronous I/O services. If not
|
||||
set, a default select/poll implementation is used. Currently epoll and kqueue
|
||||
are supported.
|
||||
.TP
|
||||
\fBMONO_THREADS_SUSPEND\fR
|
||||
Selects a mechanism that Mono will use to suspend threads. May be set to
|
||||
"preemptive", "coop", or "hybrid". Threads may need to be suspended by the
|
||||
debugger, or using some .NET threading APIs, and most commonly when the SGen
|
||||
garbage collector needs to stop all threads during a critical phase of garbage
|
||||
collection. Preemptive mode is the mode that Mono has used historically, going
|
||||
back to the Boehm days, where the garbage collector would run at any point and
|
||||
suspend execution of all threads as required to perform a garbage collection.
|
||||
The cooperative mode on the other hand requires the cooperation of all threads
|
||||
to stop at a safe point. This makes for an easier to debug garbage collector.
|
||||
As of Mono 4.3.0 it is a work in progress, and while it works, it has not been
|
||||
used extensively. This option enables the feature and allows us to find spots
|
||||
that need to be tuned for this mode of operation. Hybrid mode is a combination
|
||||
of the two that retains better compatability with scenarios where Mono is
|
||||
embedded in another application: threads that are running managed code or code
|
||||
that comprises the Mono runtime will be cooperatively suspended, while threads
|
||||
running embedder code will be preemptively suspended.
|
||||
\fBMONO_THREADS_SUSPEND\fR Selects a mechanism that Mono will use to suspend
|
||||
threads. May be set to "preemptive", "coop", or "hybrid". Threads may need to
|
||||
be suspended by the debugger, or using some .NET threading APIs, and most
|
||||
commonly when the SGen garbage collector needs to stop all threads during a
|
||||
critical phase of garbage collection. Preemptive mode is the mode that Mono
|
||||
has used historically, going back to the Boehm days, where the garbage
|
||||
collector would run at any point and suspend execution of all threads as
|
||||
required to perform a garbage collection. The cooperative mode on the other
|
||||
hand requires the cooperation of all threads to stop at a safe point. This
|
||||
makes for an easier to debug garbage collector and it improves the stability of
|
||||
the runtime because threads are not suspended when accessing critical
|
||||
resources. In scenarios where Mono is embedded in another application,
|
||||
cooperative suspend requires the embedder code to follow coding guidelines in
|
||||
order to cooperate with the garbage collector. Cooperative suspend in embedded
|
||||
Mono is currently experimental. Hybrid mode is a combination of the two that
|
||||
retains better compatability with scenarios where Mono is embedded in another
|
||||
application: threads that are running managed code or code that comprises the
|
||||
Mono runtime will be cooperatively suspended, while threads running embedder
|
||||
code will be preemptively suspended. Hybrid suspend is the default on some
|
||||
desktop platforms.
|
||||
|
||||
Alternatively, coop and hybrid mode can be enabled at compile time by using the
|
||||
--enable-cooperative-suspend or --enable-hybrid-suspend flags, respectively,
|
||||
|
||||
@@ -14,3 +14,5 @@ MONO_FEATURE_APPLETLS=
|
||||
ONLY_APPLETLS=
|
||||
MONO_FEATURE_APPLE_X509=1
|
||||
NO_VTS_TEST=1
|
||||
|
||||
PROFILE_TEST_HARNESS_EXCLUDES += BitcodeNotSupported
|
||||
@@ -39,4 +39,4 @@ PROFILE_DISABLE_BTLS=1
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
ONLY_APPLETLS=1
|
||||
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess
|
||||
@@ -24,3 +24,5 @@ PROFILE_DISABLE_BTLS=1
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
ONLY_APPLETLS=1
|
||||
ENABLE_GSS=1
|
||||
|
||||
PROFILE_TEST_HARNESS_EXCLUDES += InetAccess
|
||||
@@ -41,19 +41,15 @@ $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnos
|
||||
$(topdir)/../external/corefx/src/Common/src/System/PasteArguments.cs \
|
||||
$(topdir)/../external/corefx/src/Common/src/System/PasteArguments.Unix.cs
|
||||
|
||||
ifeq ($(PROFILE),monodroid)
|
||||
ifdef MOBILE_PROFILE
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
|
||||
else
|
||||
ifeq ($(PROFILE),monotouch_tv)
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
|
||||
else
|
||||
ifeq ($(PROFILE),monotouch_watch)
|
||||
ifeq ($(PROFILE), xammac_net_4_5)
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
|
||||
else
|
||||
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # ($(USE_XTEST_REMOTE_EXECUTOR), YES)
|
||||
|
||||
@@ -132,7 +128,7 @@ $(test_nunit_dep): $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
@if test -f $@; then :; else rm -f $<; $(MAKE) $<; fi
|
||||
|
||||
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
|
||||
cd ${topdir}/tools/nunit-lite && $(MAKE)
|
||||
$(MAKE) -C ${topdir}/tools/nunit-lite
|
||||
echo "stamp" >$@
|
||||
|
||||
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
@@ -382,5 +378,3 @@ $(xtest_makefrag): $(xtest_response)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: patch-nunitlite-appconfig
|
||||
@@ -38,7 +38,7 @@ doc-update-recursive:
|
||||
@echo "do not recurse the Facades folder"
|
||||
|
||||
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Numerics.Vectors System.Runtime.Serialization System.Transactions System.Xml \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.Data.DataSetExtensions System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess System.IO.Compression System.IdentityModel System.Web \
|
||||
Facades/System.Drawing.Primitives Facades/System.Drawing.Common System.Drawing System.Web.Services:
|
||||
|
||||
|
||||
@@ -29,67 +29,67 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full_interp/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_hybrid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
|
||||
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;WIN_PLATFORM;WINAOT</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;WIN_PLATFORM;WINAOT;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../../class/lib/xammac/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../../class/lib/xammac_net_4_5/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN</DefineConstants>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../../class/lib/orbis/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
|
||||
<OutputPath>./../../../class/lib/unreal/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
|
||||
<OutputPath>./../../../class/lib/wasm/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
||||
@@ -13,7 +13,7 @@ KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS) -d:FEATURE_TYPECONVERTER
|
||||
|
||||
ifneq (,$(filter build net_4_x, $(PROFILE)))
|
||||
$(error This profile shouldn't build System.Drawing.Common.dll, it already has System.Drawing.dll)
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
|
||||
[assembly: AssemblyCompany ("Mono development team")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
|
||||
[assembly: AssemblyVersion ("2.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion ("2.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("2.0.0.0")]
|
||||
[assembly: AssemblyVersion ("2.1.0.0")]
|
||||
[assembly: AssemblyInformationalVersion ("2.1.0.0")]
|
||||
[assembly: AssemblyFileVersion ("2.1.0.0")]
|
||||
@@ -113,6 +113,7 @@
|
||||
<!--Common files-->
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Stubs.cs" />
|
||||
<Compile Include="TypeForwarders.cs" />
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
@@ -169,6 +170,7 @@
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
<ProjectReference Include="../../System.Web/System.Web.csproj" />
|
||||
<ProjectReference Include="../../System.Drawing/System.Drawing.csproj" />
|
||||
<ProjectReference Include="../../System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<ProjectReference Include="../../System.Web.Services/System.Web.Services.csproj" />
|
||||
|
||||
@@ -39,6 +39,10 @@ else
|
||||
LIB_REFS += Facades/System.Drawing.Common
|
||||
endif
|
||||
|
||||
ifeq ($(PROFILE),net_4_x)
|
||||
LIB_REFS += System.Data.DataSetExtensions
|
||||
endif
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
@@ -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.
|
||||
|
||||
#if MOBILE || XAMMAC_4_5
|
||||
namespace System.Data
|
||||
{
|
||||
public static partial class DataRowComparer
|
||||
{
|
||||
public static System.Data.DataRowComparer<System.Data.DataRow> Default { get => throw new PlatformNotSupportedException(); }
|
||||
}
|
||||
public sealed partial class DataRowComparer<TRow> : System.Collections.Generic.IEqualityComparer<TRow> where TRow : System.Data.DataRow
|
||||
{
|
||||
internal DataRowComparer() { }
|
||||
public static System.Data.DataRowComparer<TRow> Default { get => throw new PlatformNotSupportedException(); }
|
||||
public bool Equals(TRow leftRow, TRow rightRow) => throw new PlatformNotSupportedException();
|
||||
public int GetHashCode(TRow row) => throw new PlatformNotSupportedException();
|
||||
}
|
||||
public static partial class DataRowExtensions
|
||||
{
|
||||
public static T Field<T>(this System.Data.DataRow row, System.Data.DataColumn column) => throw new PlatformNotSupportedException();
|
||||
public static T Field<T>(this System.Data.DataRow row, System.Data.DataColumn column, System.Data.DataRowVersion version) => throw new PlatformNotSupportedException();
|
||||
public static T Field<T>(this System.Data.DataRow row, int columnIndex) => throw new PlatformNotSupportedException();
|
||||
public static T Field<T>(this System.Data.DataRow row, int columnIndex, System.Data.DataRowVersion version) => throw new PlatformNotSupportedException();
|
||||
public static T Field<T>(this System.Data.DataRow row, string columnName) => throw new PlatformNotSupportedException();
|
||||
public static T Field<T>(this System.Data.DataRow row, string columnName, System.Data.DataRowVersion version) => throw new PlatformNotSupportedException();
|
||||
public static void SetField<T>(this System.Data.DataRow row, System.Data.DataColumn column, T value) { }
|
||||
public static void SetField<T>(this System.Data.DataRow row, int columnIndex, T value) { }
|
||||
public static void SetField<T>(this System.Data.DataRow row, string columnName, T value) { }
|
||||
}
|
||||
public static partial class DataTableExtensions
|
||||
{
|
||||
public static System.Data.DataView AsDataView(this System.Data.DataTable table) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.DataView AsDataView<T>(this System.Data.EnumerableRowCollection<T> source) where T : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.EnumerableRowCollection<System.Data.DataRow> AsEnumerable(this System.Data.DataTable source) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.DataTable CopyToDataTable<T>(this System.Collections.Generic.IEnumerable<T> source) where T : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static void CopyToDataTable<T>(this System.Collections.Generic.IEnumerable<T> source, System.Data.DataTable table, System.Data.LoadOption options) where T : System.Data.DataRow { }
|
||||
public static void CopyToDataTable<T>(this System.Collections.Generic.IEnumerable<T> source, System.Data.DataTable table, System.Data.LoadOption options, System.Data.FillErrorEventHandler errorHandler) where T : System.Data.DataRow { }
|
||||
}
|
||||
public abstract partial class EnumerableRowCollection : System.Collections.IEnumerable
|
||||
{
|
||||
internal EnumerableRowCollection() { }
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw new PlatformNotSupportedException();
|
||||
}
|
||||
public static partial class EnumerableRowCollectionExtensions
|
||||
{
|
||||
public static System.Data.EnumerableRowCollection<TResult> Cast<TResult>(this System.Data.EnumerableRowCollection source) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this System.Data.EnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this System.Data.EnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this System.Data.EnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this System.Data.EnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.EnumerableRowCollection<S> Select<TRow, S>(this System.Data.EnumerableRowCollection<TRow> source, System.Func<TRow, S> selector) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenByDescending<TRow, TKey>(this System.Data.OrderedEnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenByDescending<TRow, TKey>(this System.Data.OrderedEnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenBy<TRow, TKey>(this System.Data.OrderedEnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenBy<TRow, TKey>(this System.Data.OrderedEnumerableRowCollection<TRow> source, System.Func<TRow, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) => throw new PlatformNotSupportedException();
|
||||
public static System.Data.EnumerableRowCollection<TRow> Where<TRow>(this System.Data.EnumerableRowCollection<TRow> source, System.Func<TRow, bool> predicate) => throw new PlatformNotSupportedException();
|
||||
}
|
||||
public partial class EnumerableRowCollection<TRow> : System.Data.EnumerableRowCollection, System.Collections.Generic.IEnumerable<TRow>, System.Collections.IEnumerable
|
||||
{
|
||||
internal EnumerableRowCollection() { }
|
||||
public System.Collections.Generic.IEnumerator<TRow> GetEnumerator() => throw new PlatformNotSupportedException();
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw new PlatformNotSupportedException();
|
||||
}
|
||||
public sealed partial class OrderedEnumerableRowCollection<TRow> : System.Data.EnumerableRowCollection<TRow>
|
||||
{
|
||||
internal OrderedEnumerableRowCollection() { }
|
||||
}
|
||||
public static partial class TypedTableBaseExtensions
|
||||
{
|
||||
public static System.Data.EnumerableRowCollection<TRow> AsEnumerable<TRow>(this System.Data.TypedTableBase<TRow> source) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static TRow ElementAtOrDefault<TRow>(this System.Data.TypedTableBase<TRow> source, int index) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this System.Data.TypedTableBase<TRow> source, System.Func<TRow, TKey> keySelector) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this System.Data.TypedTableBase<TRow> source, System.Func<TRow, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this System.Data.TypedTableBase<TRow> source, System.Func<TRow, TKey> keySelector) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this System.Data.TypedTableBase<TRow> source, System.Func<TRow, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.EnumerableRowCollection<S> Select<TRow, S>(this System.Data.TypedTableBase<TRow> source, System.Func<TRow, S> selector) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
public static System.Data.EnumerableRowCollection<TRow> Where<TRow>(this System.Data.TypedTableBase<TRow> source, System.Func<TRow, bool> predicate) where TRow : System.Data.DataRow => throw new PlatformNotSupportedException();
|
||||
}
|
||||
public abstract partial class TypedTableBase<T> : System.Data.DataTable, System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable where T : System.Data.DataRow
|
||||
{
|
||||
protected TypedTableBase() { }
|
||||
protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
|
||||
public System.Data.EnumerableRowCollection<TResult> Cast<TResult>() => throw new PlatformNotSupportedException();
|
||||
public System.Collections.Generic.IEnumerator<T> GetEnumerator() => throw new PlatformNotSupportedException();
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -764,6 +764,18 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlTypeException))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlXml))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.StorageState))]
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[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))]
|
||||
#endif
|
||||
#endif
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.BooleanSwitch))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.ConditionalAttribute))]
|
||||
@@ -821,6 +833,15 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.TraceSwitch))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.SuppressMessageAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.AllowNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DisallowNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.MaybeNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullWhenAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.Contract))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractAbbreviatorAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractArgumentValidatorAttribute))]
|
||||
@@ -1482,6 +1503,7 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.DisablePrivateReflectionAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.DiscardableAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.DynamicAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.EnumeratorCancellationAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ExtensionAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.FixedAddressValueTypeAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.FixedBufferAttribute))]
|
||||
@@ -2424,6 +2446,9 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlySpan<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Span<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ArrayPool<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ArrayBufferWriter<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SequenceReader<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SequenceReaderExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.BuffersExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IBufferWriter<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IMemoryOwner<>))]
|
||||
@@ -2443,8 +2468,13 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Parser))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.CollectionExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyValuePair))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.DiagnosticCounter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.EventSourceCreatedEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.IncrementingEventCounter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.IncrementingPollingCounter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.PollingCounter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.KnownColor))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataReaderExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbProviderFactories))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.ColorConverter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.PointConverter))]
|
||||
@@ -2507,6 +2537,7 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Emit.SignatureToken))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Emit.StringToken))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Emit.TypeToken))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.AmbiguousImplementationException))]
|
||||
[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<>))]
|
||||
@@ -2533,8 +2564,12 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.TypeLibVersionAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.Formatters.IFieldInfo))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SequencePosition))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesCcm))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesGcm))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CryptographicOperations))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDiffieHellman))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.PbeParameters))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.PbeEncryptionAlgorithm))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Serialization.SchemaImporter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.CertificateRequest))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.DSACertificateExtensions))]
|
||||
@@ -2546,4 +2581,5 @@
|
||||
[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.TaskAsyncEnumerableExtensions))]
|
||||
#endif
|
||||
@@ -1,11 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Cloned and Build location of https://github.com/dotnet/standard
|
||||
STANDARD=/Users/cloned-location-of/dotnet/standard
|
||||
# https://github.com/dotnet/standard
|
||||
STANDARD_REPO=/path/to/standard
|
||||
|
||||
# Microsoft.DotNet.ApiCompat.exe can be built in https://github.com/dotnet/arcade
|
||||
APICOMPAT=Microsoft.DotNet.ApiCompat.exe
|
||||
NSAPI=$(STANDARD)/artifacts/bin/ref/netstandard/Debug/netstandard.dll
|
||||
# https://github.com/dotnet/arcade
|
||||
ARCARDE_REPO=/path/to/arcade
|
||||
|
||||
dotnet $APICOMPAT $NSAPI --impl-dirs "../../lib/net_4_x/Facades/,../../lib/net_4_x/" --exclude-non-browsable
|
||||
# --exclude-non-browsable ignores `EditorBrowsableAttribute` issues
|
||||
APICOMPAT=$ARCARDE_REPO/artifacts/bin/Microsoft.DotNet.ApiCompat/Debug/net472/Microsoft.DotNet.ApiCompat.exe
|
||||
NSAPI=$STANDARD_REPO/artifacts/bin/ref/netstandard/Debug/netstandard.dll
|
||||
|
||||
# uncomment to run only for net_4_x:
|
||||
# mono $APICOMPAT $NSAPI --impl-dirs "../../lib/net_4_x/Facades/,../../lib/net_4_x/" --exclude-non-browsable > ns21_diff_net_4_x.txt
|
||||
|
||||
# run ApiCompat for all profiles (runtime should be built with `--runtime-preset=all` flag)
|
||||
for profile in net_4_x monodroid monotouch monotouch_watch testing_aot_full_interp testing_aot_full testing_aot_hybrid unreal wasm winaot xammac xammac_net_4_5; do
|
||||
profile_path=../../lib/$profile
|
||||
if [ -d "$profile_path" ]; then
|
||||
echo "checking $(basename $profile_path) ..."
|
||||
mono $APICOMPAT $NSAPI --impl-dirs "$profile_path/Facades/,$profile_path/" --exclude-non-browsable > ns21_diff_$(basename $profile_path).txt
|
||||
fi
|
||||
done
|
||||
@@ -1,2 +1,3 @@
|
||||
Stubs.cs
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
@@ -1,33 +0,0 @@
|
||||
Mono uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the Mono software.
|
||||
|
||||
Attributions and license notices for test cases originally authored by
|
||||
third parties can be found in the respective test directories.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
[email protected]
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
Southern Storm Software, Pty Ltd
|
||||
--------------------------------
|
||||
|
||||
# Copyright (C) 2002 Southern Storm Software, Pty Ltd.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Use: https://github.com/mono/mono/blob/0f9bb15622b649db81974057f66669674ea47923/mcs/class/I18N/tools/cvt.sh
|
||||
@@ -117,6 +117,7 @@ monodroid_dirs_parallel := \
|
||||
|
||||
monodroid_tools_dirs_parallel := \
|
||||
Mono.Cecil \
|
||||
Mono.Cecil.Mdb \
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
ICSharpCode.SharpZipLib \
|
||||
monodoc \
|
||||
|
||||
@@ -30,6 +30,11 @@
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CECIL</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid_tools' ">
|
||||
<OutputPath>./../../class/lib/monodroid_tools</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monodroid_tools</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_6;MONO;MONODROID_TOOLS;WIN_PLATFORM;CECIL</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -58,12 +63,25 @@
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
<!-- @COMMON_PROJECT_REFERENCES@ -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../Mono.Cecil/Mono.Cecil.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
<ProjectReference Include="../System/System.csproj" />
|
||||
<ProjectReference Include="../Mono.Cecil/Mono.Cecil.csproj" />
|
||||
<ProjectReference Include="../corlib/corlib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'monodroid_tools' ">
|
||||
<Reference Include="./../../../external/binary-reference-assemblies/v4.6/System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>./../../../external/binary-reference-assemblies/v4.6/System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="./../../../external/binary-reference-assemblies/v4.6/mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>./../../../external/binary-reference-assemblies/v4.6/mscorlib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<!-- @ALL_REFERENCES@ -->
|
||||
<!-- @ALL_RESOURCES@ -->
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -150,8 +150,8 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
|
||||
public void Detach () {
|
||||
conn.VM_Dispose ();
|
||||
conn.Close ();
|
||||
conn.VM_Dispose ();
|
||||
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -414,6 +414,14 @@ public class Tests : TestsBase, ITest2
|
||||
unhandled_exception ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-wrapper") {
|
||||
unhandled_exception_wrapper ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-perform-wait-callback") {
|
||||
unhandled_exception_perform_wait_callback ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-endinvoke") {
|
||||
unhandled_exception_endinvoke ();
|
||||
return 0;
|
||||
@@ -1483,10 +1491,32 @@ public class Tests : TestsBase, ITest2
|
||||
Thread.Sleep (10000);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_wrapper () {
|
||||
throw new ArgumentException("test");
|
||||
}
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_endinvoke_2 () {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_perform_wait_callback () {
|
||||
try
|
||||
{
|
||||
var results = ResolveAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
catch (SocketException sockEx)
|
||||
{
|
||||
//Console.WriteLine("correctly handled");
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<List<string>> ResolveAsync()
|
||||
{
|
||||
var addresses = await System.Net.Dns.GetHostAddressesAsync("foo.bar.baz");
|
||||
return new List<string>(addresses.Select(addr => addr.ToString()));
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_endinvoke () {
|
||||
Action action = new Action (() =>
|
||||
|
||||
@@ -4246,6 +4246,41 @@ public class DebuggerTests
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UnhandledException3 () {
|
||||
vm.Exit (0);
|
||||
|
||||
Start (dtest_app_path, "unhandled-exception-wrapper");
|
||||
|
||||
var req = vm.CreateExceptionRequest (null, false, true);
|
||||
req.Enable ();
|
||||
|
||||
var e = run_until ("unhandled_exception_wrapper");
|
||||
vm.Resume ();
|
||||
|
||||
var e2 = GetNextEvent ();
|
||||
Assert.IsTrue (e2 is ExceptionEvent);
|
||||
vm.Exit (0);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UnhandledException4 () {
|
||||
vm.Exit (0);
|
||||
|
||||
Start (dtest_app_path, "unhandled-exception-perform-wait-callback");
|
||||
|
||||
var req = vm.CreateExceptionRequest (null, false, true);
|
||||
req.Enable ();
|
||||
|
||||
var e = run_until ("unhandled_exception_perform_wait_callback");
|
||||
vm.Resume ();
|
||||
|
||||
var e2 = GetNextEvent ();
|
||||
Assert.IsTrue (e2 is VMDeathEvent);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GCWhileSuspended () {
|
||||
// Check that objects are kept alive during suspensions
|
||||
|
||||
+11
-6
@@ -30,7 +30,7 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
{
|
||||
public static class RSACertificateExtensions
|
||||
{
|
||||
public static RSA GetRSAPrivateKey(this X509Certificate2 certificate)
|
||||
public static RSA GetRSAPrivateKey (this X509Certificate2 certificate)
|
||||
{
|
||||
if (certificate == null)
|
||||
throw new ArgumentNullException (nameof (certificate));
|
||||
@@ -41,16 +41,21 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
return certificate.Impl.GetRSAPrivateKey ();
|
||||
}
|
||||
|
||||
public static RSA GetRSAPublicKey(this X509Certificate2 certificate)
|
||||
public static RSA GetRSAPublicKey (this X509Certificate2 certificate)
|
||||
{
|
||||
if (certificate == null)
|
||||
throw new ArgumentNullException("certificate");
|
||||
throw new ArgumentNullException (nameof (certificate));
|
||||
return certificate.PublicKey.Key as RSA;
|
||||
}
|
||||
|
||||
public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certificate, RSA privateKey)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
public static X509Certificate2 CopyWithPrivateKey (this X509Certificate2 certificate, RSA privateKey)
|
||||
{
|
||||
if (certificate == null)
|
||||
throw new ArgumentNullException (nameof (certificate));
|
||||
if (privateKey == null)
|
||||
throw new ArgumentNullException (nameof (privateKey));
|
||||
var impl = certificate.Impl.CopyWithPrivateKey (privateKey);
|
||||
return (X509Certificate2)impl.CreateCertificate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1,7 @@
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs
|
||||
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CreateClient.cs
|
||||
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CreateServer.cs
|
||||
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Read.cs
|
||||
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs
|
||||
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Write.cs
|
||||
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTestBase.cs
|
||||
@@ -520,6 +520,7 @@
|
||||
<Compile Include="Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="System.Data.SqlClient\SQLDebugging.cs" />
|
||||
<Compile Include="System.Data.SqlClient\SqlCredential.cs" />
|
||||
<Compile Include="corefx\DataReaderExtensions.cs" />
|
||||
<Compile Include="corefx\DbConnectionOptions.cs" />
|
||||
<Compile Include="corefx\DbProviderFactories.mobile.cs" />
|
||||
<Compile Include="corefx\DiagnosticListener.cs" />
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
Mono uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the Mono software.
|
||||
|
||||
Attributions and license notices for test cases originally authored by
|
||||
third parties can be found in the respective test directories.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
[email protected]
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for Daniel Morgan
|
||||
--------------------------------
|
||||
|
||||
// Copyright (C) Daniel Morgan, 2003
|
||||
|
||||
Use: https://github.com/mono/mono/blob/cd51491631380ed56723fdfc66945213f9864b5a/mcs/class/System.Data/Test/TestSqlConnection.cs
|
||||
|
||||
License notice for Gonzalo Paniagua Javier, Daniel Morgan and Tim Coleman
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
* Copyright (C) 2002 Gonzalo Paniagua Javier
|
||||
* Copyright (C) 2002 Daniel Morgan
|
||||
*
|
||||
* ORIGINAL AUTHOR:
|
||||
* Gonzalo Paniagua Javier <[email protected]>
|
||||
* PORTING FROM C TO C# AUTHOR:
|
||||
* Daniel Morgan <[email protected]>
|
||||
*
|
||||
* Permission was given from the original author, Gonzalo Paniagua Javier,
|
||||
* to port and include his original work in Mono.
|
||||
*
|
||||
* The original work falls under the LGPL, but the port to C# falls
|
||||
* under the X11 license.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; see the file COPYING. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
|
||||
Use: https://github.com/mono/mono/blob/cd51491631380ed56723fdfc66945213f9864b5a/mcs/class/System.Data/Test/PostgresTest.cs
|
||||
|
||||
* Copyright (C) 2002 Gonzalo Paniagua Javier
|
||||
* Copyright (C) 2002 Daniel Morgan
|
||||
* Copyright (C) 2002 Tim Coleman
|
||||
*
|
||||
* ORIGINAL AUTHOR:
|
||||
* Gonzalo Paniagua Javier <[email protected]>
|
||||
* PORTING FROM C TO C# AUTHOR:
|
||||
* Daniel Morgan <[email protected]>
|
||||
* PORTING TO SQL SERVER AUTHOR:
|
||||
* Tim Coleman <[email protected]>
|
||||
*
|
||||
* Permission was given from the original author, Gonzalo Paniagua Javier,
|
||||
* to port and include his original work in Mono.
|
||||
*
|
||||
* The original work falls under the LGPL, but the port to C# falls
|
||||
* under the X11 license.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; see the file COPYING. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
Use: https://github.com/mono/mono/blob/cd51491631380ed56723fdfc66945213f9864b5a/mcs/class/System.Data/Test/SqlTest.cs
|
||||
|
||||
// (c)copyright 2002 Tim Coleman
|
||||
// (c)copyright 2002 Daniel Morgan
|
||||
|
||||
Use: https://github.com/mono/mono/blob/8ece8b55cdd54b45153f696498f5bd9dee0ced19/mcs/class/System.Data/Test/TestSqlDataAdapter.cs
|
||||
@@ -24,6 +24,7 @@ corefx/SqlParameterCollection.cs
|
||||
corefx/TdsEnums.cs
|
||||
corefx/SR.cs
|
||||
corefx/SqlDependencyUtils.cs
|
||||
corefx/DataReaderExtensions.cs
|
||||
../referencesource/System.Data/System/Data/Sql/SqlDataSourceEnumerator.cs
|
||||
../referencesource/System.Data/System/Data/CodeGen/StrongTypingException.cs
|
||||
../referencesource/System.Data/System/Data/OleDb/PropertyAttributes.cs
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
// 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.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
// copied from CoreFX (NS2.1)
|
||||
public static class DataReaderExtensions
|
||||
{
|
||||
public static bool GetBoolean(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetBoolean(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static byte GetByte(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetByte(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static long GetBytes(this DbDataReader reader, string name, long dataOffset, byte[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetBytes(reader.GetOrdinal(name), dataOffset, buffer, bufferOffset, length);
|
||||
}
|
||||
|
||||
public static char GetChar(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetChar(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static long GetChars(this DbDataReader reader, string name, long dataOffset, char[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetChars(reader.GetOrdinal(name), dataOffset, buffer, bufferOffset, length);
|
||||
}
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static DbDataReader GetData(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetData(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static string GetDataTypeName(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetDataTypeName(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static DateTime GetDateTime(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetDateTime(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static decimal GetDecimal(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetDecimal(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static double GetDouble(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetDouble(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static Type GetFieldType(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetFieldType(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static T GetFieldValue<T>(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetFieldValue<T>(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static Task<T> GetFieldValueAsync<T>(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetFieldValueAsync<T>(reader.GetOrdinal(name), cancellationToken);
|
||||
}
|
||||
|
||||
public static float GetFloat(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetFloat(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static Guid GetGuid(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetGuid(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static short GetInt16(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetInt16(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static int GetInt32(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetInt32(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static long GetInt64(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetInt64(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static Type GetProviderSpecificFieldType(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetProviderSpecificFieldType(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static object GetProviderSpecificValue(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetProviderSpecificValue(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static Stream GetStream(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetStream(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static string GetString(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetString(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static TextReader GetTextReader(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetTextReader(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static object GetValue(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.GetValue(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static bool IsDBNull(this DbDataReader reader, string name)
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.IsDBNull(reader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
public static Task<bool> IsDBNullAsync(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
AssertNotNull(reader);
|
||||
return reader.IsDBNullAsync(reader.GetOrdinal(name), cancellationToken);
|
||||
}
|
||||
|
||||
private static void AssertNotNull(DbDataReader reader)
|
||||
{
|
||||
if (reader == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(reader));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,6 +188,12 @@ namespace System.Net.Http
|
||||
|
||||
public IDictionary<string, object> Properties => _delegatingHandler.Properties;
|
||||
|
||||
// Only used in MonoWebRequestHandler and ignored by the other handlers.
|
||||
internal void SetWebRequestTimeout (TimeSpan timeout)
|
||||
{
|
||||
_delegatingHandler.SetWebRequestTimeout (timeout);
|
||||
}
|
||||
|
||||
protected internal override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) =>
|
||||
_delegatingHandler.SendAsync (request, cancellationToken);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ namespace System.Net.Http
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// Mono URI handling which does not distinguish between file and url absolute paths without scheme
|
||||
if (uri.Scheme == Uri.UriSchemeFile && uri.OriginalString.StartsWith ("/", StringComparison.Ordinal))
|
||||
return true;
|
||||
|
||||
return HttpUtilities.IsHttpUri (uri);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,5 +78,8 @@ namespace System.Net.Http
|
||||
}
|
||||
|
||||
Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken);
|
||||
|
||||
// Only used by MonoWebRequestHandler and ignored by the other handlers.
|
||||
void SetWebRequestTimeout (TimeSpan timeout);
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,7 @@ namespace System.Net.Http
|
||||
bool unsafeAuthenticatedConnectionSharing;
|
||||
bool sentRequest;
|
||||
string connectionGroupName;
|
||||
TimeSpan? timeout;
|
||||
bool disposed;
|
||||
|
||||
internal MonoWebRequestHandler ()
|
||||
@@ -368,6 +369,9 @@ namespace System.Net.Http
|
||||
|
||||
wr.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
|
||||
|
||||
if (timeout != null)
|
||||
wr.Timeout = (int)timeout.Value.TotalMilliseconds;
|
||||
|
||||
// Add request headers
|
||||
var headers = wr.Headers;
|
||||
foreach (var header in request.Headers) {
|
||||
@@ -529,5 +533,10 @@ namespace System.Net.Http
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
void IMonoHttpClientHandler.SetWebRequestTimeout (TimeSpan timeout)
|
||||
{
|
||||
this.timeout = timeout;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,6 +269,9 @@ namespace System.Net.Http
|
||||
async Task<HttpResponseMessage> SendAsyncWorker (HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
|
||||
{
|
||||
using (var lcts = CancellationTokenSource.CreateLinkedTokenSource (cts.Token, cancellationToken)) {
|
||||
// Hack to pass the timeout to the HttpWebRequest that's created by MonoWebRequestHandler; all other handlers ignore this.
|
||||
if (handler is HttpClientHandler clientHandler)
|
||||
clientHandler.SetWebRequestTimeout (timeout);
|
||||
lcts.CancelAfter (timeout);
|
||||
|
||||
var task = base.SendAsync (request, lcts.Token);
|
||||
|
||||
@@ -170,6 +170,9 @@ namespace System.Net.Http
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
// Only used in MonoWebRequestHandler and ignored by the other handlers.
|
||||
internal void SetWebRequestTimeout (TimeSpan timeout) => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
|
||||
// NS2.1:
|
||||
public static System.Func<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool> DangerousAcceptAnyServerCertificateValidator => throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace System.Net.Http
|
||||
{
|
||||
public class HttpMessageInvoker : IDisposable
|
||||
{
|
||||
HttpMessageHandler handler;
|
||||
protected private HttpMessageHandler handler;
|
||||
readonly bool disposeHandler;
|
||||
|
||||
public HttpMessageInvoker (HttpMessageHandler handler)
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace System.Net.Http
|
||||
public class HttpResponseMessage : IDisposable
|
||||
{
|
||||
HttpResponseHeaders headers;
|
||||
HttpResponseHeaders trailingHeaders;
|
||||
string reasonPhrase;
|
||||
HttpStatusCode statusCode;
|
||||
Version version;
|
||||
@@ -137,5 +138,14 @@ namespace System.Net.Http
|
||||
|
||||
return sb.ToString ();
|
||||
}
|
||||
|
||||
public HttpResponseHeaders TrailingHeaders {
|
||||
get {
|
||||
if (trailingHeaders == null)
|
||||
trailingHeaders = new HttpResponseHeaders ();
|
||||
|
||||
return trailingHeaders;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,8 +374,7 @@ namespace MonoTests.System.Net.Http
|
||||
Assert.AreEqual (response, client.SendAsync (request).Result, "#1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("NotWorking")]
|
||||
[Test]
|
||||
public void Send_BaseAddress ()
|
||||
{
|
||||
var mh = new HttpMessageHandlerMock ();
|
||||
@@ -798,42 +797,6 @@ namespace MonoTests.System.Net.Http
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
// The SocketsHttpHandler permits custom transfer encodings.
|
||||
public void Send_Transfer_Encoding_Custom ()
|
||||
{
|
||||
if (HttpClientTestHelpers.UsingSocketsHandler)
|
||||
Assert.Ignore ("Requires LegacyHttpClient");
|
||||
|
||||
bool? failed = null;
|
||||
|
||||
var listener = NetworkHelpers.CreateAndStartHttpListener("http://*:", out int port, "/Send_Transfer_Encoding_Custom/");
|
||||
AddListenerContext (listener, l => {
|
||||
failed = true;
|
||||
});
|
||||
|
||||
try {
|
||||
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
|
||||
client.DefaultRequestHeaders.TransferEncoding.Add (new TransferCodingHeaderValue ("chunked2"));
|
||||
|
||||
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Transfer_Encoding_Custom/");
|
||||
|
||||
try {
|
||||
client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Wait ();
|
||||
Assert.Fail ("#1");
|
||||
} catch (AggregateException e) {
|
||||
Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType (), "#2");
|
||||
}
|
||||
Assert.IsNull (failed, "#102");
|
||||
} finally {
|
||||
listener.Abort ();
|
||||
listener.Close ();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
|
||||
@@ -40,6 +40,11 @@ namespace System.Net.Http
|
||||
}
|
||||
}
|
||||
|
||||
// This is only used by MonoWebRequestHandler.
|
||||
void IMonoHttpClientHandler.SetWebRequestTimeout (TimeSpan timeout)
|
||||
{
|
||||
}
|
||||
|
||||
Task<HttpResponseMessage> IMonoHttpClientHandler.SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) => SendAsync (request, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -138,30 +138,33 @@ namespace System.Reflection.Emit {
|
||||
private static extern void create_dynamic_method (DynamicMethod m);
|
||||
|
||||
private void CreateDynMethod () {
|
||||
if (mhandle.Value == IntPtr.Zero) {
|
||||
if (ilgen == null || ilgen.ILOffset == 0)
|
||||
throw new InvalidOperationException ("Method '" + name + "' does not have a method body.");
|
||||
// Clearing of ilgen in create_dynamic_method is not yet synchronized for multiple threads
|
||||
lock (this) {
|
||||
if (mhandle.Value == IntPtr.Zero) {
|
||||
if (ilgen == null || ilgen.ILOffset == 0)
|
||||
throw new InvalidOperationException ("Method '" + name + "' does not have a method body.");
|
||||
|
||||
ilgen.label_fixup (this);
|
||||
ilgen.label_fixup (this);
|
||||
|
||||
// Have to create all DynamicMethods referenced by this one
|
||||
try {
|
||||
// Used to avoid cycles
|
||||
creating = true;
|
||||
if (refs != null) {
|
||||
for (int i = 0; i < refs.Length; ++i) {
|
||||
if (refs [i] is DynamicMethod) {
|
||||
DynamicMethod m = (DynamicMethod)refs [i];
|
||||
if (!m.creating)
|
||||
m.CreateDynMethod ();
|
||||
// Have to create all DynamicMethods referenced by this one
|
||||
try {
|
||||
// Used to avoid cycles
|
||||
creating = true;
|
||||
if (refs != null) {
|
||||
for (int i = 0; i < refs.Length; ++i) {
|
||||
if (refs [i] is DynamicMethod) {
|
||||
DynamicMethod m = (DynamicMethod)refs [i];
|
||||
if (!m.creating)
|
||||
m.CreateDynMethod ();
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
creating = false;
|
||||
}
|
||||
} finally {
|
||||
creating = false;
|
||||
create_dynamic_method (this);
|
||||
ilgen = null;
|
||||
}
|
||||
|
||||
create_dynamic_method (this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,10 @@ namespace System.Threading
|
||||
} finally {
|
||||
lock (this) {
|
||||
_callsInProcess--;
|
||||
if (_unregistered && _callsInProcess == 0 && _finalEvent != null)
|
||||
if (_unregistered && _callsInProcess == 0 && _finalEvent != null) {
|
||||
EventWaitHandle.Set (_finalEvent.SafeWaitHandle);
|
||||
_finalEvent = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,6 +239,8 @@ Example */
|
||||
set {
|
||||
if (headerCell != value) {
|
||||
headerCell = value;
|
||||
headerCell.SetDataGridView(DataGridView);
|
||||
headerCell.SetColumnIndex(Index);
|
||||
if (DataGridView != null) {
|
||||
DataGridView.OnColumnHeaderCellChanged(new DataGridViewColumnEventArgs(this));
|
||||
}
|
||||
|
||||
@@ -262,5 +262,17 @@ namespace MonoTests.System.Windows.Forms
|
||||
dgv.Columns.Add (dvc);
|
||||
Assert.IsNull (dvc.CellTemplate.DataGridView, "#1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SetNewHeaderCell ()
|
||||
{
|
||||
var dgv = new DataGridView ();
|
||||
var dvc = new DataGridViewTextBoxColumn ();
|
||||
var dch = new DataGridViewColumnHeaderCell ();
|
||||
dgv.Columns.Add (dvc);
|
||||
dvc.HeaderCell = dch;
|
||||
Assert.IsNotNull (dch.DataGridView, "#1");
|
||||
Assert.True (dch.ColumnIndex >= 0, "#2");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,3 +92,5 @@ using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Stack<>))]
|
||||
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Queue<>))]
|
||||
[assembly: TypeForwardedTo (typeof (System.IO.Enumeration.FileSystemName))]
|
||||
[assembly: TypeForwardedTo (typeof (System.Security.Cryptography.CryptographicOperations))]
|
||||
@@ -120,25 +120,21 @@ namespace Mono.Net.Security
|
||||
ServicePointManager.CheckCertificateRevocationList).ConfigureAwait (false);
|
||||
|
||||
status = WebExceptionStatus.Success;
|
||||
|
||||
request.ServicePoint.UpdateClientCertificate (sslStream.InternalLocalCertificate);
|
||||
} catch (Exception ex) {
|
||||
WebConnection.Debug ($"MONO TLS STREAM ERROR: {socket.ID} {socket.CleanedUp} {ex.Message}");
|
||||
if (socket.CleanedUp)
|
||||
status = WebExceptionStatus.RequestCanceled;
|
||||
else if (CertificateValidationFailed)
|
||||
status = WebExceptionStatus.TrustFailure;
|
||||
else
|
||||
status = WebExceptionStatus.SecureChannelFailure;
|
||||
throw;
|
||||
} finally {
|
||||
WebConnection.Debug ($"MONO TLS STREAM CREATE STREAM DONE: {socket.ID} {socket.CleanedUp}");
|
||||
if (CertificateValidationFailed)
|
||||
status = WebExceptionStatus.TrustFailure;
|
||||
|
||||
if (status == WebExceptionStatus.Success)
|
||||
request.ServicePoint.UpdateClientCertificate (sslStream.InternalLocalCertificate);
|
||||
else {
|
||||
request.ServicePoint.UpdateClientCertificate (null);
|
||||
sslStream.Dispose ();
|
||||
sslStream = null;
|
||||
}
|
||||
request.ServicePoint.UpdateClientCertificate (null);
|
||||
sslStream.Dispose ();
|
||||
sslStream = null;
|
||||
throw;
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -146,6 +142,7 @@ namespace Mono.Net.Security
|
||||
await sslStream.WriteAsync (tunnel.Data, 0, tunnel.Data.Length, cancellationToken).ConfigureAwait (false);
|
||||
} catch {
|
||||
status = WebExceptionStatus.SendFailure;
|
||||
sslStream.Dispose ();
|
||||
sslStream = null;
|
||||
throw;
|
||||
}
|
||||
|
||||
@@ -104,9 +104,14 @@ namespace System.IO.Compression
|
||||
{
|
||||
}
|
||||
|
||||
~DeflateStream () => Dispose (false);
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
native.Dispose (disposing);
|
||||
if (disposing)
|
||||
GC.SuppressFinalize (this);
|
||||
|
||||
native?.Dispose (disposing);
|
||||
|
||||
if (disposing && !disposed) {
|
||||
disposed = true;
|
||||
@@ -135,12 +140,15 @@ namespace System.IO.Compression
|
||||
|
||||
internal ValueTask<int> ReadAsyncMemory (Memory<byte> destination, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return base.ReadAsync(destination, cancellationToken);
|
||||
}
|
||||
|
||||
internal int ReadCore (Span<byte> destination)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
var buffer = new byte [destination.Length];
|
||||
int count = Read(buffer, 0, buffer.Length);
|
||||
buffer.AsSpan(0, count).CopyTo(destination);
|
||||
return count;
|
||||
}
|
||||
|
||||
public override int Read (byte[] array, int offset, int count)
|
||||
@@ -175,12 +183,12 @@ namespace System.IO.Compression
|
||||
|
||||
internal ValueTask WriteAsyncMemory (ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return base.WriteAsync(source, cancellationToken);
|
||||
}
|
||||
|
||||
internal void WriteCore (ReadOnlySpan<byte> source)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
Write (source.ToArray (), 0, source.Length);
|
||||
}
|
||||
|
||||
public override void Write (byte[] array, int offset, int count)
|
||||
@@ -380,18 +388,18 @@ namespace System.IO.Compression
|
||||
if (disposing && !disposed) {
|
||||
disposed = true;
|
||||
GC.SuppressFinalize (this);
|
||||
|
||||
io_buffer = null;
|
||||
} else {
|
||||
// When we are in the finalizer we don't want to access the underlying stream anymore
|
||||
base_stream = Stream.Null;
|
||||
}
|
||||
|
||||
io_buffer = null;
|
||||
|
||||
if (z_stream != null) {
|
||||
if (z_stream != null && !z_stream.IsInvalid) {
|
||||
z_stream.Dispose();
|
||||
}
|
||||
|
||||
if (data.IsAllocated) {
|
||||
if (data != null && data.IsAllocated) {
|
||||
data.Free ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,8 +128,10 @@ namespace System.IO {
|
||||
lock (watches) {
|
||||
data = (DefaultWatcherData) watches [fsw];
|
||||
if (data != null) {
|
||||
data.Enabled = false;
|
||||
data.DisabledTime = DateTime.UtcNow;
|
||||
lock (data.FilesLock) {
|
||||
data.Enabled = false;
|
||||
data.DisabledTime = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,7 +223,8 @@ namespace System.IO {
|
||||
}
|
||||
|
||||
lock (data.FilesLock) {
|
||||
IterateAndModifyFilesData (data, directory, dispatch, files);
|
||||
if (data.Enabled)
|
||||
IterateAndModifyFilesData (data, directory, dispatch, files);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// System.IO.FileSystemEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Tim Coleman ([email protected])
|
||||
//
|
||||
// Copyright (C) Tim Coleman, 2002
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS 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.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.IO {
|
||||
public class FileSystemEventArgs : EventArgs {
|
||||
|
||||
#region Fields
|
||||
|
||||
WatcherChangeTypes changeType;
|
||||
string directory;
|
||||
string name;
|
||||
|
||||
#endregion // Fields
|
||||
|
||||
#region Constructors
|
||||
|
||||
public FileSystemEventArgs (WatcherChangeTypes changeType, string directory, string name)
|
||||
{
|
||||
this.changeType = changeType;
|
||||
this.directory = directory;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
internal void SetName (string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
#endregion // Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
public WatcherChangeTypes ChangeType {
|
||||
get { return changeType; }
|
||||
}
|
||||
|
||||
public string FullPath {
|
||||
get { return Path.Combine (directory, name); }
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// System.IO.FileSystemEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Tim Coleman ([email protected])
|
||||
//
|
||||
// Copyright (C) Tim Coleman, 2002
|
||||
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS 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.
|
||||
//
|
||||
|
||||
namespace System.IO {
|
||||
|
||||
public delegate void FileSystemEventHandler (object sender, FileSystemEventArgs e);
|
||||
}
|
||||
@@ -420,6 +420,8 @@ namespace System.IO {
|
||||
}
|
||||
private void RaiseEvent (Delegate ev, EventArgs arg, EventType evtype)
|
||||
{
|
||||
if (disposed)
|
||||
return;
|
||||
if (ev == null)
|
||||
return;
|
||||
|
||||
@@ -497,11 +499,15 @@ namespace System.IO {
|
||||
|
||||
internal void DispatchErrorEvents (ErrorEventArgs args)
|
||||
{
|
||||
if (disposed)
|
||||
return;
|
||||
OnError (args);
|
||||
}
|
||||
|
||||
internal void DispatchEvents (FileAction act, string filename, ref RenamedEventArgs renamed)
|
||||
{
|
||||
if (disposed)
|
||||
return;
|
||||
if (waiting) {
|
||||
lastData = new WaitForChangedResult ();
|
||||
}
|
||||
|
||||
@@ -912,20 +912,61 @@ namespace System.Net.Sockets
|
||||
try {
|
||||
IPAddress [] addresses;
|
||||
SocketAsyncResult ares;
|
||||
bool pending;
|
||||
|
||||
/*
|
||||
* Both BeginSConnect() and BeginMConnect() now return a `bool` indicating whether or
|
||||
* not an async operation is pending.
|
||||
*/
|
||||
|
||||
if (!GetCheckedIPs (e, out addresses)) {
|
||||
//NOTE: DualMode may cause Socket's RemoteEndpoint to differ in AddressFamily from the
|
||||
// SocketAsyncEventArgs, but the SocketAsyncEventArgs itself is not changed
|
||||
ares = (SocketAsyncResult) BeginConnect (e.RemoteEndPoint, ConnectAsyncCallback, e);
|
||||
|
||||
ares = new SocketAsyncResult (this, ConnectAsyncCallback, e, SocketOperation.Connect) {
|
||||
EndPoint = e.RemoteEndPoint
|
||||
};
|
||||
|
||||
pending = BeginSConnect (ares);
|
||||
} else {
|
||||
DnsEndPoint dep = (DnsEndPoint)e.RemoteEndPoint;
|
||||
ares = (SocketAsyncResult) BeginConnect (addresses, dep.Port, ConnectAsyncCallback, e);
|
||||
|
||||
if (addresses == null)
|
||||
throw new ArgumentNullException ("addresses");
|
||||
if (addresses.Length == 0)
|
||||
throw new ArgumentException ("Empty addresses list");
|
||||
if (this.AddressFamily != AddressFamily.InterNetwork && this.AddressFamily != AddressFamily.InterNetworkV6)
|
||||
throw new NotSupportedException ("This method is only valid for addresses in the InterNetwork or InterNetworkV6 families");
|
||||
if (dep.Port <= 0 || dep.Port > 65535)
|
||||
throw new ArgumentOutOfRangeException ("port", "Must be > 0 and < 65536");
|
||||
|
||||
ares = new SocketAsyncResult (this, ConnectAsyncCallback, e, SocketOperation.Connect) {
|
||||
Addresses = addresses,
|
||||
Port = dep.Port,
|
||||
};
|
||||
|
||||
is_connected = false;
|
||||
|
||||
pending = BeginMConnect (ares);
|
||||
}
|
||||
|
||||
if (ares.IsCompleted && ares.CompletedSynchronously) {
|
||||
ares.CheckIfThrowDelayedException ();
|
||||
return false;
|
||||
if (!pending) {
|
||||
/*
|
||||
* On synchronous completion, the async callback will not be invoked.
|
||||
*
|
||||
* We need to call `EndConnect ()` here to close the socket and make sure
|
||||
* that any pending exceptions are properly propagated.
|
||||
*
|
||||
* Note that we're not calling `e.Complete ()` (or resetting `e.in_progress`) here.
|
||||
*/
|
||||
e.current_socket.EndConnect (ares);
|
||||
}
|
||||
|
||||
return pending;
|
||||
} catch (SocketException exc) {
|
||||
e.SocketError = exc.SocketErrorCode;
|
||||
e.socket_async_result.Complete (exc, true);
|
||||
return false;
|
||||
} catch (Exception exc) {
|
||||
e.socket_async_result.Complete (exc, true);
|
||||
return false;
|
||||
@@ -1044,7 +1085,7 @@ namespace System.Net.Sockets
|
||||
return sockares;
|
||||
}
|
||||
|
||||
static void BeginMConnect (SocketAsyncResult sockares)
|
||||
static bool BeginMConnect (SocketAsyncResult sockares)
|
||||
{
|
||||
Exception exc = null;
|
||||
|
||||
@@ -1053,17 +1094,18 @@ namespace System.Net.Sockets
|
||||
sockares.CurrentAddress++;
|
||||
sockares.EndPoint = new IPEndPoint (sockares.Addresses [i], sockares.Port);
|
||||
|
||||
BeginSConnect (sockares);
|
||||
return;
|
||||
return BeginSConnect (sockares);
|
||||
} catch (Exception e) {
|
||||
exc = e;
|
||||
}
|
||||
}
|
||||
|
||||
sockares.Complete (exc, true);
|
||||
return false;
|
||||
throw exc;
|
||||
}
|
||||
|
||||
static void BeginSConnect (SocketAsyncResult sockares)
|
||||
static bool BeginSConnect (SocketAsyncResult sockares)
|
||||
{
|
||||
EndPoint remoteEP = sockares.EndPoint;
|
||||
// Bug #75154: Connect() should not succeed for .Any addresses.
|
||||
@@ -1071,14 +1113,15 @@ namespace System.Net.Sockets
|
||||
IPEndPoint ep = (IPEndPoint) remoteEP;
|
||||
if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)) {
|
||||
sockares.Complete (new SocketException ((int) SocketError.AddressNotAvailable), true);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
sockares.EndPoint = remoteEP = sockares.socket.RemapIPEndPoint (ep);
|
||||
}
|
||||
|
||||
if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily)) {
|
||||
throw new ArgumentException(SR.net_invalidAddressList);
|
||||
sockares.Complete (new ArgumentException(SR.net_invalidAddressList), true);
|
||||
return false;
|
||||
}
|
||||
|
||||
int error = 0;
|
||||
@@ -1090,8 +1133,10 @@ namespace System.Net.Sockets
|
||||
sockares.socket.connect_in_progress = false;
|
||||
sockares.socket.m_Handle.Dispose ();
|
||||
sockares.socket.m_Handle = new SafeSocketHandle (sockares.socket.Socket_internal (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true);
|
||||
if (error != 0)
|
||||
throw new SocketException (error);
|
||||
if (error != 0) {
|
||||
sockares.Complete (new SocketException (error), true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool blk = sockares.socket.is_blocking;
|
||||
@@ -1106,7 +1151,7 @@ namespace System.Net.Sockets
|
||||
sockares.socket.is_connected = true;
|
||||
sockares.socket.is_bound = true;
|
||||
sockares.Complete (true);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (error != (int) SocketError.InProgress && error != (int) SocketError.WouldBlock) {
|
||||
@@ -1114,7 +1159,7 @@ namespace System.Net.Sockets
|
||||
sockares.socket.is_connected = false;
|
||||
sockares.socket.is_bound = false;
|
||||
sockares.Complete (new SocketException (error), true);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// continue asynch
|
||||
@@ -1123,6 +1168,7 @@ namespace System.Net.Sockets
|
||||
sockares.socket.connect_in_progress = true;
|
||||
|
||||
IOSelector.Add (sockares.Handle, new IOSelectorJob (IOOperation.Write, BeginConnectCallback, sockares));
|
||||
return true;
|
||||
}
|
||||
|
||||
static IOAsyncCallback BeginConnectCallback = new IOAsyncCallback (ares => {
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace System.Net.Sockets
|
||||
Socket completedSocket = socket;
|
||||
SocketOperation completedOperation = operation;
|
||||
|
||||
if (this.AsyncCallback != null) {
|
||||
if (!CompletedSynchronously && AsyncCallback != null) {
|
||||
ThreadPool.UnsafeQueueUserWorkItem(state => ((SocketAsyncResult)state).AsyncCallback((SocketAsyncResult)state), this);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,23 @@ namespace System.Net
|
||||
return await InnerStream.ReadAsync (
|
||||
buffer, offset, size, cancellationToken).ConfigureAwait (false);
|
||||
}
|
||||
|
||||
internal bool TryReadFromBuffer (byte[] buffer, int offset, int size, out int result)
|
||||
{
|
||||
var remaining = readBuffer?.Size ?? 0;
|
||||
if (remaining <= 0) {
|
||||
result = 0;
|
||||
return InnerStream == null;
|
||||
}
|
||||
|
||||
int copy = (remaining > size) ? size : remaining;
|
||||
Buffer.BlockCopy (readBuffer.Buffer, readBuffer.Offset, buffer, offset, copy);
|
||||
readBuffer.Offset += copy;
|
||||
readBuffer.Size -= copy;
|
||||
offset += copy;
|
||||
size -= copy;
|
||||
result = copy;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@ namespace System.Net {
|
||||
if (!File.Exists (pvk_file))
|
||||
return null;
|
||||
var cert = new X509Certificate2 (cert_file);
|
||||
cert.PrivateKey = PrivateKey.CreateFromFile (pvk_file).RSA;
|
||||
certificate = cert;
|
||||
var privateKey = PrivateKey.CreateFromFile (pvk_file).RSA;
|
||||
certificate = new X509Certificate2 ((X509Certificate2Impl)cert.Impl.CopyWithPrivateKey (privateKey));
|
||||
return certificate;
|
||||
} catch {
|
||||
// ignore errors
|
||||
|
||||
@@ -110,11 +110,12 @@ namespace System.Net
|
||||
return e;
|
||||
}
|
||||
|
||||
protected abstract bool TryReadFromBufferedContent (byte[] buffer, int offset, int count, out int result);
|
||||
|
||||
public override int Read (byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (!CanRead)
|
||||
throw new NotSupportedException (SR.net_writeonlystream);
|
||||
Operation.ThrowIfClosedOrDisposed ();
|
||||
|
||||
if (buffer == null)
|
||||
throw new ArgumentNullException (nameof (buffer));
|
||||
@@ -125,7 +126,13 @@ namespace System.Net
|
||||
if (count < 0 || (length - offset) < count)
|
||||
throw new ArgumentOutOfRangeException (nameof (count));
|
||||
|
||||
try {
|
||||
if (TryReadFromBufferedContent (buffer, offset, count, out var result))
|
||||
return result;
|
||||
|
||||
Operation.ThrowIfClosedOrDisposed ();
|
||||
|
||||
try
|
||||
{
|
||||
return ReadAsync (buffer, offset, count, CancellationToken.None).Result;
|
||||
} catch (Exception e) {
|
||||
throw GetException (e);
|
||||
|
||||
@@ -406,6 +406,8 @@ namespace System.Net
|
||||
return Task.FromException<int> (new NotSupportedException (SR.net_writeonlystream));
|
||||
}
|
||||
|
||||
protected override bool TryReadFromBufferedContent (byte[] buffer, int offset, int count, out int result) => throw new InvalidOperationException ();
|
||||
|
||||
protected override void Close_internal (ref bool disposed)
|
||||
{
|
||||
WebConnection.Debug ($"{ME} CLOSE: {disposed} {requestWritten} {allowBuffering}");
|
||||
|
||||
@@ -184,6 +184,15 @@ namespace System.Net
|
||||
}, () => Operation.Aborted, cancellationToken);
|
||||
}
|
||||
|
||||
protected override bool TryReadFromBufferedContent (byte[] buffer, int offset, int count, out int result)
|
||||
{
|
||||
if (bufferedEntireContent && innerStream is BufferedReadStream bufferedStream)
|
||||
return bufferedStream.TryReadFromBuffer (buffer, offset, count, out result);
|
||||
|
||||
result = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CheckAuthHeader (string headerName)
|
||||
{
|
||||
var authHeader = Headers[headerName];
|
||||
@@ -372,6 +381,7 @@ namespace System.Net
|
||||
var buffer = await ReadAllAsyncInner (cancellationToken).ConfigureAwait (false);
|
||||
var bos = new BufferOffsetSize (buffer, 0, buffer.Length, false);
|
||||
innerStream = new BufferedReadStream (Operation, null, bos);
|
||||
bufferedEntireContent = true;
|
||||
|
||||
nextReadCalled = true;
|
||||
completion.TrySetCompleted ();
|
||||
|
||||
+12
@@ -83,6 +83,18 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
|
||||
public abstract void AppendPrivateKeyInfo (StringBuilder sb);
|
||||
|
||||
public sealed override X509CertificateImpl CopyWithPrivateKey (RSA privateKey)
|
||||
{
|
||||
var impl = (X509Certificate2Impl)Clone ();
|
||||
impl.PrivateKey = privateKey;
|
||||
return impl;
|
||||
}
|
||||
|
||||
public sealed override X509Certificate CreateCertificate ()
|
||||
{
|
||||
return new X509Certificate2 (this);
|
||||
}
|
||||
|
||||
public abstract void Reset ();
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,11 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\CompressionLevel.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\CompressionMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\GZipStream.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\RenamedEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\RenamedEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\WaitForChangedResult.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Net.Mail\src\System\Net\Base64Stream.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Net.Mail\src\System\Net\BufferBuilder.cs" />
|
||||
@@ -864,14 +868,10 @@
|
||||
<Compile Include="System.IO.Compression\DeflateStream.cs" />
|
||||
<Compile Include="System.IO\ErrorEventArgs.cs" />
|
||||
<Compile Include="System.IO\ErrorEventHandler.cs" />
|
||||
<Compile Include="System.IO\FileSystemEventArgs.cs" />
|
||||
<Compile Include="System.IO\FileSystemEventHandler.cs" />
|
||||
<Compile Include="System.IO\IODescriptionAttribute.cs" />
|
||||
<Compile Include="System.IO\InternalBufferOverflowException.cs" />
|
||||
<Compile Include="System.IO\InvalidDataException.cs" />
|
||||
<Compile Include="System.IO\NotifyFilters.cs" />
|
||||
<Compile Include="System.IO\RenamedEventArgs.cs" />
|
||||
<Compile Include="System.IO\RenamedEventHandler.cs" />
|
||||
<Compile Include="System.IO\WatcherChangeTypes.cs" />
|
||||
<Compile Include="System.Net.Mail\AlternateView.cs" />
|
||||
<Compile Include="System.Net.Mail\AlternateViewCollection.cs" />
|
||||
|
||||
@@ -110,6 +110,9 @@ System/RemoteExecutorTests.cs
|
||||
|
||||
# System.IO.FileSystemWatcher
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Args.ErrorEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Args.FileSystemEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Args.RenamedEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/TempFile.cs
|
||||
|
||||
@@ -4707,9 +4707,10 @@ namespace MonoTests.System.Net.Sockets
|
||||
socketArgs.RemoteEndPoint = endPoint;
|
||||
socketArgs.Completed += (sender, e) => mre.Set ();
|
||||
|
||||
socket.ConnectAsync (socketArgs);
|
||||
if (socket.ConnectAsync (socketArgs))
|
||||
Assert.IsTrue (mre.WaitOne (1000), "ConnectedAsync timeout");
|
||||
|
||||
Assert.IsTrue (mre.WaitOne (1000), "ConnectedAsync timeout");
|
||||
Assert.AreNotEqual (SocketError.Success, socketArgs.SocketError);
|
||||
}
|
||||
|
||||
[Test] // Covers https://bugzilla.xamarin.com/show_bug.cgi?id=52549
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace MonoTests.System.Net.WebSockets
|
||||
[TestFixture]
|
||||
public class ClientWebSocketTest
|
||||
{
|
||||
const string EchoServerUrl = "ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx";
|
||||
const string EchoServerUrl = "ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx";
|
||||
|
||||
ClientWebSocket socket;
|
||||
MethodInfo headerSetMethod;
|
||||
|
||||
@@ -3230,6 +3230,54 @@ namespace MonoTests.System.Net
|
||||
var gr = wr.BeginGetResponse (delegate { }, null);
|
||||
Assert.AreEqual (true, gr.AsyncWaitHandle.WaitOne (5000), "#1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Read_ErrorResponse_After_Abort ()
|
||||
{
|
||||
const string message = "Hello World!";
|
||||
using (SocketResponder responder = new SocketResponder (out var ep, socket => {
|
||||
var buffer = new byte [4096];
|
||||
var bytesReceived = socket.Receive (buffer);
|
||||
while (bytesReceived > 0) {
|
||||
// We don't check for Content-Length or anything else here, so we give the client a little time to write
|
||||
// after sending the headers
|
||||
Thread.Sleep (200);
|
||||
if (socket.Available > 0) {
|
||||
bytesReceived = socket.Receive (buffer);
|
||||
} else {
|
||||
bytesReceived = 0;
|
||||
}
|
||||
}
|
||||
var sw = new StringWriter ();
|
||||
sw.WriteLine ("HTTP/1.1 500 Too Lazy");
|
||||
sw.WriteLine ($"Content-Length: {message.Length}");
|
||||
sw.WriteLine ();
|
||||
sw.Write (message);
|
||||
sw.Flush ();
|
||||
|
||||
return Encoding.UTF8.GetBytes (sw.ToString ());
|
||||
})) {
|
||||
string url = $"http://{ep}/test/";
|
||||
HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url);
|
||||
|
||||
try {
|
||||
req.GetResponse ();
|
||||
Assert.Fail ("#1");
|
||||
} catch (WebException ex) {
|
||||
req.Abort ();
|
||||
var res = (HttpWebResponse)ex.Response;
|
||||
Assert.IsNotNull (res, "#2");
|
||||
|
||||
using (var r = new StreamReader(res.GetResponseStream())) {
|
||||
var body = r.ReadToEnd();
|
||||
Assert.AreEqual (message, body, "#3");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class StreamExtensions {
|
||||
|
||||
@@ -29,14 +29,10 @@ System.IO.Compression/DeflateStream.cs
|
||||
|
||||
System.IO/ErrorEventArgs.cs
|
||||
System.IO/ErrorEventHandler.cs
|
||||
System.IO/FileSystemEventArgs.cs
|
||||
System.IO/FileSystemEventHandler.cs
|
||||
System.IO/InternalBufferOverflowException.cs
|
||||
System.IO/InvalidDataException.cs
|
||||
System.IO/IODescriptionAttribute.cs
|
||||
System.IO/NotifyFilters.cs
|
||||
System.IO/RenamedEventArgs.cs
|
||||
System.IO/RenamedEventHandler.cs
|
||||
System.IO/WatcherChangeTypes.cs
|
||||
|
||||
System.Net/BasicClient.cs
|
||||
@@ -873,13 +869,17 @@ ReferenceSources/Win32Exception.cs
|
||||
../../../external/corefx/src/System.Private.Uri/src/System/UriBuilder.cs
|
||||
|
||||
../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemEventHandler.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/RenamedEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/RenamedEventHandler.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/WaitForChangedResult.cs
|
||||
|
||||
../../../external/corefx/src/System.Runtime.InteropServices/src/System/Security/SecureStringMarshal.cs
|
||||
../../../external/corefx/src/System.Runtime.Extensions/src/System/StringNormalizationExtensions.cs
|
||||
../../../external/corefx/src/System.Diagnostics.StackTrace/src/System/Diagnostics/StackFrameExtensions.cs
|
||||
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs
|
||||
|
||||
# Everything except compiled
|
||||
../../../external/corefx/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Capture.cs
|
||||
|
||||
@@ -8,3 +8,9 @@
|
||||
../../../external/corefx/src/System.CodeDom/tests/Microsoft/CSharp/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Microsoft/VisualBasic/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/*.cs
|
||||
|
||||
System/RemoteExecutorTests.cs
|
||||
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs
|
||||
@@ -1,14 +1 @@
|
||||
#include monotouch_System_xtest.dll.exclude.sources
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeCollections/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeExpressions/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeObjects/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeStatements/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeTypeMembers/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Compiler/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Other/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Microsoft/CSharp/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Microsoft/VisualBasic/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs
|
||||
@@ -1,17 +1,8 @@
|
||||
#include monotouch_System_xtest.dll.exclude.sources
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeCollections/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeExpressions/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeObjects/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeStatements/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/CodeTypeMembers/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Compiler/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Other/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Microsoft/CSharp/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/Microsoft/VisualBasic/*.cs
|
||||
../../../external/corefx/src/System.CodeDom/tests/*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs
|
||||
|
||||
../../../external/corefx/src/System.Net.Security/tests/FunctionalTests/*.cs
|
||||
|
||||
../../../external/corefx/src/System.Net.WebClient/tests/WebClientTest.cs
|
||||
|
||||
../../../external/corefx/src/Common/tests/System/Net/WebSockets/WebSocketCreateTest.cs
|
||||
../../../external/corefx/src/System.Net.WebSockets/tests/WebSocketTests.netcoreapp.cs
|
||||
@@ -0,0 +1 @@
|
||||
System/RemoteExecutorTests.cs
|
||||
@@ -232,7 +232,7 @@ TEST_RESOURCES = $(TEST_RESX_RESOURCES) $(TEST_RESX_RESOURCES_SATELITE)
|
||||
satellite_assembly1 = $(test_lib_dir)/es-ES/$(patsubst %.dll,%.resources.dll,$(test_lib))
|
||||
satellite_assembly2 = $(test_lib_dir)/nn-NO/$(patsubst %.dll,%.resources.dll,$(test_lib))
|
||||
|
||||
$(test_lib_output): $(TEST_RESOURCES) $(satellite_assembly1) $(satellite_assembly2) $(test_lib_dir)
|
||||
$(test_lib_output): $(TEST_RESOURCES) $(satellite_assembly1) $(satellite_assembly2) | $(test_lib_dir)
|
||||
|
||||
mscorlib_for_profile = $(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
@@ -298,11 +298,8 @@ NO_VTS_TEST = yes
|
||||
endif
|
||||
|
||||
ifndef NO_VTS_TEST
|
||||
test: test-vts
|
||||
run-test: run-test-vts
|
||||
else
|
||||
test:
|
||||
run-test:
|
||||
test-local: test-vts
|
||||
run-test-local: run-test-vts
|
||||
endif
|
||||
|
||||
EXTRA_DISTFILES += \
|
||||
|
||||
@@ -34,6 +34,36 @@ namespace System.Globalization
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
partial class CalendarData
|
||||
{
|
||||
private static string[] HEBREW_MONTH_NAMES = new[] {
|
||||
"\u05EA\u05E9\u05E8\u05D9",
|
||||
"\u05D7\u05E9\u05D5\u05DF",
|
||||
"\u05DB\u05E1\u05DC\u05D5",
|
||||
"\u05D8\u05D1\u05EA",
|
||||
"\u05E9\u05D1\u05D8",
|
||||
"\u05D0\u05D3\u05E8",
|
||||
"\u05D0\u05D3\u05E8\u0020\u05D1",
|
||||
"\u05E0\u05D9\u05E1\u05DF",
|
||||
"\u05D0\u05D9\u05D9\u05E8",
|
||||
"\u05E1\u05D9\u05D5\u05DF",
|
||||
"\u05EA\u05DE\u05D5\u05D6",
|
||||
"\u05D0\u05D1",
|
||||
"\u05D0\u05DC\u05D5\u05DC" };
|
||||
|
||||
private static string[] HEBREW_LEAP_MONTH_NAMES = new[] {
|
||||
"\u05EA\u05E9\u05E8\u05D9",
|
||||
"\u05D7\u05E9\u05D5\u05DF",
|
||||
"\u05DB\u05E1\u05DC\u05D5",
|
||||
"\u05D8\u05D1\u05EA",
|
||||
"\u05E9\u05D1\u05D8",
|
||||
"\u05D0\u05D3\u05E8\u0020\u05D0",
|
||||
"\u05D0\u05D3\u05E8\u0020\u05D1",
|
||||
"\u05E0\u05D9\u05E1\u05DF",
|
||||
"\u05D0\u05D9\u05D9\u05E8",
|
||||
"\u05E1\u05D9\u05D5\u05DF",
|
||||
"\u05EA\u05DE\u05D5\u05D6",
|
||||
"\u05D0\u05D1",
|
||||
"\u05D0\u05DC\u05D5\u05DC" };
|
||||
|
||||
public static int nativeGetTwoDigitYearMax (int calID)
|
||||
{
|
||||
// -1 mean OS does not override default BCL max year
|
||||
@@ -43,7 +73,17 @@ namespace System.Globalization
|
||||
static bool nativeGetCalendarData (CalendarData data, string localeName, int calendarId)
|
||||
{
|
||||
// TODO: Convert calendar-id to mono runtime calendar-id when it's used
|
||||
return data.fill_calendar_data (localeName.ToLowerInvariant (), calendarId);
|
||||
if (data.fill_calendar_data (localeName.ToLowerInvariant (), calendarId)) {
|
||||
if ((CalendarId)calendarId == CalendarId.HEBREW) {
|
||||
// HACK: Generate leap month names because the native code does not do it
|
||||
// and tests would fail to round-trip dates on leap years.
|
||||
// https://github.com/mono/mono/issues/16623
|
||||
data.saMonthNames = HEBREW_MONTH_NAMES;
|
||||
data.saLeapYearMonthNames = HEBREW_LEAP_MONTH_NAMES;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Text;
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
[Serializable]
|
||||
partial class MethodBase
|
||||
{
|
||||
//
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
namespace System.Diagnostics.Tracing
|
||||
{
|
||||
public class EventCounter : IDisposable
|
||||
public class EventCounter : DiagnosticCounter
|
||||
{
|
||||
public EventCounter (string name, EventSource eventSource)
|
||||
public EventCounter (string name, EventSource eventSource) : base (name, eventSource)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace System.Diagnostics.Tracing
|
||||
{
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
public void WriteMetric (double value)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,6 +174,10 @@ namespace System.Diagnostics.Tracing
|
||||
{
|
||||
}
|
||||
|
||||
internal void ReportOutOfBandMessage (string msg, bool flush)
|
||||
{
|
||||
}
|
||||
|
||||
protected void WriteEvent (int eventId)
|
||||
{
|
||||
WriteEvent (eventId, new object[] { } );
|
||||
|
||||
@@ -54,6 +54,18 @@ namespace System.Diagnostics.Tracing
|
||||
internal set;
|
||||
}
|
||||
|
||||
public long OSThreadId
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public DateTime TimeStamp
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string EventName
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -134,30 +134,33 @@ namespace System.Reflection.Emit {
|
||||
private static extern void create_dynamic_method (DynamicMethod m);
|
||||
|
||||
private void CreateDynMethod () {
|
||||
if (mhandle.Value == IntPtr.Zero) {
|
||||
if (ilgen == null || ilgen.ILOffset == 0)
|
||||
throw new InvalidOperationException ("Method '" + name + "' does not have a method body.");
|
||||
// Clearing of ilgen in create_dynamic_method is not yet synchronized for multiple threads
|
||||
lock (this) {
|
||||
if (mhandle.Value == IntPtr.Zero) {
|
||||
if (ilgen == null || ilgen.ILOffset == 0)
|
||||
throw new InvalidOperationException ("Method '" + name + "' does not have a method body.");
|
||||
|
||||
ilgen.label_fixup (this);
|
||||
ilgen.label_fixup (this);
|
||||
|
||||
// Have to create all DynamicMethods referenced by this one
|
||||
try {
|
||||
// Used to avoid cycles
|
||||
creating = true;
|
||||
if (refs != null) {
|
||||
for (int i = 0; i < refs.Length; ++i) {
|
||||
if (refs [i] is DynamicMethod) {
|
||||
DynamicMethod m = (DynamicMethod)refs [i];
|
||||
if (!m.creating)
|
||||
m.CreateDynMethod ();
|
||||
// Have to create all DynamicMethods referenced by this one
|
||||
try {
|
||||
// Used to avoid cycles
|
||||
creating = true;
|
||||
if (refs != null) {
|
||||
for (int i = 0; i < refs.Length; ++i) {
|
||||
if (refs [i] is DynamicMethod) {
|
||||
DynamicMethod m = (DynamicMethod)refs [i];
|
||||
if (!m.creating)
|
||||
m.CreateDynMethod ();
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
creating = false;
|
||||
}
|
||||
} finally {
|
||||
creating = false;
|
||||
create_dynamic_method (this);
|
||||
ilgen = null;
|
||||
}
|
||||
|
||||
create_dynamic_method (this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -365,4 +365,12 @@
|
||||
clt.un
|
||||
ret
|
||||
}
|
||||
|
||||
.method public hidebysig static !!T& Unbox<valuetype .ctor ([mscorlib]System.ValueType) T> (object 'box') cil managed aggressiveinlining
|
||||
{
|
||||
.maxstack 1
|
||||
ldarg.0
|
||||
unbox !!T
|
||||
ret
|
||||
}
|
||||
}
|
||||
@@ -518,7 +518,7 @@ namespace System.Runtime.InteropServices
|
||||
|
||||
return (IntPtr)(-1);
|
||||
}
|
||||
#elif !MONOTOUCH
|
||||
#else
|
||||
public static IntPtr GetHINSTANCE (Module m) => throw new PlatformNotSupportedException();
|
||||
public static IntPtr GetIDispatchForObject (object o) => throw new PlatformNotSupportedException();
|
||||
public static object GetTypedObjectForIUnknown (IntPtr pUnk, Type t) => throw new PlatformNotSupportedException();
|
||||
|
||||
@@ -211,12 +211,12 @@ namespace System.Runtime.InteropServices
|
||||
else
|
||||
perform_release = true;
|
||||
|
||||
/* Attempt the update to the new state, fail and retry if the initial
|
||||
* state has been modified in the meantime. Decrement the ref count by
|
||||
* substracting SH_RefCountOne from the state then OR in the bits for
|
||||
* Dispose (if that's the reason for the Release) and closed (if the
|
||||
* initial ref count was 1). */
|
||||
new_state = (old_state & RefCount_Mask) - RefCount_One;
|
||||
// Not closed, let's propose an update (to the ref count, just add
|
||||
// StateBits.RefCountOne to the state to effectively add 1 to the ref count).
|
||||
// Continue doing this until the update succeeds (because nobody
|
||||
// modifies the state field between the read and write operations) or
|
||||
// the state moves to closed.
|
||||
new_state = old_state - RefCount_One;
|
||||
if ((old_state & RefCount_Mask) == RefCount_One)
|
||||
new_state |= (int) State.Closed;
|
||||
if (dispose)
|
||||
|
||||
@@ -431,7 +431,11 @@ namespace System.Runtime.Remoting.Messaging {
|
||||
ArrayList ret = null;
|
||||
|
||||
if (null != _serializedArgs) {
|
||||
object[] oret = (object[]) CADSerializer.DeserializeObject (new MemoryStream (_serializedArgs));
|
||||
// Avoid cross domain refs between MemoryStream and _serializedArgs byte array
|
||||
byte[] copyArray = new byte [_serializedArgs.Length];
|
||||
Array.Copy (_serializedArgs, copyArray, _serializedArgs.Length);
|
||||
|
||||
object[] oret = (object[]) CADSerializer.DeserializeObject (new MemoryStream (copyArray));
|
||||
ret = new ArrayList (oret);
|
||||
_serializedArgs = null;
|
||||
}
|
||||
@@ -498,7 +502,11 @@ namespace System.Runtime.Remoting.Messaging {
|
||||
ArrayList ret = null;
|
||||
|
||||
if (null != _serializedArgs) {
|
||||
object[] oret = (object[]) CADSerializer.DeserializeObject (new MemoryStream (_serializedArgs));
|
||||
// Avoid cross domain refs between MemoryStream and _serializedArgs byte array
|
||||
byte[] copyArray = new byte [_serializedArgs.Length];
|
||||
Array.Copy (_serializedArgs, copyArray, _serializedArgs.Length);
|
||||
|
||||
object[] oret = (object[]) CADSerializer.DeserializeObject (new MemoryStream (copyArray));
|
||||
ret = new ArrayList (oret);
|
||||
_serializedArgs = null;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,10 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
|
||||
public abstract byte[] Export (X509ContentType contentType, SafePasswordHandle password);
|
||||
|
||||
public abstract X509CertificateImpl CopyWithPrivateKey (RSA privateKey);
|
||||
|
||||
public abstract X509Certificate CreateCertificate ();
|
||||
|
||||
public sealed override bool Equals (object obj)
|
||||
{
|
||||
var other = obj as X509CertificateImpl;
|
||||
|
||||
@@ -83,12 +83,14 @@ namespace System.Threading
|
||||
|
||||
lock (this) {
|
||||
_unregistered = true;
|
||||
if (_callsInProcess == 0 && _finalEvent != null)
|
||||
if (_callsInProcess == 0 && _finalEvent != null) {
|
||||
#if NETCORE
|
||||
throw new NotImplementedException ();
|
||||
#else
|
||||
NativeEventCalls.SetEvent (_finalEvent.SafeWaitHandle);
|
||||
_finalEvent = null;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} catch (ObjectDisposedException) {
|
||||
// Can happen if we called Unregister before we had time to execute Wait
|
||||
@@ -109,12 +111,14 @@ namespace System.Threading
|
||||
lock (this)
|
||||
{
|
||||
_callsInProcess--;
|
||||
if (_unregistered && _callsInProcess == 0 && _finalEvent != null)
|
||||
if (_unregistered && _callsInProcess == 0 && _finalEvent != null) {
|
||||
#if NETCORE
|
||||
EventWaitHandle.Set (_finalEvent.SafeWaitHandle);
|
||||
#else
|
||||
NativeEventCalls.SetEvent (_finalEvent.SafeWaitHandle);
|
||||
#endif
|
||||
_finalEvent = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,6 +294,11 @@ namespace System.Threading {
|
||||
th.principal = value;
|
||||
}
|
||||
}
|
||||
#else
|
||||
public static IPrincipal CurrentPrincipal {
|
||||
get => throw new PlatformNotSupportedException ();
|
||||
set => throw new PlatformNotSupportedException ();
|
||||
}
|
||||
#endif
|
||||
|
||||
public static AppDomain GetDomain() {
|
||||
|
||||
@@ -44,10 +44,13 @@ namespace System {
|
||||
|
||||
public partial class TimeZoneInfo {
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
extern static string xamarin_timezone_get_local_name ();
|
||||
|
||||
static TimeZoneInfo CreateLocal ()
|
||||
{
|
||||
using (Stream stream = GetMonoTouchData (null)) {
|
||||
return BuildFromStream ("Local", stream);
|
||||
return BuildFromStream (xamarin_timezone_get_local_name (), stream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +71,7 @@ namespace System {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
extern static IntPtr xamarin_timezone_get_names (ref int count);
|
||||
|
||||
|
||||
@@ -919,8 +919,9 @@ namespace System
|
||||
DateTime DST_end = TransitionPoint (rule.DaylightTransitionEnd, year + ((rule.DaylightTransitionStart.Month < rule.DaylightTransitionEnd.Month) ? 0 : 1));
|
||||
if (dateTime.Kind == DateTimeKind.Utc) {
|
||||
DST_start -= BaseUtcOffset;
|
||||
DST_end -= (BaseUtcOffset + rule.DaylightDelta);
|
||||
DST_end -= BaseUtcOffset;
|
||||
}
|
||||
DST_end -= rule.DaylightDelta;
|
||||
return (dateTime >= DST_start && dateTime < DST_end);
|
||||
}
|
||||
|
||||
@@ -1215,10 +1216,13 @@ namespace System
|
||||
return false;
|
||||
}
|
||||
|
||||
var isUtc = false;
|
||||
if (dateTime.Kind != DateTimeKind.Utc) {
|
||||
if (!TryAddTicks (date, -BaseUtcOffset.Ticks, out date, DateTimeKind.Utc))
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
isUtc = true;
|
||||
|
||||
|
||||
AdjustmentRule current = GetApplicableRule (date);
|
||||
if (current != null) {
|
||||
@@ -1230,12 +1234,18 @@ namespace System
|
||||
if (forOffset)
|
||||
isDst = true;
|
||||
offset = baseUtcOffset;
|
||||
if (date >= new DateTime (tStart.Ticks + current.DaylightDelta.Ticks, DateTimeKind.Utc))
|
||||
if (isUtc || (date >= new DateTime (tStart.Ticks + current.DaylightDelta.Ticks, DateTimeKind.Utc)))
|
||||
{
|
||||
offset += current.DaylightDelta;
|
||||
isDst = true;
|
||||
}
|
||||
|
||||
if (date >= new DateTime (tEnd.Ticks - current.DaylightDelta.Ticks, DateTimeKind.Utc))
|
||||
{
|
||||
offset = baseUtcOffset;
|
||||
isDst = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ public class CalendarTest {
|
||||
new Date(28,10,2038,1),
|
||||
new Date(13,10,1460,1),
|
||||
new Date(12,2,5799,1),
|
||||
new Date(10,11,50,4),
|
||||
new Date(10,11,20,5),
|
||||
new Date(10,11,127,1),
|
||||
new Date(10,11,4371,1),
|
||||
new Date(10,11,2581,1));
|
||||
@@ -436,7 +436,7 @@ public class CalendarTest {
|
||||
new Date(5,7,2094,1),
|
||||
new Date(6,3,1518,1),
|
||||
new Date(5,11,5854,1),
|
||||
new Date(18,7,106,4),
|
||||
new Date(18,7,76,5),
|
||||
new Date(18,7,183,1),
|
||||
new Date(18,7,4427,1),
|
||||
new Date(18,7,2637,1));
|
||||
@@ -495,7 +495,7 @@ public class CalendarTest {
|
||||
foreach (Calendar cal in acal) {
|
||||
int check = 1;
|
||||
if (cal is JapaneseCalendar)
|
||||
check = 4;
|
||||
check = 5;
|
||||
Assert.AreEqual(check, cal.Eras.Length,
|
||||
String.Format("D01 {0}.Eras.Length", cal));
|
||||
cal.Eras[0] = 29;
|
||||
@@ -507,11 +507,12 @@ public class CalendarTest {
|
||||
public void TestErasProperty2() {
|
||||
Assert.AreEqual(1, clcal.Eras.Length, "cn");
|
||||
Assert.AreEqual(1, tlcal.Eras.Length, "tw");
|
||||
Assert.AreEqual(2, jlcal.Eras.Length, "jp");
|
||||
Assert.AreEqual(3, jlcal.Eras.Length, "jp");
|
||||
Assert.AreEqual(1, klcal.Eras.Length, "kr");
|
||||
|
||||
Assert.AreEqual(4, jlcal.Eras [0], "jp.1");
|
||||
Assert.AreEqual(3, jlcal.Eras [1], "jp.2");
|
||||
Assert.AreEqual(5, jlcal.Eras [0], "jp.1");
|
||||
Assert.AreEqual(4, jlcal.Eras [1], "jp.2");
|
||||
Assert.AreEqual(3, jlcal.Eras [2], "jp.3");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -49,30 +49,30 @@ namespace MonoTests.System.Globalization
|
||||
public void ToDateTime ()
|
||||
{
|
||||
Assert.AreEqual (new DateTime (2000, 2, 5), cn.ToDateTime (2000, 1, 1, 0, 0, 0, 0), "cn1");
|
||||
Assert.AreEqual (new DateTime (2000, 2, 5), jp.ToDateTime (12, 1, 1, 0, 0, 0, 0), "jp1"); // since 1988 (current epoch)
|
||||
Assert.AreEqual (new DateTime (2000, 2, 5), jp.ToDateTime (12, 1, 1, 0, 0, 0, 0, 4), "jp1"); // since 1988 (current epoch)
|
||||
Assert.AreEqual (new DateTime (2000, 2, 5), tw.ToDateTime (89, 1, 1, 0, 0, 0, 0), "tw1"); // since 1912 (current epoch)
|
||||
Assert.AreEqual (new DateTime (2000, 2, 5), kr.ToDateTime (2000, 1, 1, 0, 0, 0, 0), "kr1");
|
||||
|
||||
Assert.AreEqual (new DateTime (2001, 1, 24), cn.ToDateTime (2001, 1, 1, 0, 0, 0, 0), "cn2");
|
||||
Assert.AreEqual (new DateTime (2001, 1, 24), jp.ToDateTime (13, 1, 1, 0, 0, 0, 0), "jp2");
|
||||
Assert.AreEqual (new DateTime (2001, 1, 24), jp.ToDateTime (13, 1, 1, 0, 0, 0, 0, 4), "jp2");
|
||||
Assert.AreEqual (new DateTime (2001, 1, 24), tw.ToDateTime (90, 1, 1, 0, 0, 0, 0), "tw2");
|
||||
Assert.AreEqual (new DateTime (2001, 1, 24), kr.ToDateTime (2001, 1, 1, 0, 0, 0, 0), "kr2");
|
||||
|
||||
Assert.AreEqual (new DateTime (2002, 2, 12), cn.ToDateTime (2002, 1, 1, 0, 0, 0, 0), "cn3");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 12), jp.ToDateTime (14, 1, 1, 0, 0, 0, 0), "jp3");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 12), jp.ToDateTime (14, 1, 1, 0, 0, 0, 0, 4), "jp3");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 12), tw.ToDateTime (91, 1, 1, 0, 0, 0, 0), "tw3");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 12), kr.ToDateTime (2002, 1, 1, 0, 0, 0, 0), "kr3");
|
||||
|
||||
// actually it is 5th month which is leap, but that
|
||||
// does not afffect on resulting DateTime
|
||||
Assert.AreEqual (new DateTime (2001, 5, 23), cn.ToDateTime (2001, 5, 1, 0, 0, 0, 0), "cn4");
|
||||
Assert.AreEqual (new DateTime (2001, 5, 23), jp.ToDateTime (13, 5, 1, 0, 0, 0, 0), "jp4");
|
||||
Assert.AreEqual (new DateTime (2001, 5, 23), jp.ToDateTime (13, 5, 1, 0, 0, 0, 0, 4), "jp4");
|
||||
Assert.AreEqual (new DateTime (2001, 5, 23), tw.ToDateTime (90, 5, 1, 0, 0, 0, 0), "tw4");
|
||||
Assert.AreEqual (new DateTime (2001, 5, 23), kr.ToDateTime (2001, 5, 1, 0, 0, 0, 0), "kr4");
|
||||
|
||||
// here the leap month works.
|
||||
Assert.AreEqual (new DateTime (2002, 2, 11), cn.ToDateTime (2001, 13, 30, 0, 0, 0, 0), "cn5");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 11), jp.ToDateTime (13, 13, 30, 0, 0, 0, 0), "jp5");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 11), jp.ToDateTime (13, 13, 30, 0, 0, 0, 0, 4), "jp5");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 11), tw.ToDateTime (90, 13, 30, 0, 0, 0, 0), "tw5");
|
||||
Assert.AreEqual (new DateTime (2002, 2, 11), kr.ToDateTime (2001, 13, 30, 0, 0, 0, 0), "kr5");
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace MonoTests.System.Globalization
|
||||
for (int i = 0; i < 60; i++)
|
||||
Assert.AreEqual (leapYears [i % 19], cn.IsLeapYear (2000 + i), "cn" + i);
|
||||
for (int i = 0; i < 48; i++) // only 1-to-61 are allowed
|
||||
Assert.AreEqual (leapYears [i % 19], jp.IsLeapYear (12 + i), "jp" + i);
|
||||
Assert.AreEqual (leapYears [i % 19], jp.IsLeapYear (12 + i, 4), "jp" + i);
|
||||
for (int i = 0; i < 50; i++)
|
||||
Assert.AreEqual (leapYears [i % 19], tw.IsLeapYear (89 + i), "tw" + i);
|
||||
for (int i = 0; i < 50; i++)
|
||||
@@ -178,7 +178,7 @@ namespace MonoTests.System.Globalization
|
||||
d [29] = 6;
|
||||
for (int y = 12; y < 32; y++)
|
||||
for (int m = 1; m <= 12; m++)
|
||||
Assert.AreEqual (d.ContainsKey (y) && d [y] == m, jp.IsLeapMonth (y, m), "jp" + y + "/" + m);
|
||||
Assert.AreEqual (d.ContainsKey (y) && d [y] == m, jp.IsLeapMonth (y, m, 4), "jp" + y + "/" + m);
|
||||
|
||||
d = new Dictionary<int,int> ();
|
||||
d [2001] = 5;
|
||||
|
||||
@@ -1650,6 +1650,29 @@ namespace MonoTests.System.IO
|
||||
|
||||
}
|
||||
|
||||
// See https://github.com/mono/mono/issues/16032
|
||||
[Test]
|
||||
public void DeleteOnCloseWithFileCopy ()
|
||||
{
|
||||
string source = TempFolder + DSC + "source.txt";
|
||||
string target = TempFolder + DSC + "target.txt";
|
||||
|
||||
File.WriteAllText (source, "text");
|
||||
FileStream fs = new FileStream (source, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite, 2048,
|
||||
FileOptions.DeleteOnClose);
|
||||
|
||||
Assert.AreEqual (true, File.Exists (source), "DCFC#1");
|
||||
|
||||
try {
|
||||
File.Copy (fs.Name, target, true);
|
||||
} finally {
|
||||
fs.Dispose();
|
||||
}
|
||||
|
||||
Assert.AreEqual (false, File.Exists (source), "DCFC#2");
|
||||
Assert.AreEqual (true, File.Exists (target), "DCFC#3");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OpenCharDeviceRepeatedly ()
|
||||
{
|
||||
|
||||
Loaded 100 of 301 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user