Compare commits

..
Author SHA1 Message Date
[email protected] c4e14ad8a4 Removed old test. 2019-06-17 11:33:09 -04:00
[email protected] f2c22c8ac4 Reverted white space changes to sgen-mono because it creates a big diff. 2019-06-14 13:29:04 -04:00
[email protected] c256a0fa80 Reverted trailing whitespace removal fro icall because it created a massive diff. 2019-06-14 13:26:33 -04:00
[email protected] 2885957720 Increased allocation in test. 2019-06-14 12:54:55 -04:00
[email protected] 74658ba46b Removed trailing whitespace. 2019-06-14 12:54:01 -04:00
[email protected] c9b277cd3b Removed extra whitespace. 2019-06-14 12:48:06 -04:00
[email protected] dd7f7d0976 Style issues. 2019-06-14 11:33:48 -04:00
[email protected] 1d0fc47618 Warmed up allocation in test. 2019-06-13 17:09:04 -04:00
[email protected] e3d1a191c2 Removed printfs. 2019-06-13 15:45:03 -04:00
[email protected] 94749fe6fb Removed more double counting. 2019-06-12 17:45:07 -04:00
[email protected] 3699cf07ae Removed some double counts. 2019-06-12 17:40:41 -04:00
[email protected] a0fe1a09e8 Fixed a bunch of errors in GCTest 2019-06-11 16:03:01 -04:00
[email protected] 274118e6b8 Added test for gc alloc count to corelib build. 2019-06-11 15:16:11 -04:00
[email protected] 39ed1bce7b Fixed things in GCTest.cs 2019-06-10 18:29:53 -04:00
[email protected] b6f92c45d2 Added tests for get bytes allocated. 2019-06-10 18:12:58 -04:00
[email protected] 066e0029af Removed unecessary size subtraction; used tlab_next as the end of allocated region in tlab. 2019-06-10 15:18:08 -04:00
[email protected] 0912bc0f6e Recorded allocation when tlabs are cleared. 2019-06-07 14:07:42 -04:00
[email protected] 0cc69fd165 Added counter increments to sgen_try_alloc_obj_nolock 2019-06-06 16:06:31 -04:00
[email protected] 7a75b4d9d5 Added counter increments to sgen_try_alloc_obj_nolock 2019-06-06 15:57:10 -04:00
[email protected] 7514f01302 Removed extra field I added to mono thread; unecessary declaration in mono-gc.h 2019-06-06 15:01:35 -04:00
[email protected] 013eacaf86 Removed macro. 2019-06-06 14:37:52 -04:00
[email protected] 5fc3062411 Increment counter on more allocaiton paths. 2019-06-06 13:56:54 -04:00
[email protected] fd15f967dc Added dummy method to null and boehm gc. 2019-06-05 21:08:07 -04:00
[email protected] f919f3d3db Updated icall to point at the new interface. 2019-06-05 16:32:19 -04:00
[email protected] 20e8a6dab6 Made total bytes allocated go through gc interface. 2019-06-04 17:19:40 -04:00
[email protected] 5761c3f874 Fixed typo in attribute. 2019-06-04 13:44:31 -04:00
[email protected] 223cf0bd19 Removed redundant icall. 2019-06-04 11:52:01 -04:00
[email protected] 54f317467e Added call into threads.c 2019-06-03 16:45:55 -04:00
[email protected] f63f78022c Merged changes from master
Merge branch 'master' of github.com:mono/mono into naricc/allocated_bytes
2019-06-03 15:37:51 -04:00
Alexander Köplinger 098de8b1ee [ci] Remove spaces in pipeline-netcore-runtime.yml
According to docs "names must contain only basic Latin alphabet letters (A-Z, a-z), numbers, and underscores (_)"
2019-06-03 19:56:37 +02:00
dotnet-maestro 369777b246 Update dependencies from https://github.com/dotnet/arcade build 20190602.2
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19302.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19302.2
2019-06-03 15:26:33 +02:00
monojenkins 283261cd1c [csproj] Update project files 2019-06-03 14:36:00 +02:00
Marek Safar eb99fdeb1a Update API 2019-06-03 14:36:00 +02:00
Marek Safar c84dc2ec55 [Mono.Profiler.Log] Add profiled data reader APIs 2019-06-03 14:36:00 +02:00
Katelyn Gadd 888c8b4621 Basic CI test coverage verifying that we can compile msbuild (#14242)
This adds a basic CI pass that attempts to compile the latest revision of msbuild and verifies that it produced an MSBuild.dll.
2019-06-03 12:03:36 +02:00
Rich Lander cab30bcecc Update TPN with Mono entry (#14744)
* Update TPN with Mono entry

* Update THIRD-PARTY-NOTICES.TXT

Add additional notice for Mono

* Update THIRD-PARTY-NOTICES.TXT

Update the Novell MIT-specific license

* Update THIRD-PARTY-NOTICES.TXT

Group various patterns of Mono license together
2019-06-03 09:05:18 +02:00
Jay Krell 018940f1bc Remove W32_UPDATE_LAST_ERROR_RESTORE_POINT that is not used and does not make sense to me, as to when it would be useful, having preserved LastError around many code paths through the years. 2019-06-03 09:04:16 +02:00
Jay Krell c5a628e86f Do not change Win32 lasterror in the first MONO_EXIT_GC_SAFE. 2019-06-03 09:04:16 +02:00
Aleksey Kliger a7578081e1 [sdks] Bump Android NDK, build tools and platform tools versions
Try to match Xamarin.Android master

Build tools and Platform tools: https://github.com/xamarin/xamarin-android/blob/f9f5b6cd120484b13df74e94638e07411d8693fa/Configuration.props#L100-L102

NDK: https://github.com/xamarin/xamarin-android/blob/f9f5b6cd120484b13df74e94638e07411d8693fa/build-tools/scripts/Ndk.targets#L4
2019-06-03 09:02:07 +02:00
Rich Lander 7c6efec792 Create THIRD-PARTY-NOTICES.TXT
TPN for https://github.com/mono/mono/new/master/mcs/class/System.Data/Test
2019-06-03 08:57:09 +02:00
Rich Lander 474f20c5ea Create THIRD-PARTY-NOTICES.TXT
TPN for https://github.com/mono/mono/tree/61559965a188d03456d6f7840a0cdabdf35c2400/mcs/tools/sqlsharp
2019-06-03 08:56:48 +02:00
Marek Safar 33136e3601 Merge pull request #14754 from Dotnet-GitSync-Bot/mirror-merge-10213317
Mirror changes from mono/coreclr
2019-06-03 08:47:04 +02:00
dotnet-maestro 0cab992234 Update dependencies from https://github.com/dotnet/arcade build 20190601.2
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19301.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19301.2
2019-06-03 08:45:59 +02:00
Dan Moseley 0e1b88b8ed Improve fatal err msg (dotnet/coreclr#24390)
* Improve fatal err msg

* Match SO format

* a

* Remove dead define

* More adjustments to ex msg

* And PAL

* Remove special case for SOE

* Remove excess Debug.Assert newline

* Remove excess newline

* typo

* New format

* Remove DebugProvider redundancy

* Adjustments

* Remove preceding newline

* Make other SOE and OOM consistent

* Tidy up assertion msg

* Fix missing newline after inner exception divider

* CR when no inner exception

* ToString never CR terminated

* disable corefx tests temporarily

Signed-off-by: dotnet-bot <[email protected]>
2019-06-02 13:57:10 +00:00
Rich Lander e27cda23e0 Update THIRD-PARTY-NOTICES.TXT
Add usage link
2019-06-01 20:41:40 +02:00
Rich Lander 015560df3d Create THIRD-PARTY-NOTICES.TXT
TPN for https://github.com/mono/mono/blob/0f9bb15622b649db81974057f66669674ea47923/mcs/class/I18N/tools/cvt.sh
2019-06-01 20:41:40 +02:00
Rich Lander 72dfea91df Update THIRD-PARTY-NOTICES.TXT
Add entry for https://github.com/mono/mono/blob/a34c9c79c07156797499b6ed2ce43c5897263b57/mono/benchmark/logic.cs
2019-06-01 20:40:57 +02:00
dotnet-maestro 860cb934ec Update dependencies from https://github.com/dotnet/arcade build 20190531.5
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19281.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19281.5
2019-06-01 20:40:09 +02:00
Zoltan Varga 7e0585fa35 [wasm] Add document with wasm feature requests. 2019-06-01 10:42:46 -05:00
Zoltan Varga b0d2edff27 [arm64] Set a llvm target layout. Assert in llvm if the target layout is not set, the defaults used by 'opt' are not correct. (#14714)
* [arm64] Set a llvm target layout. Assert in llvm if the target layout is not set, the defaults used by 'opt' are not correct.

* Add a llvm target layout for amd64.
2019-06-01 01:33:57 -04:00
Stephen Toub 7294bbc140 Fix FileStream.FlushAsync() to behave like Flush() (dotnet/coreclr#24902)
Flush() behaves like Flush(false) and writes out any buffered data but doesn't P/Invoke to FlushFileBuffers/FSync to flush the OS buffers.

But whereas FlushAsync() is supposed to just be an async equivalent of Flush(), it's actually behaving like Flush(true).  This makes FlushAsync() inconsistent and much more expensive.  (This is separate from FlushAsync not actually being async, which is an impactful problem to be solved separately.)

This changes FlushAsync to behave like Flush()/Flush(false) rather than Flush(true).  If someone wants the FlushFileBuffers/FSync behavior, they can call Flush(true).

Signed-off-by: dotnet-bot <[email protected]>
2019-06-01 07:11:46 +02:00
Alexis Christoforides 7300066faa [MacSDK] Properly handle PATHs with spaces during package post-install (#14735) 2019-05-31 20:49:10 -07:00
Kenneth Pouncey df402845f2 [wasm][bindings] Add support for marshaling DateTime and DateTimeOffset (#14722)
* Add support for marshalling DateTime and DateTimeOffset

* Add type checking to Runtime.GetDateValue

- Update to use clr ToUnixTimeMillisecons and FromUnixTimeMilliseonds to replace manual calculations.
- Moved magic numbers to managed side to address comments left by Katelyn and Jay.
2019-06-01 05:11:59 +02:00
Ryan Lucia 43aeac9e1e Propagate error in mono_file_map_error on posix (#14710) 2019-05-31 17:19:32 -04:00
[email protected] 3f44389aad Merge branch 'master' of github.com:mono/mono into naricc/allocated_bytes 2019-05-31 15:02:08 -04:00
Ryan Lucia 5d088cf0de [coop] Add GC safe transitions around blocking OS API calls (#14612)
If this was not possible due to them being called during runtime initialization, a short comment was left noting the specific reason why.

Fixes #14377

This includes a couple other random fixes I noticed on the way, most notably replacing SEE_MASK_FLAG_DDEWAIT with SEE_MASK_FLAG_NOASYNC as the former is deprecated.
2019-05-31 14:39:22 -04:00
Jo Shields 0f4ac3f13e Bump version to 6.5.0 (#14728) 2019-05-31 12:59:57 -04:00
[email protected] b2b9703239 Made sgen-alloc retrieve stuf out of MonoThreadInfo 2019-05-30 17:16:40 -04:00
[email protected] 1b56a9eb8b Merge branch 'master' of github.com:mono/mono into naricc/allocated_bytes
Merging from master
2019-05-30 15:30:24 -04:00
[email protected] 70ecd9ea56 Commiting changes before I fork the repo. 2019-05-30 14:56:58 -04:00
[email protected] 5115ab0100 Put things in icall-def.h in proper alphabetical order. 2019-05-29 15:34:53 -04:00
[email protected] 1df089428c Moved declartion of GetAllocatedBytes. 2019-05-29 15:10:05 -04:00
Nathan Ricci 766b9f4616 More implementation. 2019-05-28 18:16:09 -04:00
Nathan Ricci bc29c2a6e1 More impelemtation for get allocated bytes. 2019-05-24 15:02:33 -04:00
Nathan Ricci adb22ab81d Added the scaffolding for the call into the runtime. 2019-05-23 17:54:10 -04:00
301 changed files with 3174 additions and 5692 deletions

No files matched your search

+47 -5
View File
@@ -1,18 +1,60 @@
Mono uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Core software.
distributed under licenses different than the Mono 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 Apple
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
-------------------------
Content: https://github.com/mono/mono/blob/435f968102d0820ca65d63e1e741e4130b4d1303/support/ios/net/route.h
License: https://opensource.apple.com/apsl/
+1 -1
View File
@@ -2,7 +2,7 @@
{
"name": "roslyn",
"url": "git://github.com/mono/roslyn.git",
"rev": "13a40eedacc799a78710aba5c8e4b2dcc80a7e61",
"rev": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
"remote-branch": "origin/mono-testing",
"branch": "mono-testing",
"directory": "roslyn"
+4 -10
View File
@@ -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.4.0],
AC_INIT(mono, [6.5.0],
[https://github.com/mono/mono/issues/new])
AC_CONFIG_SRCDIR([README.md])
@@ -2646,8 +2646,6 @@ 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 ***********************************
@@ -5867,8 +5865,8 @@ fi
AC_SUBST(mono_runtime)
AC_SUBST(mono_runtime_wrapper)
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
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
if test $csc_compiler = mcs; then
CSC=$mcs_topdir/class/lib/build/mcs.exe
@@ -6112,10 +6110,6 @@ 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)])
@@ -6765,5 +6759,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
+4 -4
View File
@@ -3,13 +3,13 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19279.5">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19302.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
<Sha>e6a5d5f970bb872451c6310ae34eda31041fb552</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19279.5">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19302.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fb62c6377a6bd163af2a7516260f064498942585</Sha>
<Sha>e6a5d5f970bb872451c6310ae34eda31041fb552</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
+146
View File
@@ -0,0 +1,146 @@
# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1
# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1
$script:loggingCommandPrefix = '##vso['
$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"?
New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }
New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' }
New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' }
New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' }
)
# TODO: BUG: Escape % ???
# TODO: Add test to verify don't need to escape "=".
<########################################
# Private functions.
########################################>
function Format-LoggingCommandData {
[CmdletBinding()]
param([string]$Value, [switch]$Reverse)
if (!$Value) {
return ''
}
if (!$Reverse) {
foreach ($mapping in $script:loggingCommandEscapeMappings) {
$Value = $Value.Replace($mapping.Token, $mapping.Replacement)
}
} else {
for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) {
$mapping = $script:loggingCommandEscapeMappings[$i]
$Value = $Value.Replace($mapping.Replacement, $mapping.Token)
}
}
return $Value
}
function Format-LoggingCommand {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$Area,
[Parameter(Mandatory = $true)]
[string]$Event,
[string]$Data,
[hashtable]$Properties)
# Append the preamble.
[System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder
$null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event)
# Append the properties.
if ($Properties) {
$first = $true
foreach ($key in $Properties.Keys) {
[string]$value = Format-LoggingCommandData $Properties[$key]
if ($value) {
if ($first) {
$null = $sb.Append(' ')
$first = $false
} else {
$null = $sb.Append(';')
}
$null = $sb.Append("$key=$value")
}
}
}
# Append the tail and output the value.
$Data = Format-LoggingCommandData $Data
$sb.Append(']').Append($Data).ToString()
}
function Write-LoggingCommand {
[CmdletBinding(DefaultParameterSetName = 'Parameters')]
param(
[Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
[string]$Area,
[Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
[string]$Event,
[Parameter(ParameterSetName = 'Parameters')]
[string]$Data,
[Parameter(ParameterSetName = 'Parameters')]
[hashtable]$Properties,
[Parameter(Mandatory = $true, ParameterSetName = 'Object')]
$Command,
[switch]$AsOutput)
if ($PSCmdlet.ParameterSetName -eq 'Object') {
Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput
return
}
$command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties
if ($AsOutput) {
$command
} else {
Write-Host $command
}
}
function Write-LogIssue {
[CmdletBinding()]
param(
[ValidateSet('warning', 'error')]
[Parameter(Mandatory = $true)]
[string]$Type,
[string]$Message,
[string]$ErrCode,
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
[switch]$AsOutput)
$command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{
'type' = $Type
'code' = $ErrCode
'sourcepath' = $SourcePath
'linenumber' = $LineNumber
'columnnumber' = $ColumnNumber
}
if ($AsOutput) {
return $command
}
if ($Type -eq 'error') {
$foregroundColor = $host.PrivateData.ErrorForegroundColor
$backgroundColor = $host.PrivateData.ErrorBackgroundColor
if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {
$foregroundColor = [System.ConsoleColor]::Red
$backgroundColor = [System.ConsoleColor]::Black
}
} else {
$foregroundColor = $host.PrivateData.WarningForegroundColor
$backgroundColor = $host.PrivateData.WarningBackgroundColor
if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {
$foregroundColor = [System.ConsoleColor]::Yellow
$backgroundColor = [System.ConsoleColor]::Black
}
}
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
}
+1 -2
View File
@@ -133,9 +133,8 @@ try {
Build
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTaskError -Message $_
ExitWithExitCode 1
}
+81 -22
View File
@@ -92,6 +92,68 @@ function Exec-Process([string]$command, [string]$commandArgs) {
}
}
function Write-PipelineTaskError {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$Message,
[Parameter(Mandatory = $false)]
[string]$Type = 'error',
[string]$ErrCode,
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
[switch]$AsOutput)
if(!$ci) {
if($Type -eq 'error') {
Write-Error $Message
return
}
elseif ($Type -eq 'warning') {
Write-Warning $Message
return
}
}
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
Write-Host $Message
return
}
if(-not $PSBoundParameters.ContainsKey('Type')) {
$PSBoundParameters.Add('Type', 'error')
}
Write-LogIssue @PSBoundParameters
}
function Write-PipelineSetVariable {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[string]$Value,
[switch]$Secret,
[switch]$AsOutput)
if($ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'issecret' = $Secret
} -AsOutput:$AsOutput
}
}
function Write-PipelinePrependPath {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]$Path,
[switch]$AsOutput)
if($ci) {
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
}
}
function InitializeDotNetCli([bool]$install) {
if (Test-Path variable:global:_DotNetInstallDir) {
return $global:_DotNetInstallDir
@@ -134,7 +196,7 @@ function InitializeDotNetCli([bool]$install) {
if ($install) {
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
} else {
Write-Host "Unable to find dotnet with SDK version '$dotnetSdkVersion'" -ForegroundColor Red
Write-PipelineTaskError "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
ExitWithExitCode 1
}
}
@@ -147,12 +209,10 @@ function InitializeDotNetCli([bool]$install) {
# It also ensures that VS msbuild will use the downloaded sdk targets.
$env:PATH = "$dotnetRoot;$env:PATH"
if ($ci) {
# Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
Write-Host "##vso[task.prependpath]$dotnetRoot"
Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]0"
Write-Host "##vso[task.setvariable variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE]1"
}
# Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
Write-PipelinePrependPath -Path $dotnetRoot
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
return $global:_DotNetInstallDir = $dotnetRoot
}
@@ -184,7 +244,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
& $installScript @installParameters
if ($lastExitCode -ne 0) {
Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red
Write-PipelineTaskError -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
ExitWithExitCode $lastExitCode
}
}
@@ -358,7 +418,7 @@ function InitializeBuildTool() {
if ($msbuildEngine -eq "dotnet") {
if (!$dotnetRoot) {
Write-Host "/global.json must specify 'tools.dotnet'." -ForegroundColor Red
Write-PipelineTaskError "/global.json must specify 'tools.dotnet'."
ExitWithExitCode 1
}
@@ -367,13 +427,13 @@ function InitializeBuildTool() {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
} catch {
Write-Host $_ -ForegroundColor Red
Write-PipelineTaskError $_
ExitWithExitCode 1
}
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
} else {
Write-Host "Unexpected value of -msbuildEngine: '$msbuildEngine'." -ForegroundColor Red
Write-PipelineTaskError "Unexpected value of -msbuildEngine: '$msbuildEngine'."
ExitWithExitCode 1
}
@@ -390,7 +450,7 @@ function GetDefaultMSBuildEngine() {
return "dotnet"
}
Write-Host "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." -ForegroundColor Red
Write-PipelineTaskError "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
ExitWithExitCode 1
}
@@ -441,7 +501,7 @@ function InitializeToolset() {
}
if (-not $restore) {
Write-Host "Toolset version $toolsetVersion has not been restored." -ForegroundColor Red
Write-PipelineTaskError "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 1
}
@@ -526,7 +586,7 @@ function MSBuild-Core() {
$exitCode = Exec-Process $buildTool.Path $cmdArgs
if ($exitCode -ne 0) {
Write-Host "Build failed." -ForegroundColor Red
Write-PipelineTaskError "Build failed."
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
if ($buildLog -ne $null) {
@@ -554,6 +614,8 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
return $null
}
. $PSScriptRoot\LoggingCommandFunctions.ps1
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
@@ -569,11 +631,8 @@ Create-Directory $ToolsetDir
Create-Directory $TempDir
Create-Directory $LogDir
if ($ci) {
Write-Host "##vso[task.setvariable variable=Artifacts]$ArtifactsDir"
Write-Host "##vso[task.setvariable variable=Artifacts.Toolset]$ToolsetDir"
Write-Host "##vso[task.setvariable variable=Artifacts.Log]$LogDir"
$env:TEMP = $TempDir
$env:TMP = $TempDir
}
Write-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir
Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
+1 -1
+1 -1
+1 -1
+1 -1
+2 -2
View File
@@ -3,7 +3,7 @@
"dotnet": "3.0.100-preview5-011568"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19279.5",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19279.5"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19302.2",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19302.2"
}
}
+17 -20
View File
@@ -1179,26 +1179,23 @@ 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 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.
\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.
Alternatively, coop and hybrid mode can be enabled at compile time by using the
--enable-cooperative-suspend or --enable-hybrid-suspend flags, respectively,
-2
View File
@@ -14,5 +14,3 @@ MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
MONO_FEATURE_APPLE_X509=1
NO_VTS_TEST=1
PROFILE_TEST_HARNESS_EXCLUDES += BitcodeNotSupported
+1 -1
View File
@@ -39,4 +39,4 @@ PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS
-2
View File
@@ -24,5 +24,3 @@ PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
ENABLE_GSS=1
PROFILE_TEST_HARNESS_EXCLUDES += InetAccess
+9 -3
View File
@@ -41,15 +41,19 @@ $(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
ifdef MOBILE_PROFILE
ifeq ($(PROFILE),monodroid)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
ifeq ($(PROFILE), xammac_net_4_5)
ifeq ($(PROFILE),monotouch_tv)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
ifeq ($(PROFILE),monotouch_watch)
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)
@@ -128,7 +132,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:
$(MAKE) -C ${topdir}/tools/nunit-lite
cd ${topdir}/tools/nunit-lite && $(MAKE)
echo "stamp" >$@
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
@@ -378,3 +382,5 @@ $(xtest_makefrag): $(xtest_response)
endif
.PHONY: patch-nunitlite-appconfig
+1 -1
View File
@@ -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.Data.DataSetExtensions System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data 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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</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</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;FEATURE_TYPECONVERTER</DefineConstants>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</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;FEATURE_TYPECONVERTER</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</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) -d:FEATURE_TYPECONVERTER
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
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.1.0.0")]
[assembly: AssemblyInformationalVersion ("2.1.0.0")]
[assembly: AssemblyFileVersion ("2.1.0.0")]
[assembly: AssemblyVersion ("2.0.0.0")]
[assembly: AssemblyInformationalVersion ("2.0.0.0")]
[assembly: AssemblyFileVersion ("2.0.0.0")]
@@ -113,7 +113,6 @@
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Stubs.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<!--End of common files-->
@@ -170,7 +169,6 @@
<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" />
-4
View File
@@ -39,10 +39,6 @@ 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
-89
View File
@@ -1,89 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#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,18 +764,6 @@
[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))]
@@ -833,15 +821,6 @@
[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))]
@@ -1503,7 +1482,6 @@
[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))]
@@ -2446,9 +2424,6 @@
[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<>))]
@@ -2468,13 +2443,8 @@
[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))]
@@ -2537,7 +2507,6 @@
[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<>))]
@@ -2564,12 +2533,8 @@
[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))]
@@ -2581,5 +2546,4 @@
[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
+7 -18
View File
@@ -1,22 +1,11 @@
#!/bin/sh
# https://github.com/dotnet/standard
STANDARD_REPO=/path/to/standard
# Cloned and Build location of https://github.com/dotnet/standard
STANDARD=/Users/cloned-location-of/dotnet/standard
# https://github.com/dotnet/arcade
ARCARDE_REPO=/path/to/arcade
# 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
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
dotnet $APICOMPAT $NSAPI --impl-dirs "../../lib/net_4_x/Facades/,../../lib/net_4_x/" --exclude-non-browsable
# --exclude-non-browsable ignores `EditorBrowsableAttribute` issues
@@ -1,3 +1,2 @@
Stubs.cs
TypeForwarders.cs
AssemblyInfo.cs
@@ -0,0 +1,33 @@
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
-1
View File
@@ -117,7 +117,6 @@ monodroid_dirs_parallel := \
monodroid_tools_dirs_parallel := \
Mono.Cecil \
Mono.Cecil.Mdb \
Mono.CompilerServices.SymbolWriter \
ICSharpCode.SharpZipLib \
monodoc \
+2 -20
View File
@@ -30,11 +30,6 @@
<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>
@@ -63,25 +58,12 @@
</ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../Mono.Cecil/Mono.Cecil.csproj" />
</ItemGroup>
<!-- @COMMON_PROJECT_REFERENCES@ -->
<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.Close ();
conn.VM_Dispose ();
conn.Close ();
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null, 0);
}
@@ -414,14 +414,6 @@ 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;
@@ -1491,32 +1483,10 @@ 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,41 +4246,6 @@ 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
@@ -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,21 +41,16 @@ 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 (nameof (certificate));
throw new ArgumentNullException("certificate");
return certificate.PublicKey.Key as RSA;
}
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 ();
public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certificate, RSA privateKey)
{
throw new PlatformNotSupportedException();
}
}
}
@@ -1,7 +1 @@
../../../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
-1
View File
@@ -520,7 +520,6 @@
<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" />
@@ -0,0 +1,93 @@
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,7 +24,6 @@ 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
@@ -1,183 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.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,12 +188,6 @@ 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,10 +12,6 @@ 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,8 +78,5 @@ 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,7 +67,6 @@ namespace System.Net.Http
bool unsafeAuthenticatedConnectionSharing;
bool sentRequest;
string connectionGroupName;
TimeSpan? timeout;
bool disposed;
internal MonoWebRequestHandler ()
@@ -369,9 +368,6 @@ 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) {
@@ -533,10 +529,5 @@ namespace System.Net.Http
throw new NotImplementedException ();
}
}
void IMonoHttpClientHandler.SetWebRequestTimeout (TimeSpan timeout)
{
this.timeout = timeout;
}
}
}
@@ -269,9 +269,6 @@ 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,9 +170,6 @@ 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
{
protected private HttpMessageHandler handler;
HttpMessageHandler handler;
readonly bool disposeHandler;
public HttpMessageInvoker (HttpMessageHandler handler)
@@ -34,7 +34,6 @@ namespace System.Net.Http
public class HttpResponseMessage : IDisposable
{
HttpResponseHeaders headers;
HttpResponseHeaders trailingHeaders;
string reasonPhrase;
HttpStatusCode statusCode;
Version version;
@@ -138,14 +137,5 @@ namespace System.Net.Http
return sb.ToString ();
}
public HttpResponseHeaders TrailingHeaders {
get {
if (trailingHeaders == null)
trailingHeaders = new HttpResponseHeaders ();
return trailingHeaders;
}
}
}
}
@@ -374,7 +374,8 @@ namespace MonoTests.System.Net.Http
Assert.AreEqual (response, client.SendAsync (request).Result, "#1");
}
[Test]
[Test]
[Category ("NotWorking")]
public void Send_BaseAddress ()
{
var mh = new HttpMessageHandlerMock ();
@@ -797,6 +798,42 @@ 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,11 +40,6 @@ 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,33 +138,30 @@ namespace System.Reflection.Emit {
private static extern void create_dynamic_method (DynamicMethod m);
private void CreateDynMethod () {
// 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.");
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;
}
create_dynamic_method (this);
ilgen = null;
} finally {
creating = false;
}
create_dynamic_method (this);
}
}
@@ -66,10 +66,8 @@ 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,8 +239,6 @@ Example */
set {
if (headerCell != value) {
headerCell = value;
headerCell.SetDataGridView(DataGridView);
headerCell.SetColumnIndex(Index);
if (DataGridView != null) {
DataGridView.OnColumnHeaderCellChanged(new DataGridViewColumnEventArgs(this));
}
@@ -262,17 +262,5 @@ 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,5 +92,3 @@ 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,21 +120,25 @@ 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;
request.ServicePoint.UpdateClientCertificate (null);
sslStream.Dispose ();
sslStream = null;
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;
}
}
try {
@@ -142,7 +146,6 @@ 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,14 +104,9 @@ namespace System.IO.Compression
{
}
~DeflateStream () => Dispose (false);
protected override void Dispose (bool disposing)
{
if (disposing)
GC.SuppressFinalize (this);
native?.Dispose (disposing);
native.Dispose (disposing);
if (disposing && !disposed) {
disposed = true;
@@ -140,15 +135,12 @@ namespace System.IO.Compression
internal ValueTask<int> ReadAsyncMemory (Memory<byte> destination, CancellationToken cancellationToken)
{
return base.ReadAsync(destination, cancellationToken);
throw new NotImplementedException ();
}
internal int ReadCore (Span<byte> destination)
{
var buffer = new byte [destination.Length];
int count = Read(buffer, 0, buffer.Length);
buffer.AsSpan(0, count).CopyTo(destination);
return count;
throw new NotImplementedException ();
}
public override int Read (byte[] array, int offset, int count)
@@ -183,12 +175,12 @@ namespace System.IO.Compression
internal ValueTask WriteAsyncMemory (ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
{
return base.WriteAsync(source, cancellationToken);
throw new NotImplementedException ();
}
internal void WriteCore (ReadOnlySpan<byte> source)
{
Write (source.ToArray (), 0, source.Length);
throw new NotImplementedException ();
}
public override void Write (byte[] array, int offset, int count)
@@ -388,18 +380,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 && !z_stream.IsInvalid) {
if (z_stream != null) {
z_stream.Dispose();
}
if (data != null && data.IsAllocated) {
if (data.IsAllocated) {
data.Free ();
}
}
+3 -6
View File
@@ -128,10 +128,8 @@ namespace System.IO {
lock (watches) {
data = (DefaultWatcherData) watches [fsw];
if (data != null) {
lock (data.FilesLock) {
data.Enabled = false;
data.DisabledTime = DateTime.UtcNow;
}
data.Enabled = false;
data.DisabledTime = DateTime.UtcNow;
}
}
}
@@ -223,8 +221,7 @@ namespace System.IO {
}
lock (data.FilesLock) {
if (data.Enabled)
IterateAndModifyFilesData (data, directory, dispatch, files);
IterateAndModifyFilesData (data, directory, dispatch, files);
}
}
@@ -0,0 +1,75 @@
//
// 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
}
}
@@ -0,0 +1,33 @@
//
// 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,8 +420,6 @@ namespace System.IO {
}
private void RaiseEvent (Delegate ev, EventArgs arg, EventType evtype)
{
if (disposed)
return;
if (ev == null)
return;
@@ -499,15 +497,11 @@ 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 ();
}
+15 -61
View File
@@ -912,61 +912,20 @@ 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 = new SocketAsyncResult (this, ConnectAsyncCallback, e, SocketOperation.Connect) {
EndPoint = e.RemoteEndPoint
};
pending = BeginSConnect (ares);
ares = (SocketAsyncResult) BeginConnect (e.RemoteEndPoint, ConnectAsyncCallback, e);
} else {
DnsEndPoint dep = (DnsEndPoint)e.RemoteEndPoint;
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);
ares = (SocketAsyncResult) BeginConnect (addresses, dep.Port, ConnectAsyncCallback, e);
}
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);
if (ares.IsCompleted && ares.CompletedSynchronously) {
ares.CheckIfThrowDelayedException ();
return false;
}
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;
@@ -1085,7 +1044,7 @@ namespace System.Net.Sockets
return sockares;
}
static bool BeginMConnect (SocketAsyncResult sockares)
static void BeginMConnect (SocketAsyncResult sockares)
{
Exception exc = null;
@@ -1094,18 +1053,17 @@ namespace System.Net.Sockets
sockares.CurrentAddress++;
sockares.EndPoint = new IPEndPoint (sockares.Addresses [i], sockares.Port);
return BeginSConnect (sockares);
BeginSConnect (sockares);
return;
} catch (Exception e) {
exc = e;
}
}
sockares.Complete (exc, true);
return false;
throw exc;
}
static bool BeginSConnect (SocketAsyncResult sockares)
static void BeginSConnect (SocketAsyncResult sockares)
{
EndPoint remoteEP = sockares.EndPoint;
// Bug #75154: Connect() should not succeed for .Any addresses.
@@ -1113,15 +1071,14 @@ 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 false;
return;
}
sockares.EndPoint = remoteEP = sockares.socket.RemapIPEndPoint (ep);
}
if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily)) {
sockares.Complete (new ArgumentException(SR.net_invalidAddressList), true);
return false;
throw new ArgumentException(SR.net_invalidAddressList);
}
int error = 0;
@@ -1133,10 +1090,8 @@ 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) {
sockares.Complete (new SocketException (error), true);
return false;
}
if (error != 0)
throw new SocketException (error);
}
bool blk = sockares.socket.is_blocking;
@@ -1151,7 +1106,7 @@ namespace System.Net.Sockets
sockares.socket.is_connected = true;
sockares.socket.is_bound = true;
sockares.Complete (true);
return false;
return;
}
if (error != (int) SocketError.InProgress && error != (int) SocketError.WouldBlock) {
@@ -1159,7 +1114,7 @@ namespace System.Net.Sockets
sockares.socket.is_connected = false;
sockares.socket.is_bound = false;
sockares.Complete (new SocketException (error), true);
return false;
return;
}
// continue asynch
@@ -1168,7 +1123,6 @@ 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 (!CompletedSynchronously && AsyncCallback != null) {
if (this.AsyncCallback != null) {
ThreadPool.UnsafeQueueUserWorkItem(state => ((SocketAsyncResult)state).AsyncCallback((SocketAsyncResult)state), this);
}
@@ -64,23 +64,6 @@ 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);
var privateKey = PrivateKey.CreateFromFile (pvk_file).RSA;
certificate = new X509Certificate2 ((X509Certificate2Impl)cert.Impl.CopyWithPrivateKey (privateKey));
cert.PrivateKey = PrivateKey.CreateFromFile (pvk_file).RSA;
certificate = cert;
return certificate;
} catch {
// ignore errors
@@ -110,12 +110,11 @@ 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));
@@ -126,13 +125,7 @@ namespace System.Net
if (count < 0 || (length - offset) < count)
throw new ArgumentOutOfRangeException (nameof (count));
if (TryReadFromBufferedContent (buffer, offset, count, out var result))
return result;
Operation.ThrowIfClosedOrDisposed ();
try
{
try {
return ReadAsync (buffer, offset, count, CancellationToken.None).Result;
} catch (Exception e) {
throw GetException (e);
@@ -406,8 +406,6 @@ 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,15 +184,6 @@ 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];
@@ -381,7 +372,6 @@ 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 ();
@@ -83,18 +83,6 @@ 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 ();
}
}
+4 -4
View File
@@ -409,11 +409,7 @@
<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" />
@@ -868,10 +864,14 @@
<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,9 +110,6 @@ 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,10 +4707,9 @@ namespace MonoTests.System.Net.Sockets
socketArgs.RemoteEndPoint = endPoint;
socketArgs.Completed += (sender, e) => mre.Set ();
if (socket.ConnectAsync (socketArgs))
Assert.IsTrue (mre.WaitOne (1000), "ConnectedAsync timeout");
socket.ConnectAsync (socketArgs);
Assert.AreNotEqual (SocketError.Success, socketArgs.SocketError);
Assert.IsTrue (mre.WaitOne (1000), "ConnectedAsync timeout");
}
[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-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx";
const string EchoServerUrl = "ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx";
ClientWebSocket socket;
MethodInfo headerSetMethod;
@@ -3230,54 +3230,6 @@ 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 {
+5 -5
View File
@@ -29,10 +29,14 @@ 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
@@ -869,17 +873,13 @@ 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,9 +8,3 @@
../../../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 +1,14 @@
#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,8 +1,17 @@
#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
@@ -1 +0,0 @@
System/RemoteExecutorTests.cs
+6 -3
View File
@@ -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,8 +298,11 @@ NO_VTS_TEST = yes
endif
ifndef NO_VTS_TEST
test-local: test-vts
run-test-local: run-test-vts
test: test-vts
run-test: run-test-vts
else
test:
run-test:
endif
EXTRA_DISTFILES += \
@@ -34,36 +34,6 @@ 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
@@ -73,17 +43,7 @@ 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
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;
return data.fill_calendar_data (localeName.ToLowerInvariant (), calendarId);
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -8,7 +8,6 @@ using System.Text;
namespace System.Reflection
{
[Serializable]
partial class MethodBase
{
//
@@ -28,9 +28,9 @@
namespace System.Diagnostics.Tracing
{
public class EventCounter : DiagnosticCounter
public class EventCounter : IDisposable
{
public EventCounter (string name, EventSource eventSource) : base (name, eventSource)
public EventCounter (string name, EventSource eventSource)
{
}
@@ -38,7 +38,7 @@ namespace System.Diagnostics.Tracing
{
}
public void WriteMetric (double value)
public void Dispose ()
{
}
}
@@ -174,10 +174,6 @@ namespace System.Diagnostics.Tracing
{
}
internal void ReportOutOfBandMessage (string msg, bool flush)
{
}
protected void WriteEvent (int eventId)
{
WriteEvent (eventId, new object[] { } );
@@ -54,18 +54,6 @@ namespace System.Diagnostics.Tracing
internal set;
}
public long OSThreadId
{
get;
internal set;
}
public DateTime TimeStamp
{
get;
internal set;
}
public string EventName
{
get;
@@ -134,33 +134,30 @@ namespace System.Reflection.Emit {
private static extern void create_dynamic_method (DynamicMethod m);
private void CreateDynMethod () {
// 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.");
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;
}
create_dynamic_method (this);
ilgen = null;
} finally {
creating = false;
}
create_dynamic_method (this);
}
}
@@ -365,12 +365,4 @@
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);
}
#else
#elif !MONOTOUCH
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;
// 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;
/* 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;
if ((old_state & RefCount_Mask) == RefCount_One)
new_state |= (int) State.Closed;
if (dispose)
@@ -431,11 +431,7 @@ namespace System.Runtime.Remoting.Messaging {
ArrayList ret = null;
if (null != _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));
object[] oret = (object[]) CADSerializer.DeserializeObject (new MemoryStream (_serializedArgs));
ret = new ArrayList (oret);
_serializedArgs = null;
}
@@ -502,11 +498,7 @@ namespace System.Runtime.Remoting.Messaging {
ArrayList ret = null;
if (null != _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));
object[] oret = (object[]) CADSerializer.DeserializeObject (new MemoryStream (_serializedArgs));
ret = new ArrayList (oret);
_serializedArgs = null;
}
@@ -123,10 +123,6 @@ 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,14 +83,12 @@ 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
@@ -111,14 +109,12 @@ 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,11 +294,6 @@ 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,13 +44,10 @@ 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 (xamarin_timezone_get_local_name (), stream);
return BuildFromStream ("Local", stream);
}
}
@@ -71,7 +68,7 @@ namespace System {
}
}
}
[DllImport ("__Internal")]
extern static IntPtr xamarin_timezone_get_names (ref int count);
+3 -13
View File
@@ -919,9 +919,8 @@ 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;
DST_end -= (BaseUtcOffset + rule.DaylightDelta);
}
DST_end -= rule.DaylightDelta;
return (dateTime >= DST_start && dateTime < DST_end);
}
@@ -1216,13 +1215,10 @@ 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) {
@@ -1234,18 +1230,12 @@ namespace System
if (forOffset)
isDst = true;
offset = baseUtcOffset;
if (isUtc || (date >= new DateTime (tStart.Ticks + current.DaylightDelta.Ticks, DateTimeKind.Utc)))
if (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,20,5),
new Date(10,11,50,4),
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,76,5),
new Date(18,7,106,4),
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 = 5;
check = 4;
Assert.AreEqual(check, cal.Eras.Length,
String.Format("D01 {0}.Eras.Length", cal));
cal.Eras[0] = 29;
@@ -507,12 +507,11 @@ public class CalendarTest {
public void TestErasProperty2() {
Assert.AreEqual(1, clcal.Eras.Length, "cn");
Assert.AreEqual(1, tlcal.Eras.Length, "tw");
Assert.AreEqual(3, jlcal.Eras.Length, "jp");
Assert.AreEqual(2, jlcal.Eras.Length, "jp");
Assert.AreEqual(1, klcal.Eras.Length, "kr");
Assert.AreEqual(5, jlcal.Eras [0], "jp.1");
Assert.AreEqual(4, jlcal.Eras [1], "jp.2");
Assert.AreEqual(3, jlcal.Eras [2], "jp.3");
Assert.AreEqual(4, jlcal.Eras [0], "jp.1");
Assert.AreEqual(3, jlcal.Eras [1], "jp.2");
}
[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, 4), "jp1"); // since 1988 (current epoch)
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), 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, 4), "jp2");
Assert.AreEqual (new DateTime (2001, 1, 24), jp.ToDateTime (13, 1, 1, 0, 0, 0, 0), "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, 4), "jp3");
Assert.AreEqual (new DateTime (2002, 2, 12), jp.ToDateTime (14, 1, 1, 0, 0, 0, 0), "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, 4), "jp4");
Assert.AreEqual (new DateTime (2001, 5, 23), jp.ToDateTime (13, 5, 1, 0, 0, 0, 0), "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, 4), "jp5");
Assert.AreEqual (new DateTime (2002, 2, 11), jp.ToDateTime (13, 13, 30, 0, 0, 0, 0), "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, 4), "jp" + i);
Assert.AreEqual (leapYears [i % 19], jp.IsLeapYear (12 + i), "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, 4), "jp" + y + "/" + m);
Assert.AreEqual (d.ContainsKey (y) && d [y] == m, jp.IsLeapMonth (y, m), "jp" + y + "/" + m);
d = new Dictionary<int,int> ();
d [2001] = 5;
@@ -1650,29 +1650,6 @@ 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