├── src
├── System.Web.Compatibility
│ ├── _._
│ ├── NotSupported.Exclude.txt
│ └── System
│ │ └── Web
│ │ └── Routing
│ │ ├── StopRoutingHandler.cs
│ │ └── RequestContext.cs
├── Directory.Build.props
├── System.Text.Formatting.Globalization
│ ├── locales.bin
│ ├── Resources
│ │ └── FormattingData
│ │ │ └── locales.bin
│ └── System.Text.Formatting.Globalization.csproj
├── System.Devices.Gpio
│ └── README.md
├── ALCProxy.TestAssembly
│ ├── ALCProxy.TestAssemblyInterface.csproj
│ └── Program.cs
├── .nuget
│ ├── packages.Windows_NT.config
│ └── packages.Unix.config
├── ALCProxy.Communication
│ ├── ALCProxy.Communication.csproj
│ └── IProxyServer.cs
├── System.IO.FileSystem.Watcher.Polling
│ ├── System.IO.FileSystem.Watcher.Polling.csproj
│ └── System
│ │ └── IO
│ │ ├── PollingFileSystemEventHandler.cs
│ │ ├── PollingFileSystemEventArgs.cs
│ │ ├── FileChange.cs
│ │ └── FileState.cs
├── System.Reflection.Metadata.Cil
│ ├── Visitor
│ │ ├── ICilVisitable.cs
│ │ └── CilVisitorOptions.cs
│ ├── Decoder
│ │ ├── CILInstructionSize.cs
│ │ └── CILTokenType.cs
│ ├── System.Reflection.Metadata.Cil.csproj
│ ├── Instructions
│ │ ├── CilInstructionWithNoValue.cs
│ │ ├── CilBranchInstruction.cs
│ │ ├── CilVariableInstruction.cs
│ │ ├── CilInt16VariableInstruction.cs
│ │ ├── CilInt16BranchInstruction.cs
│ │ ├── CilByteInstruction.cs
│ │ ├── CilInt32Instruction.cs
│ │ ├── CilNumericValueInstruction.cs
│ │ ├── CilInt64Instruction.cs
│ │ ├── CilSingleInstruction.cs
│ │ ├── CilDoubleInstruction.cs
│ │ ├── CilInstructionWithValue.cs
│ │ ├── CilStringInstruction.cs
│ │ └── CilInstruction.cs
│ ├── CilTypeLayout.cs
│ ├── CilEntity.cs
│ └── CilLocal.cs
├── System.Text.Http
│ ├── System
│ │ └── Text
│ │ │ └── Http
│ │ │ └── Parser
│ │ │ ├── Constants.cs
│ │ │ ├── HttpScheme.cs
│ │ │ ├── IHttpHeadersHandler.cs
│ │ │ ├── IHttpResponseLineHandler.cs
│ │ │ ├── IHttpRequestLineHandler.cs
│ │ │ ├── HttpMethod.cs
│ │ │ ├── HttpVersion.cs
│ │ │ ├── IHttpParser.cs
│ │ │ ├── PipelineExtensions.cs
│ │ │ └── RequestRejectionReason.cs
│ └── System.Text.Http.csproj
├── System.Text.Encodings.Web.Utf8
│ ├── UrlDecoder.cs
│ ├── System.Text.Encodings.Web.Utf8.csproj
│ └── Properties
│ │ └── AssemblyInfo.cs
├── System.Buffers.Primitives
│ ├── System
│ │ ├── Buffers
│ │ │ ├── IWritable.cs
│ │ │ ├── IBufferOperation.cs
│ │ │ └── IBufferTransformation.cs
│ │ └── Collections
│ │ │ └── ISequence.cs
│ ├── System.Buffers.Primitives.csproj
│ └── AssemblyInfo.cs
├── ALCProxy.Proxy
│ └── ALCProxy.Proxy.csproj
├── System.Buffers.Experimental
│ ├── System
│ │ ├── Buffers
│ │ │ └── IPipeWritable.cs
│ │ └── Runtime
│ │ │ └── ReferenceCountingSettings.cs
│ └── System.Buffers.Experimental.csproj
├── System.Binary.Base64
│ └── System.Binary.Base64.csproj
├── System.Collections.Sequences
│ └── System.Collections.Sequences.csproj
├── System.Text.Utf8String
│ └── System.Text.Utf8String.csproj
├── System.Text.CaseFolding
│ └── System.Text.CaseFolding.csproj
├── System.Text.Formatting
│ ├── Properties
│ │ └── Assembly.cs
│ ├── System
│ │ ├── Text
│ │ │ └── Formatting
│ │ │ │ ├── Formatters
│ │ │ │ └── FormatterThrowHelper.cs
│ │ │ │ └── ITextBufferWriter.cs
│ │ └── InternalHelpers
│ │ │ └── Precondition.cs
│ └── System.Text.Formatting.csproj
├── System.Reflection.TypeLoader
│ └── src
│ │ ├── System
│ │ └── Reflection
│ │ │ └── TypeLoading
│ │ │ ├── General
│ │ │ └── Ecma
│ │ │ │ ├── InternalManifestResourceInfo.cs
│ │ │ │ ├── EcmaPinnedTypeProvider.cs
│ │ │ │ └── EcmaModifiedTypeProvider.cs
│ │ │ ├── MethodBase
│ │ │ ├── IRoMethodBase.cs
│ │ │ ├── RoLocalVariableInfo.cs
│ │ │ └── RoMethodBody.cs
│ │ │ ├── Types
│ │ │ ├── RoPinnedType.cs
│ │ │ ├── RoWrappedType.cs
│ │ │ ├── RoInstantiationProviderType.cs
│ │ │ └── RoModifiedType.cs
│ │ │ ├── Assemblies
│ │ │ ├── RoExceptionAssembly.cs
│ │ │ └── AssemblyFileInfo.cs
│ │ │ └── CustomAttributes
│ │ │ └── CustomAttributeArguments.cs
│ │ └── FromCoreRt
│ │ └── System
│ │ └── Reflection
│ │ └── Runtime
│ │ └── BindingFlagSupport
│ │ ├── MemberTypeIndex.cs
│ │ └── NameFilter.Ecma.cs
├── System.Text.Primitives
│ ├── System.Text.Primitives.csproj
│ └── System
│ │ ├── Precondition.cs
│ │ └── Text
│ │ ├── Encoders
│ │ └── Unicode
│ │ │ └── Unicode.cs
│ │ └── SymbolTable
│ │ └── SymbolTable_symbol.cs
├── System.Memory.Polyfill
│ └── System.Memory.Polyfill.csproj
├── System.Time
│ ├── System
│ │ └── Meridiem.cs
│ └── System.Time.csproj
├── System.Buffers.ReaderWriter
│ └── System.Buffers.ReaderWriter.csproj
├── Microsoft.Data.Analysis.Interactive
│ └── Microsoft.Data.Analysis.Interactive.csproj
├── System.Security.Cryptography.Asn1.Experimental
│ ├── System
│ │ └── Security
│ │ │ └── Cryptography
│ │ │ └── Asn1
│ │ │ ├── AsnEncodingRules.cs
│ │ │ ├── TagClass.cs
│ │ │ └── PointerMemoryManager.cs
│ └── System.Security.Cryptography.Asn1.Experimental.csproj
├── Microsoft.Data.Analysis
│ ├── ByteDataFrameColumn.cs
│ ├── CharDataFrameColumn.cs
│ ├── Int32DataFrameColumn.cs
│ ├── Int64DataFrameColumn.cs
│ ├── Int16DataFrameColumn.cs
│ ├── SByteDataFrameColumn.cs
│ ├── UInt32DataFrameColumn.cs
│ ├── SingleDataFrameColumn.cs
│ ├── UInt64DataFrameColumn.cs
│ ├── BooleanDataFrameColumn.cs
│ ├── DoubleDataFrameColumn.cs
│ ├── UInt16DataFrameColumn.cs
│ └── DecimalDataFrameColumn.cs
└── Microsoft.Experimental.Collections
│ └── Microsoft.Experimental.Collections.csproj
├── docs
├── specs
│ ├── utf8string.md
│ ├── buffers.md
│ ├── gpio.md
│ ├── formatting.md
│ ├── pipelines.md
│ └── encoding.md
├── img
│ ├── areas.png
│ ├── pipeline.png
│ ├── techempower.png
│ └── ALCContextError.PNG
└── presentations
│ ├── SpanOfT.pdf
│ └── ALCProxy Presentation.pdf
├── tools
├── Key.snk
├── test_key.snk
└── publishing
│ └── publish.proj
├── eng
├── common
│ ├── dotnet-install.cmd
│ ├── CIBuild.cmd
│ ├── init-tools-native.cmd
│ ├── sdl
│ │ ├── packages.config
│ │ └── NuGet.config
│ ├── templates
│ │ ├── steps
│ │ │ ├── run-on-unix.yml
│ │ │ ├── run-on-windows.yml
│ │ │ ├── add-build-to-channel.yml
│ │ │ ├── build-reason.yml
│ │ │ ├── publish-logs.yml
│ │ │ └── run-script-ifequalelse.yml
│ │ └── post-build
│ │ │ └── trigger-subscription.yml
│ ├── internal
│ │ └── Directory.Build.props
│ ├── PSScriptAnalyzerSettings.psd1
│ ├── cibuild.sh
│ ├── msbuild.ps1
│ ├── enable-cross-org-publishing.ps1
│ ├── helixpublish.proj
│ ├── dotnet-install.ps1
│ └── post-build
│ │ └── nuget-validation.ps1
├── Version.Details.xml
└── Versions.props
├── archived_projects
├── src
│ ├── System.Drawing.Graphics
│ │ ├── libgd.dll
│ │ ├── README.txt
│ │ ├── System.Drawing.Graphics.csproj
│ │ └── System
│ │ │ └── Drawing
│ │ │ └── Graphics
│ │ │ └── Interop
│ │ │ ├── OSX
│ │ │ └── Interop.OSX.cs
│ │ │ ├── Linux
│ │ │ └── Interop.Linux.cs
│ │ │ └── Windows
│ │ │ └── Interop.Windows.cs
│ └── System.CommandLine
│ │ ├── System.CommandLine.csproj
│ │ ├── Properties
│ │ └── Assembly.cs
│ │ └── System
│ │ └── CommandLine
│ │ ├── ArgumentCommand_1.cs
│ │ ├── ArgumentSyntaxException.cs
│ │ └── ArgumentCommand.cs
└── tests
│ └── System.Drawing.Graphics.Tests
│ ├── CuteCat.png
│ ├── jpgcat.jpg
│ ├── jpgdog.jpg
│ ├── pngcat.png
│ ├── pngdog.png
│ ├── BlackCat.png
│ ├── SoccerCat.jpg
│ ├── SquareCat.jpg
│ ├── TestPictures
│ ├── CuteCat.png
│ ├── BlackCat.png
│ ├── SoccerCat.jpg
│ └── SquareCat.jpg
│ └── Resources
│ └── Common
│ └── SquareCat.jpg
├── tests
├── System.Reflection.Metadata.Cil.Tests
│ ├── Assemblies
│ │ ├── Demo1.exe
│ │ └── Class1.ilexe
│ └── app.config
├── ALCProxy.TestInterface
│ ├── ALCProxy.TestInterface.csproj
│ └── IExternalClass.cs
├── ALCProxy.TestInterfaceUpdated
│ ├── ALCProxy.TestInterfaceUpdated.csproj
│ └── IExternalClassUpdated.cs
├── Directory.Build.props
├── ALCProxy.TestAssembly
│ └── ALCProxy.TestAssembly.csproj
├── System.Buffers.Primitives.Tests
│ ├── Harness.cs
│ └── MemoryTests.cs
├── ALCProxy.Tests
│ └── ALCProxy.Tests.csproj
├── System.Memory.Polyfill.Tests
│ └── System.Memory.Polyfill.Tests.csproj
├── Microsoft.Data.Analysis.Interactive.Tests
│ └── Microsoft.Data.Analysis.Interactive.Tests.csproj
├── Benchmarks
│ ├── System.Text.Primitives
│ │ ├── Utf8ByteArrayArgument.cs
│ │ └── AsciiDecoding.cs
│ ├── Program.cs
│ ├── Helpers
│ │ └── Connection.cs
│ └── README.md
├── System.Buffers.Experimental.Tests
│ ├── BufferPoolTest.cs
│ ├── BufferReferenceTests.cs
│ └── BufferExtensionsTests.cs
├── System.Text.Utf8String.Tests
│ ├── Bugs.cs
│ └── TestHelper.cs
├── System.Text.Formatting.Globalization.Tests
│ └── BasicTests.cs
├── System.Text.Http.Tests
│ └── StringExtensions.cs
├── System.Web.Compatibility.Tests
│ ├── StopRoutingHandlerTests.cs
│ ├── System.Web.Compatibility.Tests.csproj
│ └── RequestContextTests.cs
├── System.Azure.Experimental.Tests
│ └── System.Azure.Experimental.Tests.csproj
├── System.IO.FileSystem.Watcher.Polling.Tests
│ └── Utility
│ │ ├── TemporaryTestFile.cs
│ │ └── TemporaryTestDirectory.cs
├── System.Security.Cryptography.Asn1.Experimental.Tests
│ └── Reader
│ │ └── Asn1ReaderTests.cs
├── System.Text.Primitives.Tests
│ ├── MemoryProtection
│ │ └── PoisonPagePlacement.cs
│ ├── Encoding
│ │ └── TextEncoderConstants.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Formatting
│ │ └── BooleanTests.cs
├── System.Reflection.TypeLoader.Tests
│ └── src
│ │ └── Tests
│ │ ├── Type
│ │ └── TypeTests.Enum.cs
│ │ ├── TypeLoader
│ │ └── ExternalAssemblies.cs
│ │ └── Module
│ │ └── ModuleProhibitedApiTests.cs
├── System.Text.Encodings.Web.Utf8.Tests
│ └── Properties
│ │ └── AssemblyInfo.cs
├── System.Time.Tests
│ ├── DateCalendarTests.cs
│ ├── DateTimeTests.cs
│ └── DateTimeOffsetTests.cs
├── Microsoft.Experimental.Collections.Tests
│ └── Microsoft.Experimental.Collections.Tests.csproj
├── Microsoft.Data.Analysis.Tests
│ └── Microsoft.Data.Analysis.Tests.csproj
├── System.Text.Formatting.Tests
│ ├── PrimitiveFormattingTests-Guid.cs
│ └── System.Text.Formatting.Tests.csproj
├── System.Collections.Sequences.Tests
│ └── System.Collections.Sequences.Tests.csproj
├── System.Numerics.Experimental.Tests
│ └── System.Numerics.Experimental.Tests.csproj
└── System.Binary.Base64.Tests
│ └── System.Binary.Base64.Tests.csproj
├── samples
├── System.Devices.Gpio.Samples
│ └── README.md
├── NetCoreSample
│ ├── NetCoreLibrary
│ │ ├── project.json
│ │ └── Class1.cs
│ ├── CoreApp
│ │ ├── project.json
│ │ └── Program.cs
│ └── NetCoreXunitTestLibrary
│ │ ├── project.json
│ │ └── UnitTest1.cs
├── LibuvWithNonAllocatingFormatters
│ ├── Properties
│ │ ├── launchSettings.json
│ │ └── AssemblyInfo.cs
│ └── LibuvWithNonAllocatingFormatters.csproj
├── SimpleHttp
│ ├── Server.csproj
│ └── Server.sln
├── SimpleHttpWithTasks
│ ├── ServerWithTasks.csproj
│ └── ServerWithTasks.sln
├── QotdService
│ ├── QotdService.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Program.cs
├── ProxyService
│ ├── ProxyService.csproj
│ ├── Startup.cs
│ └── Program.cs
├── LowAllocationWebServer
│ ├── LowAllocationWebServerLibrary
│ │ └── LowAllocationWebServerLibrary.csproj
│ └── LowAllocationWebServerCore
│ │ ├── LowAllocationWebServerCore.csproj
│ │ └── Program.cs
├── SpanUsage
│ ├── SpanUsage
│ │ └── SpanUsage.Test
│ │ │ └── SpanUsage.Test.csproj
│ └── MemoryUsage
│ │ └── MemoryUsage.Test
│ │ └── MemoryUsage.Test.csproj
└── AzCopyCore
│ └── AzCopyCore.sln
├── README.md
├── CODE-OF-CONDUCT.md
├── global.json
├── NuGet.config
├── SECURITY.md
├── Directory.Build.targets
└── LICENSE
/src/System.Web.Compatibility/_._:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/specs/utf8string.md:
--------------------------------------------------------------------------------
1 | # Utf8String
2 |
3 | Placeholder for Utf8String
--------------------------------------------------------------------------------
/tools/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/tools/Key.snk
--------------------------------------------------------------------------------
/docs/img/areas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/docs/img/areas.png
--------------------------------------------------------------------------------
/tools/test_key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/tools/test_key.snk
--------------------------------------------------------------------------------
/docs/img/pipeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/docs/img/pipeline.png
--------------------------------------------------------------------------------
/docs/img/techempower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/docs/img/techempower.png
--------------------------------------------------------------------------------
/docs/specs/buffers.md:
--------------------------------------------------------------------------------
1 | # Buffers
2 |
3 | Placeholder for BufferReader and BufferWriter
4 |
5 |
6 |
--------------------------------------------------------------------------------
/docs/img/ALCContextError.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/docs/img/ALCContextError.PNG
--------------------------------------------------------------------------------
/src/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/presentations/SpanOfT.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/docs/presentations/SpanOfT.pdf
--------------------------------------------------------------------------------
/eng/common/dotnet-install.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
--------------------------------------------------------------------------------
/docs/presentations/ALCProxy Presentation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/docs/presentations/ALCProxy Presentation.pdf
--------------------------------------------------------------------------------
/docs/specs/gpio.md:
--------------------------------------------------------------------------------
1 | # `System.Devices.Gpio`
2 |
3 | The development of this feature have moved into the [dotnet/iot](http://github.com/dotnet/iot) repo.
4 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting.Globalization/locales.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/src/System.Text.Formatting.Globalization/locales.bin
--------------------------------------------------------------------------------
/archived_projects/src/System.Drawing.Graphics/libgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/src/System.Drawing.Graphics/libgd.dll
--------------------------------------------------------------------------------
/eng/common/CIBuild.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
--------------------------------------------------------------------------------
/eng/common/init-tools-native.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*"
3 | exit /b %ErrorLevel%
--------------------------------------------------------------------------------
/eng/common/sdl/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tests/System.Reflection.Metadata.Cil.Tests/Assemblies/Demo1.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/tests/System.Reflection.Metadata.Cil.Tests/Assemblies/Demo1.exe
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/CuteCat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/CuteCat.png
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/jpgcat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/jpgcat.jpg
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/jpgdog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/jpgdog.jpg
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/pngcat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/pngcat.png
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/pngdog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/pngdog.png
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/BlackCat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/BlackCat.png
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/SoccerCat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/SoccerCat.jpg
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/SquareCat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/SquareCat.jpg
--------------------------------------------------------------------------------
/tests/System.Reflection.Metadata.Cil.Tests/Assemblies/Class1.ilexe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/tests/System.Reflection.Metadata.Cil.Tests/Assemblies/Class1.ilexe
--------------------------------------------------------------------------------
/src/System.Devices.Gpio/README.md:
--------------------------------------------------------------------------------
1 | # System.Device.Gpio has moved!
2 |
3 | System.Device.Gpio source code and development has moved to the [dotnet/iot](http://github.com/dotnet/iot) repo.
4 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/run-on-unix.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | agentOs: ''
3 | steps: []
4 |
5 | steps:
6 | - ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
7 | - ${{ parameters.steps }}
8 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/run-on-windows.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | agentOs: ''
3 | steps: []
4 |
5 | steps:
6 | - ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
7 | - ${{ parameters.steps }}
8 |
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/CuteCat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/CuteCat.png
--------------------------------------------------------------------------------
/src/System.Text.Formatting.Globalization/Resources/FormattingData/locales.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/src/System.Text.Formatting.Globalization/Resources/FormattingData/locales.bin
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/BlackCat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/BlackCat.png
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/SoccerCat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/SoccerCat.jpg
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/SquareCat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/TestPictures/SquareCat.jpg
--------------------------------------------------------------------------------
/samples/System.Devices.Gpio.Samples/README.md:
--------------------------------------------------------------------------------
1 | # System.Device.Gpio samples have moved!
2 |
3 | System.Device.Gpio samples have moved to the samples folder on the [dotnet/iot](http://github.com/dotnet/iot) repo.
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Hello, this repository is now archived.
2 |
3 | Going forward, the .NET team is using https://github.com/dotnet/machinelearning for Microsoft.Data.* and https://github.com/dotnet/runtimelab for experiments.
4 |
--------------------------------------------------------------------------------
/archived_projects/tests/System.Drawing.Graphics.Tests/Resources/Common/SquareCat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/corefxlab/HEAD/archived_projects/tests/System.Drawing.Graphics.Tests/Resources/Common/SquareCat.jpg
--------------------------------------------------------------------------------
/samples/NetCoreSample/NetCoreLibrary/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "supports": {
3 | },
4 | "dependencies": {
5 | "NETStandard.Library": "1.6.1"
6 | },
7 | "frameworks": {
8 | "netstandard1.5": { }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/samples/LibuvWithNonAllocatingFormatters/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "LibuvWithNonAllocatingFormatters": {
4 | "commandName": "Project",
5 | "commandLineArgs": "/ip:127.0.0.1:5000"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/ALCProxy.TestAssembly/ALCProxy.TestAssemblyInterface.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.0
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/eng/common/internal/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tests/ALCProxy.TestInterface/ALCProxy.TestInterface.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Library
4 | netcoreapp3.0
5 | 8.0
6 |
7 |
--------------------------------------------------------------------------------
/CODE-OF-CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | This project has adopted the code of conduct defined by the Contributor Covenant
4 | to clarify expected behavior in our community.
5 |
6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
7 |
--------------------------------------------------------------------------------
/tests/ALCProxy.TestInterfaceUpdated/ALCProxy.TestInterfaceUpdated.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Library
4 | netcoreapp3.0
5 | 8.0
6 |
7 |
--------------------------------------------------------------------------------
/samples/SimpleHttp/Server.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.0
6 | true
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/NetCoreSample/CoreApp/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.App": "1.0.0"
4 | },
5 | "runtimes": {
6 | "win7-x64": { },
7 | "ubuntu.14.04-x64": { },
8 | "osx.10.10-x64": { }
9 | },
10 | "frameworks": {
11 | "netcoreapp1.0": { }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
5 |
6 |
7 | $(RepositoryEngineeringDir)Tests.ruleset
8 |
9 |
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "tools": {
3 | "dotnet": "5.0.100",
4 | "runtimes": {
5 | "dotnet": [
6 | "3.0.0",
7 | "3.1.5"
8 | ]
9 | }
10 | },
11 | "msbuild-sdks": {
12 | "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21058.3",
13 | "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21058.3"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/.nuget/packages.Windows_NT.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/SimpleHttpWithTasks/ServerWithTasks.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.0
6 | true
7 | Full
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/QotdService/QotdService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp2.1
4 | Exe
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/archived_projects/src/System.CommandLine/System.CommandLine.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | CLI commandline command parsing
4 | netstandard1.5
5 | Command line parsing support corefxlab
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/ALCProxy.Communication/ALCProxy.Communication.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Communication layer of ALCProxy API, use this directly if making different versions of the Client/Server setup for ALCProxy.Proxy
4 | netcoreapp3.0
5 | 8.0
6 |
7 |
8 |
--------------------------------------------------------------------------------
/docs/specs/formatting.md:
--------------------------------------------------------------------------------
1 | # Formatting
2 |
3 | * (pri 0) fast path formatting APIs for default and hex formats and for UTF8
4 | * (pri 0) rearrange TryFormat parameters to match TryParse order
5 | * (pri 0) performance tests and improvement
6 | * (pri 2) support ASCII
7 | * (pri 2) do API cleanup (e.g. rename formattingData to encodingData)
8 | * (pri 2) clean up code
9 | * (pri 2) full test coverage
10 |
11 |
--------------------------------------------------------------------------------
/src/System.IO.FileSystem.Watcher.Polling/System.IO.FileSystem.Watcher.Polling.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Polling file system watcher
4 | netcoreapp2.1
5 | true
6 | .NET Core FileSystemWatcher Polling corefxlab
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/ProxyService/ProxyService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.0
6 | Full
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/System.IO.FileSystem.Watcher.Polling/System/IO/PollingFileSystemEventHandler.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.IO
6 | {
7 | public delegate void PollingFileSystemEventHandler(object sender, PollingFileSystemEventArgs e);
8 | }
9 |
--------------------------------------------------------------------------------
/src/ALCProxy.TestAssembly/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 |
5 | namespace ALCProxy.TestAssembly
6 | {
7 | public interface IExternalClass
8 | {
9 | void PrintToConsole();
10 | string GetCurrentContext();
11 | int GetUserParameter(int a);
12 | IEnumerable PassGenericObjects(IDictionary a);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/samples/NetCoreSample/NetCoreXunitTestLibrary/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.App": "1.0.0",
4 | "xunit": "2.1.0",
5 | "xunit.console.netcore": "1.0.2-prerelease-00120",
6 | "xunit.runner.utility": "2.1.0"
7 | },
8 | "frameworks": {
9 | "netcoreapp1.0": {
10 | "imports": ["dnxcore50", "portable-net451+win81"]
11 | }
12 | },
13 | "runtimes": {
14 | "win7-x64": { }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Visitor/ICilVisitable.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Metadata.Cil.Visitor
6 | {
7 | public interface ICilVisitable
8 | {
9 | void Accept(ICilVisitor visitor);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/Constants.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser.Internal
6 | {
7 | internal static class Constants
8 | {
9 | public const int MaxExceptionDetailSize = 128;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/HttpScheme.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | internal enum HttpScheme
8 | {
9 | Unknown = -1,
10 | Http = 0,
11 | Https = 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/System.Text.Encodings.Web.Utf8/UrlDecoder.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Encodings.Web.Utf8
6 | {
7 | public abstract class UrlDecoder
8 | {
9 | public static Utf8UriDecoder Utf8 { get; } = new Utf8UriDecoder();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/System.Buffers.Primitives/System/Buffers/IWritable.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Buffers
6 | {
7 | public interface IWritable
8 | {
9 | bool TryWrite(Span buffer, out int written, StandardFormat format = default);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/IHttpHeadersHandler.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | public interface IHttpHeadersHandler
8 | {
9 | void OnHeader(ReadOnlySpan name, ReadOnlySpan value);
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/ALCProxy.TestAssembly/ALCProxy.TestAssembly.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Library
4 | netcoreapp3.0
5 | 8.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/eng/common/sdl/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/.nuget/packages.Unix.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/ALCProxy.Proxy/ALCProxy.Proxy.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Main surface area of ALCProxy API, use this to create proxies across AssemblyLoadContexts
4 | netcoreapp3.0
5 | 8.0
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/System.Buffers.Primitives.Tests/Harness.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 |
7 | static class Tester
8 | {
9 | public static void CleanUpMemory()
10 | {
11 | GC.Collect();
12 | GC.WaitForPendingFinalizers();
13 | GC.Collect();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/samples/LowAllocationWebServer/LowAllocationWebServerLibrary/LowAllocationWebServerLibrary.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp2.0
4 | True
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/System.Buffers.Experimental/System/Buffers/IPipeWritable.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.IO.Pipelines;
6 | using System.Threading.Tasks;
7 |
8 | namespace System.Buffers
9 | {
10 | public interface IPipeWritable
11 | {
12 | Task WriteAsync(PipeWriter writer);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/IHttpResponseLineHandler.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | public interface IHttpResponseLineHandler
8 | {
9 | void OnStatusLine(Http.Version version, ushort status, ReadOnlySpan reason);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/System.Buffers.Primitives/System/Buffers/IBufferOperation.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Buffers.Operations
6 | {
7 | public interface IBufferOperation
8 | {
9 | OperationStatus Execute(ReadOnlySpan input, Span output, out int consumed, out int written);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/System.Buffers.Primitives/System/Buffers/IBufferTransformation.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Buffers.Operations
6 | {
7 | public interface IBufferTransformation : IBufferOperation
8 | {
9 | OperationStatus Transform(Span buffer, int dataLength, out int written);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tests/System.Reflection.Metadata.Cil.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/add-build-to-channel.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | ChannelId: 0
3 |
4 | steps:
5 | - task: PowerShell@2
6 | displayName: Add Build to Channel
7 | inputs:
8 | filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
9 | arguments: -BuildId $(BARBuildId)
10 | -ChannelId ${{ parameters.ChannelId }}
11 | -MaestroApiAccessToken $(MaestroApiAccessToken)
12 | -MaestroApiEndPoint $(MaestroApiEndPoint)
13 | -MaestroApiVersion $(MaestroApiVersion)
14 |
--------------------------------------------------------------------------------
/eng/common/templates/post-build/trigger-subscription.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | ChannelId: 0
3 |
4 | steps:
5 | - task: PowerShell@2
6 | displayName: Triggering subscriptions
7 | inputs:
8 | filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1
9 | arguments: -SourceRepo $(Build.Repository.Uri)
10 | -ChannelId ${{ parameters.ChannelId }}
11 | -MaestroApiAccessToken $(MaestroAccessToken)
12 | -MaestroApiEndPoint $(MaestroApiEndPoint)
13 | -MaestroApiVersion $(MaestroApiVersion)
14 |
--------------------------------------------------------------------------------
/src/System.Binary.Base64/System.Binary.Base64.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Non-allocating Base64 encoder and decoded
4 | netstandard2.0
5 | True
6 | .NET non-allocating Base64 encoder and decoder
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/System.Collections.Sequences/System.Collections.Sequences.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Non-allocating collections
4 | netstandard2.0
5 | true
6 | collections, non-allocating, corefxlab
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/eng/common/PSScriptAnalyzerSettings.psd1:
--------------------------------------------------------------------------------
1 | @{
2 | IncludeRules=@('PSAvoidUsingCmdletAliases',
3 | 'PSAvoidUsingWMICmdlet',
4 | 'PSAvoidUsingPositionalParameters',
5 | 'PSAvoidUsingInvokeExpression',
6 | 'PSUseDeclaredVarsMoreThanAssignments',
7 | 'PSUseCmdletCorrectly',
8 | 'PSStandardDSCFunctionsInResource',
9 | 'PSUseIdenticalMandatoryParametersForDSC',
10 | 'PSUseIdenticalParametersForDSC')
11 | }
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Decoder/CILInstructionSize.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Metadata.Cil.Decoder
6 | {
7 | public enum CilInstructionSize
8 | {
9 | Byte = 1,
10 | Int16 = 2,
11 | Int32 = 4,
12 | Int64 = 8,
13 | Single = 4,
14 | Double = 8,
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/samples/LibuvWithNonAllocatingFormatters/LibuvWithNonAllocatingFormatters.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp2.1
4 | true
5 | Exe
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/NetCoreSample/NetCoreLibrary/Class1.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Text;
9 |
10 | namespace NetCoreLibrary
11 | {
12 | public class Class1
13 | {
14 | public static string SayHello()
15 | {
16 | return "Hello";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/System.Reflection.Metadata.Cil.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | .NET Core Metadata Reader
4 | netstandard2.0
5 | .NET metadata reader corefxlab
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/System.Text.Encodings.Web.Utf8/System.Text.Encodings.Web.Utf8.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Provides types for encoding and escaping strings for use in JavaScript, HyperText Markup Language (HTML), and uniform resource locators (URL).
4 | netstandard2.0
5 | Encoding;Decoding
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/System.Buffers.Primitives.Tests/MemoryTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 | using Xunit;
5 |
6 | namespace System.Buffers.Tests
7 | {
8 | public class BufferHandleTests
9 | {
10 | [Fact]
11 | public void MemoryHandleFreeUninitialized()
12 | {
13 | var handle = default(MemoryHandle);
14 | handle.Dispose();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/System.IO.FileSystem.Watcher.Polling/System/IO/PollingFileSystemEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.IO
6 | {
7 | public class PollingFileSystemEventArgs : EventArgs
8 | {
9 | public PollingFileSystemEventArgs(FileChange[] changes)
10 | {
11 | Changes = changes;
12 | }
13 |
14 | public FileChange[] Changes { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting.Globalization/System.Text.Formatting.Globalization.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | A formatting library for pl-PL
4 | netstandard2.0
5 | pl PL formatting globalization corefxlab
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/IHttpRequestLineHandler.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | public interface IHttpRequestLineHandler
8 | {
9 | void OnStartLine(Http.Method method, Http.Version version, ReadOnlySpan target, ReadOnlySpan path, ReadOnlySpan query, ReadOnlySpan customMethod, bool pathEncoded);
10 | }
11 | }
--------------------------------------------------------------------------------
/src/System.Text.Utf8String/System.Text.Utf8String.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Efficient UTF-8 String Manipulation and Storage.
4 | Microsoft Corporation, All rights reserved.
5 | netstandard2.0
6 | true
7 | .NET UTF-8 String
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/archived_projects/src/System.Drawing.Graphics/README.txt:
--------------------------------------------------------------------------------
1 | Instructions for building LibGD binaries for Windows
2 |
3 | Clone the source from here: https://github.com/libgd/libgd
4 | Open the VS2013 x64 Native Tools Command Prompt. 2012 will *not* work.
5 | Change to the gd-libgd folder.
6 | git branch gd-2.1.1 2912c0a2e0a246318f41bf1997f34ce1dc3e5e42
7 | git checkoutgd-2.1.1
8 | git clone https://github.com/imazen/gd-win-dependencies into the folder.
9 | Run
10 | nmake /f windows/Makefile.vc all
11 | nmake /f windows/Makefile.vc check
12 |
13 | Before rebuilding, run:
14 | nmake /f windows/Makefile.vc clean
--------------------------------------------------------------------------------
/tests/ALCProxy.TestInterface/IExternalClass.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Collections.Generic;
6 |
7 | namespace ALCProxy.TestInterface
8 | {
9 | public interface IExternalClass
10 | {
11 | void PrintToConsole();
12 | string GetCurrentContext();
13 | int GetUserParameter(int a);
14 | IList PassGenericObjects(IDictionary a);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/eng/common/cibuild.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | source="${BASH_SOURCE[0]}"
4 |
5 | # resolve $SOURCE until the file is no longer a symlink
6 | while [[ -h $source ]]; do
7 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
8 | source="$(readlink "$source")"
9 |
10 | # if $source was a relative symlink, we need to resolve it relative to the path where
11 | # the symlink file was located
12 | [[ $source != /* ]] && source="$scriptroot/$source"
13 | done
14 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
15 |
16 | . "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
--------------------------------------------------------------------------------
/eng/common/templates/steps/build-reason.yml:
--------------------------------------------------------------------------------
1 | # build-reason.yml
2 | # Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons
3 | # to include steps (',' separated).
4 | parameters:
5 | conditions: ''
6 | steps: []
7 |
8 | steps:
9 | - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}:
10 | - ${{ parameters.steps }}
11 | - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}:
12 | - ${{ parameters.steps }}
13 |
--------------------------------------------------------------------------------
/src/System.Text.CaseFolding/System.Text.CaseFolding.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Unicode Case Folding.
4 | Microsoft Corporation, All rights reserved.
5 | netcoreapp3.0
6 | true
7 | .NET Unicode Folding String
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/eng/common/msbuild.ps1:
--------------------------------------------------------------------------------
1 | [CmdletBinding(PositionalBinding=$false)]
2 | Param(
3 | [string] $verbosity = 'minimal',
4 | [bool] $warnAsError = $true,
5 | [bool] $nodeReuse = $true,
6 | [switch] $ci,
7 | [switch] $prepareMachine,
8 | [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
9 | )
10 |
11 | . $PSScriptRoot\tools.ps1
12 |
13 | try {
14 | if ($ci) {
15 | $nodeReuse = $false
16 | }
17 |
18 | MSBuild @extraArgs
19 | }
20 | catch {
21 | Write-Host $_.ScriptStackTrace
22 | Write-PipelineTelemetryError -Category 'Build' -Message $_
23 | ExitWithExitCode 1
24 | }
25 |
26 | ExitWithExitCode 0
--------------------------------------------------------------------------------
/src/System.Text.Http/System.Text.Http.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Non-allocating HTTP parser
4 | netstandard2.0
5 | HTTP parser parsing .NET non-allocating corefxlab
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/System.Buffers.Experimental/System/Runtime/ReferenceCountingSettings.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Runtime
6 | {
7 | public enum ReferenceCountingMethod
8 | {
9 | Interlocked,
10 | ReferenceCounter,
11 | None
12 | };
13 |
14 | public class ReferenceCountingSettings
15 | {
16 | public static ReferenceCountingMethod OwnedMemory = ReferenceCountingMethod.Interlocked;
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/ALCProxy.Tests/ALCProxy.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 | 8.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/System.Memory.Polyfill.Tests/System.Memory.Polyfill.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/NetCoreSample/NetCoreXunitTestLibrary/UnitTest1.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Text;
9 | using Xunit;
10 |
11 | namespace NetCoreXunitTestLibrary
12 | {
13 | public class UnitTest1
14 | {
15 | [Fact]
16 | public void Test1()
17 | {
18 | Assert.Equal("Hello", NetCoreLibrary.Class1.SayHello());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/Microsoft.Data.Analysis.Interactive.Tests/Microsoft.Data.Analysis.Interactive.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.1
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/eng/common/enable-cross-org-publishing.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | [string] $token
3 | )
4 |
5 |
6 | . $PSScriptRoot\pipeline-logging-functions.ps1
7 |
8 | # Write-PipelineSetVariable will no-op if a variable named $ci is not defined
9 | # Since this script is only ever called in AzDO builds, just universally set it
10 | $ci = $true
11 |
12 | Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false
13 | Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false
14 |
--------------------------------------------------------------------------------
/tests/ALCProxy.TestInterfaceUpdated/IExternalClassUpdated.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Collections.Generic;
6 |
7 | namespace ALCProxy.TestInterfaceUpdated
8 | {
9 | public interface IExternalClass
10 | {
11 | void PrintToConsole();
12 | string GetCurrentContext();
13 | int GetUserParameter(int a);
14 | IList PassGenericObjects(IDictionary a);
15 | void AdditionalUpdateMethod();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/System.Buffers.Primitives/System.Buffers.Primitives.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Slices of arrays and buffers
4 | netstandard2.0
5 | true
6 | Slice Span Slices Spans
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting/Properties/Assembly.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | [assembly: InternalsVisibleTo("System.Text.Formatting.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")]
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/HttpMethod.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | public static partial class Http
8 | {
9 | public enum Method : byte
10 | {
11 | Get,
12 | Put,
13 | Delete,
14 | Post,
15 | Head,
16 | Trace,
17 | Patch,
18 | Connect,
19 | Options,
20 |
21 | Custom,
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/HttpVersion.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | public static partial class Http
8 | {
9 | // TODO: this should be renamed to HttpVersion (or something like that). "Version" conflicts with type in System namespace
10 | public enum Version
11 | {
12 | Unknown = -1,
13 | Http10 = 0,
14 | Http11 = 1,
15 | Http20 = 2,
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/archived_projects/src/System.CommandLine/Properties/Assembly.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | [assembly: InternalsVisibleTo("System.CommandLine.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")]
--------------------------------------------------------------------------------
/samples/NetCoreSample/CoreApp/Program.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.IO;
8 | using System.Text;
9 |
10 | namespace coreApp
11 | {
12 | public class Program
13 | {
14 | static void Main(string[] args)
15 | {
16 | Console.WriteLine($"{NetCoreLibrary.Class1.SayHello()} world");
17 | Console.WriteLine("Press enter to continue");
18 | Console.ReadLine();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/samples/SpanUsage/SpanUsage/SpanUsage.Test/SpanUsage.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/samples/SpanUsage/MemoryUsage/MemoryUsage.Test/MemoryUsage.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/tests/Benchmarks/System.Text.Primitives/Utf8ByteArrayArgument.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 |
4 | namespace Benchmarks.System.Text.Primitives
5 | {
6 | public class Utf8ByteArrayArgument
7 | {
8 | public byte[] Bytes { get; }
9 |
10 | public string Text { get; }
11 |
12 | public Utf8ByteArrayArgument(string text)
13 | {
14 | Text = text;
15 | Bytes = Encoding.UTF8.GetBytes(text);
16 | }
17 |
18 | public ReadOnlySpan CreateSpan() => new ReadOnlySpan(Bytes);
19 |
20 | public override string ToString() => Text; // will be used by BenchmarkDotNet to print human friendly output in the results
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/System.Buffers.Experimental.Tests/BufferPoolTest.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Buffers.Native;
6 | using Xunit;
7 |
8 | namespace System.Buffers.Tests
9 | {
10 | public class NativeBufferPoolTests
11 | {
12 | [Fact]
13 | public void BasicsWork() {
14 | var pool = NativeMemoryPool.Shared;
15 | var buffer = pool.Rent(10);
16 | buffer.Dispose();
17 | buffer = pool.Rent(10);
18 | buffer.Dispose();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/samples/LowAllocationWebServer/LowAllocationWebServerCore/LowAllocationWebServerCore.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Exe
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/archived_projects/src/System.CommandLine/System/CommandLine/ArgumentCommand_1.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.CommandLine
6 | {
7 | public sealed class ArgumentCommand : ArgumentCommand
8 | {
9 | internal ArgumentCommand(string name, T value)
10 | : base(name)
11 | {
12 | Value = value;
13 | }
14 |
15 | public new T Value { get; private set; }
16 |
17 | internal override object GetValue()
18 | {
19 | return Value;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/tests/System.Text.Utf8String.Tests/Bugs.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System.Text.Utf8.Tests
8 | {
9 | public class BugTests
10 | {
11 | [Fact]
12 | public void Bug869DoesNotRepro()
13 | {
14 | var bytes = new byte[] { 0xF0, 0xA4, 0xAD, 0xA2 };
15 | var utf8String = new Utf8String(bytes);
16 | var str = "𤭢";
17 | var strFromUtf8 = utf8String.ToString();
18 |
19 | Assert.Equal(str, strFromUtf8);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Visitor/CilVisitorOptions.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Metadata.Cil.Visitor
6 | {
7 | public struct CilVisitorOptions
8 | {
9 | private readonly bool _showBytes;
10 |
11 | public CilVisitorOptions(bool showBytes)
12 | {
13 | _showBytes = showBytes;
14 | }
15 |
16 | public bool ShowBytes
17 | {
18 | get
19 | {
20 | return _showBytes;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/docs/specs/pipelines.md:
--------------------------------------------------------------------------------
1 | # System.IO.Pipelines
2 |
3 | * Leverages the primitives ([Span\](span.md) and [Memory\](memory.md)) and
4 | low-allocation APIs.
5 | * Provides an efficient programming model while freeing the developers from
6 | having to manage buffers.
7 | * A *pipeline* is like a `Stream` that pushes data to you rather than having you
8 | pull. One chunk of code feeds data into a pipeline, and another chunk of code
9 | awaits data to pull from the pipeline.
10 | * When writing to a pipeline, the caller allocates memory from the pipeline
11 | directly.
12 | * Pipelines formalize transferring ownership of buffers so that the readers can
13 | flow buffers up the stack without copying.
14 | * Supports moving data without copying.
15 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/General/Ecma/InternalManifestResourceInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 |
7 | namespace System.Reflection.TypeLoading.Ecma
8 | {
9 | internal unsafe struct InternalManifestResourceInfo
10 | {
11 | public bool Found;
12 | public string FileName;
13 | public Assembly ReferencedAssembly;
14 | public byte* PointerToResource;
15 | public uint SizeOfResource;
16 | public ResourceLocation ResourceLocation;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/System.Text.Primitives/System.Text.Primitives.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Efficient parsing, formatting, and encoding APIs
4 | Microsoft Corporation, All rights reserved.
5 | netstandard2.0
6 | true
7 | .NET formatting parsing encoding UTF8
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/archived_projects/src/System.Drawing.Graphics/System.Drawing.Graphics.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | CLI commandline command parsing
4 | netstandard1.5
5 | true
6 | Command line parsing support corefxlab
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/Benchmarks/Program.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using BenchmarkDotNet.Running;
6 |
7 | namespace Benchmarks
8 | {
9 | public class Program
10 | {
11 | ///
12 | /// execute dotnet run -c Release and choose the benchmarks you want to run
13 | /// or dotnet run -- --help to learn more about available command line arguments
14 | ///
15 | public static void Main(string[] args)
16 | => BenchmarkSwitcher
17 | .FromAssembly(typeof(Program).Assembly)
18 | .Run(args);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/archived_projects/src/System.CommandLine/System/CommandLine/ArgumentSyntaxException.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.CommandLine
6 | {
7 | public sealed class ArgumentSyntaxException : Exception
8 | {
9 | public ArgumentSyntaxException()
10 | {
11 | }
12 |
13 | public ArgumentSyntaxException(string message)
14 | : base(message)
15 | {
16 | }
17 |
18 | public ArgumentSyntaxException(string message, Exception innerException)
19 | : base(message, innerException)
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/System.Memory.Polyfill/System.Memory.Polyfill.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Adapters for Span APIs
4 | netstandard2.0;netcoreapp2.1
5 | Span Memory Adapter
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/System.Text.Formatting.Globalization.Tests/BasicTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System.Text.Formatting.Globalization.Tests
8 | {
9 | public class NonInvariantCultureTests
10 | {
11 | [Fact]
12 | public void CustomCulture()
13 | {
14 | var sb = new StringFormatter();
15 | sb.SymbolTable = EncodingProvider.CreateEncoding("pl-PL");
16 |
17 | sb.Append(-10000, 'N');
18 | Assert.Equal("-10\u00A0000,00", sb.ToString()); // \u00A0 is a space group separator
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/System.Time/System/Meridiem.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System
6 | {
7 | ///
8 | /// Provides an enumeration of AM or PM to support 12-hour clock values in the type.
9 | ///
10 | ///
11 | /// Though commonly used in English, these abbreviations derive from Latin.
12 | /// AM is an abbreviation for "Ante Meridiem", meaning "before mid-day".
13 | /// PM is an abbreviation for "Post Meridiem", meaning "after mid-day".
14 | ///
15 | public enum Meridiem
16 | {
17 | AM,
18 | PM
19 | }
20 | }
--------------------------------------------------------------------------------
/tests/System.Text.Http.Tests/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser.Tests
6 | {
7 | public static class StringExtensions
8 | {
9 | public static string EscapeNonPrintable(this string s)
10 | {
11 | var ellipsis = s.Length > 128
12 | ? "..."
13 | : string.Empty;
14 | return s.Substring(0, Math.Min(128, s.Length))
15 | .Replace("\r", @"\x0D")
16 | .Replace("\n", @"\x0A")
17 | .Replace("\0", @"\x00")
18 | + ellipsis;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/tests/System.Web.Compatibility.Tests/StopRoutingHandlerTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Web.Routing;
6 | using Xunit;
7 |
8 | namespace System.Web.Compatibility.Tests
9 | {
10 | public class StopRoutingHandlerTests
11 | {
12 | [Fact]
13 | public void StopRoutingHandlerDefault()
14 | {
15 | StopRoutingHandler srh = new StopRoutingHandler();
16 |
17 | IRouteHandler rh = srh as IRouteHandler;
18 |
19 | Assert.NotNull(rh);
20 | Assert.Throws(() => rh.GetHttpHandler(null));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.IO.FileSystem.Watcher.Polling/System/IO/FileChange.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 |
7 | namespace System.IO
8 | {
9 | public struct FileChange
10 | {
11 | internal FileChange(string directory, string path, WatcherChangeTypes type)
12 | {
13 | Debug.Assert(path != null);
14 | Directory = directory;
15 | Name = path;
16 | ChangeType = type;
17 | }
18 |
19 | public string Directory { get; }
20 | public string Name { get; }
21 | public WatcherChangeTypes ChangeType { get; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/IHttpParser.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Buffers;
6 |
7 | namespace System.Text.Http.Parser
8 | {
9 | public interface IHttpParser
10 | {
11 | bool ParseRequestLine(T handler, in ReadOnlySequence buffer, out SequencePosition consumed, out SequencePosition examined) where T : IHttpRequestLineHandler;
12 |
13 | bool ParseHeaders(T handler, in ReadOnlySequence buffer, out SequencePosition consumed, out SequencePosition examined, out int consumedBytes) where T : IHttpHeadersHandler;
14 |
15 | void Reset();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInstructionWithNoValue.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilInstructionWithNoValue :CilInstruction, ICilVisitable
11 | {
12 | internal CilInstructionWithNoValue(OpCode opCode, int size)
13 | : base(opCode, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/PipelineExtensions.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Buffers;
6 | using System.Runtime.CompilerServices;
7 |
8 | namespace System.Text.Http.Parser.Internal
9 | {
10 | internal static class PipelineExtensions
11 | {
12 | [MethodImpl(MethodImplOptions.AggressiveInlining)]
13 | public static ReadOnlySpan ToSpan(this ReadOnlySequence buffer)
14 | {
15 | if (buffer.IsSingleSegment)
16 | {
17 | return buffer.First.Span;
18 | }
19 | return buffer.ToArray();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/System.Text.Encodings.Web.Utf8/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection;
6 | using System.Runtime.InteropServices;
7 |
8 | // General Information about an assembly is controlled through the following
9 | // set of attributes. Change these attribute values to modify the information
10 | // associated with an assembly.
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilBranchInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilBranchInstruction : CilInstructionWithValue, ICilVisitable
11 | {
12 | internal CilBranchInstruction(OpCode opCode, int value, int ilOffset, int size)
13 | :base(opCode, value, ilOffset, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilVariableInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilVariableInstruction : CilInstructionWithValue, ICilVisitable
11 | {
12 | internal CilVariableInstruction(OpCode opCode, string name, int token, int size)
13 | : base(opCode, name, token, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/System.Buffers.Experimental/System.Buffers.Experimental.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Pool of unmanaged Span<byte> values
4 | netstandard2.0
5 | true
6 | Span Spans Pool corefxlab
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/publish-logs.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | StageLabel: ''
3 | JobLabel: ''
4 |
5 | steps:
6 | - task: Powershell@2
7 | displayName: Prepare Binlogs to Upload
8 | inputs:
9 | targetType: inline
10 | script: |
11 | New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
12 | Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
13 | continueOnError: true
14 | condition: always()
15 |
16 | - task: PublishBuildArtifacts@1
17 | displayName: Publish Logs
18 | inputs:
19 | PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
20 | PublishLocation: Container
21 | ArtifactName: PostBuildLogs
22 | continueOnError: true
23 | condition: always()
24 |
--------------------------------------------------------------------------------
/tests/System.Text.Utf8String.Tests/TestHelper.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System.Text.Utf8.Tests
8 | {
9 | public static class TestHelper
10 | {
11 | public static void Validate(Utf8String str1, Utf8String str2)
12 | {
13 | Assert.Equal(str1.Bytes.Length, str2.Bytes.Length);
14 | Assert.True(str1.Bytes.SequenceEqual(str2.Bytes));
15 | }
16 |
17 | public static void Validate(Utf8Span str1, Utf8Span str2)
18 | {
19 | Assert.Equal(str1.Bytes.Length, str2.Bytes.Length);
20 | Assert.True(str1.Bytes.SequenceEqual(str2.Bytes));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/eng/Version.Details.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | https://github.com/dotnet/arcade
8 | 1571d6b095014ad63fdb48b10f5dea912f96872e
9 |
10 |
11 | https://github.com/dotnet/arcade
12 | 1571d6b095014ad63fdb48b10f5dea912f96872e
13 |
14 |
15 | https://github.com/dotnet/arcade
16 | 1571d6b095014ad63fdb48b10f5dea912f96872e
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/System.Buffers.Primitives/System/Collections/ISequence.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Collections.Sequences
6 | {
7 | // new interface
8 | public interface ISequence
9 | {
10 | ///
11 | ///
12 | ///
13 | ///
14 | ///
15 | ///
16 | ///
17 | bool TryGet(ref SequencePosition position, out T item, bool advance = true);
18 |
19 | SequencePosition GetPosition(SequencePosition origin, long offset);
20 |
21 | SequencePosition Start { get; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/System.Azure.Experimental.Tests/System.Azure.Experimental.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 | True
5 | ../../tools/test_key.snk
6 | true
7 | true
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInt16VariableInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilInt16VariableInstruction : CilInstructionWithValue, ICilVisitable
11 | {
12 | internal CilInt16VariableInstruction(OpCode opCode, string name, int token, int size)
13 | : base(opCode, name, token, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting/System/Text/Formatting/Formatters/FormatterThrowHelper.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | namespace System.Text.Formatting
8 | {
9 | internal static class FormatterThrowHelper
10 | {
11 | public static void ThrowInvalidOperationException(string message)
12 | {
13 | throw GetInvalidOperationException(message);
14 | }
15 |
16 | [MethodImpl(MethodImplOptions.NoInlining)]
17 | private static InvalidOperationException GetInvalidOperationException(string message)
18 | {
19 | return new InvalidOperationException(message);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting/System/Text/Formatting/ITextBufferWriter.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Buffers;
6 | using System.Buffers.Text;
7 |
8 | namespace System.Text.Formatting
9 | {
10 | // this interface would be implemented by types that want to support formatting, i.e. TextWriter/StringBuilder-like types.
11 | // the interface is used by an extension method in IFormatterExtensions.
12 | // One thing I am not sure here is if it's ok for these APIs to be synchronous, but I guess I will wait till I find a concrete issue with this.
13 | public interface ITextBufferWriter : IBufferWriter
14 | {
15 | SymbolTable SymbolTable { get; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tests/System.IO.FileSystem.Watcher.Polling.Tests/Utility/TemporaryTestFile.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.IO;
6 |
7 | public class TemporaryTestFile : FileStream
8 | {
9 | internal const int DefaultBufferSize = 4096;
10 | public TemporaryTestFile(string path) :
11 | base(path, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite | FileShare.Delete, DefaultBufferSize, FileOptions.DeleteOnClose)
12 | {
13 | this.Path = path;
14 | }
15 |
16 | public string Path { get; private set; }
17 |
18 | public void Move(string targetPath)
19 | {
20 | File.Move(this.Path, targetPath);
21 | this.Path = targetPath;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInt16BranchInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilInt16BranchInstruction : CilInstructionWithValue, ICilVisitable
11 | {
12 | internal CilInt16BranchInstruction(OpCode opCode, sbyte value, int ilOffset, int size)
13 | :base(opCode, value, ilOffset, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/MethodBase/IRoMethodBase.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.TypeLoading
6 | {
7 | // Implemented by RoMethod and RoConstructor. Because it's impossible for those two types to have a common base type we control,
8 | // we use this interface when we want to talk about them collectively.
9 | internal interface IRoMethodBase
10 | {
11 | MethodBase MethodBase { get; }
12 | TypeLoader Loader { get; }
13 | TypeContext TypeContext { get; }
14 | Type[] GetCustomModifiers(int position, bool isRequired);
15 | string GetMethodSigString(int position);
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/CilTypeLayout.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Metadata.Cil
6 | {
7 | public struct CilTypeLayout
8 | {
9 | private readonly TypeLayout _layout;
10 |
11 | public CilTypeLayout(TypeLayout layout)
12 | {
13 | _layout = layout;
14 | }
15 |
16 | public int Size
17 | {
18 | get { return _layout.Size; }
19 | }
20 |
21 | public int PackingSize
22 | {
23 | get { return _layout.PackingSize; }
24 | }
25 |
26 | public bool IsDefault
27 | {
28 | get { return _layout.IsDefault; }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/Types/RoPinnedType.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | ///
11 | /// This is used to represent a PinnedType. It is quite ill-behaved so the only time it is created is by the EcmaPinnedTypeProvider.
12 | /// It is only used to implement the MethodBody.LocalVariables property.
13 | ///
14 | internal sealed class RoPinnedType : RoWrappedType
15 | {
16 | internal RoPinnedType(RoType unmodifiedType)
17 | : base(unmodifiedType)
18 | {
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting/System.Text.Formatting.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Non-allocating formatting library
4 | netstandard2.0
5 | true
6 | .NET formatting corefxlab
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/System.Buffers.ReaderWriter/System.Buffers.ReaderWriter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Buffer Readers, Writers, and Transformations
4 | netstandard2.0
5 | true
6 | Span BufferReader BufferWriter corefxlab
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/eng/common/helixpublish.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | msbuild
5 |
6 |
7 |
8 |
9 | %(Identity)
10 |
11 |
12 |
13 |
14 |
15 | $(WorkItemDirectory)
16 | $(WorkItemCommand)
17 | $(WorkItemTimeout)
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/archived_projects/src/System.Drawing.Graphics/System/Drawing/Graphics/Interop/OSX/Interop.OSX.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | internal static partial class Interop
6 | {
7 | internal const string LibGDBinary = "libgd.dylib";
8 | internal const string LibGDColorAllocateEntryPoint = "gdImageColorAllocate";
9 | internal const string LibGDImageFileEntryPoint = "gdImageFile";
10 | internal const string LibGDImageCreateFromPngCtxEntryPoint = "gdImageCreateFromPngCtx";
11 | internal const string LibGDImagePngCtxEntryPoint = "gdImagePngCtx";
12 | internal const string LibGDImageCreateFromJpegCtxEntryPoint = "gdImageCreateFromJpegCtx";
13 | internal const string LibGDImageJpegCtxEntryPoint = "gdImagePngCtx";
14 |
15 | }
--------------------------------------------------------------------------------
/src/System.Web.Compatibility/NotSupported.Exclude.txt:
--------------------------------------------------------------------------------
1 | # forwarded to netstandard
2 | T:System.Web.HttpUtility
3 |
4 | # implemented
5 | P:System.Web.HttpContext.Current
6 | P:System.Web.HttpContext.Items
7 | P:System.Web.HttpContext.User
8 | M:System.Web.HttpContext.#ctor(System.Web.HttpRequest,System.Web.HttpResponse)
9 | M:System.Web.HttpRequest.#ctor(System.String,System.String,System.String)
10 | M:System.Web.HttpResponse.#ctor(System.IO.TextWriter)
11 | P:System.Web.Hosting.HostingEnvironment.ApplicationPath
12 | P:System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath
13 | P:System.Web.Hosting.HostingEnvironment.IsHosted
14 | P:System.Web.Hosting.HostingEnvironment.SiteName
15 | M:System.Web.Hosting.HostingEnvironment.MapPath(System.String)
16 | T:System.Web.Routing.RequestContext
17 | T:System.Web.Routing.RouteData
18 | T:System.Web.Routing.RouteValueDictionary
19 | T:System.Web.Routing.StopRoutingHandler
20 |
--------------------------------------------------------------------------------
/archived_projects/src/System.Drawing.Graphics/System/Drawing/Graphics/Interop/Linux/Interop.Linux.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | internal static partial class Interop
6 | {
7 | internal const string LibGDBinary = "libgd.so.3.0.0";
8 | internal const string LibGDColorAllocateEntryPoint = "gdImageColorAllocate";
9 | internal const string LibGDImageFileEntryPoint = "gdImageFile";
10 | internal const string LibGDImageCreateFromPngCtxEntryPoint = "gdImageCreateFromPngCtx";
11 | internal const string LibGDImagePngCtxEntryPoint = "gdImagePngCtx";
12 | internal const string LibGDImageCreateFromJpegCtxEntryPoint = "gdImageCreateFromJpegCtx";
13 | internal const string LibGDImageJpegCtxEntryPoint = "gdImageJpegCtx";
14 | }
15 |
--------------------------------------------------------------------------------
/eng/common/dotnet-install.ps1:
--------------------------------------------------------------------------------
1 | [CmdletBinding(PositionalBinding=$false)]
2 | Param(
3 | [string] $verbosity = 'minimal',
4 | [string] $architecture = '',
5 | [string] $version = 'Latest',
6 | [string] $runtime = 'dotnet',
7 | [string] $RuntimeSourceFeed = '',
8 | [string] $RuntimeSourceFeedKey = ''
9 | )
10 |
11 | . $PSScriptRoot\tools.ps1
12 |
13 | $dotnetRoot = Join-Path $RepoRoot '.dotnet'
14 |
15 | $installdir = $dotnetRoot
16 | try {
17 | if ($architecture -and $architecture.Trim() -eq 'x86') {
18 | $installdir = Join-Path $installdir 'x86'
19 | }
20 | InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
21 | }
22 | catch {
23 | Write-Host $_.ScriptStackTrace
24 | Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
25 | ExitWithExitCode 1
26 | }
27 |
28 | ExitWithExitCode 0
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis.Interactive/Microsoft.Data.Analysis.Interactive.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | false
6 |
7 |
8 |
9 |
10 | all
11 | runtime; build; native; contentfiles; analyzers; buildtransitive
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/archived_projects/src/System.Drawing.Graphics/System/Drawing/Graphics/Interop/Windows/Interop.Windows.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | internal static partial class Interop
6 | {
7 | internal const string LibGDBinary = "libgd.dll";
8 | internal const string LibGDColorAllocateEntryPoint = "_gdImageColorAllocate@16";
9 | internal const string LibGDImageFileEntryPoint = "_gdImageFile@8";
10 | internal const string LibGDImageCreateFromPngCtxEntryPoint = "_gdImageCreateFromPngCtx@4";
11 | internal const string LibGDImagePngCtxEntryPoint = "_gdImagePngCtx@8";
12 | internal const string LibGDImageCreateFromJpegCtxEntryPoint = "_gdImageCreateFromJpegCtx@4";
13 | internal const string LibGDImageJpegCtxEntryPoint = "_gdImageJpegCtx@12";
14 | }
--------------------------------------------------------------------------------
/tests/System.Security.Cryptography.Asn1.Experimental.Tests/Reader/Asn1ReaderTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Security.Cryptography.Asn1;
6 |
7 | namespace System.Security.Cryptography.Tests.Asn1
8 | {
9 | public abstract partial class Asn1ReaderTests
10 | {
11 | public enum PublicTagClass : byte
12 | {
13 | Universal = TagClass.Universal,
14 | Application = TagClass.Application,
15 | ContextSpecific = TagClass.ContextSpecific,
16 | Private = TagClass.Private,
17 | }
18 |
19 | public enum PublicEncodingRules
20 | {
21 | BER = AsnEncodingRules.BER,
22 | CER = AsnEncodingRules.CER,
23 | DER = AsnEncodingRules.DER,
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilByteInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilByteInstruction : CilNumericValueInstruction, ICilVisitable
11 | {
12 | internal CilByteInstruction(OpCode opCode, byte value, int token, int size)
13 | :base(opCode, value, token, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 |
22 | protected override string GetBytes()
23 | {
24 | return Value.ToString("X2");
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInt32Instruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Metadata.Cil.Visitor;
6 | using System.Reflection.Emit;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilInt32Instruction : CilNumericValueInstruction , ICilVisitable
11 | {
12 | internal CilInt32Instruction(OpCode opCode, int value, int token, int size)
13 | :base(opCode, value, token, size)
14 | {
15 | }
16 |
17 | public override void Accept(ICilVisitor visitor)
18 | {
19 | visitor.Visit(this);
20 | }
21 |
22 | protected override string GetBytes()
23 | {
24 | return Value.ToString("X2");
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/QotdService/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection;
6 | using System.Runtime.InteropServices;
7 |
8 | // General Information about an assembly is controlled through the following
9 | // set of attributes. Change these attribute values to modify the information
10 | // associated with an assembly.
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
18 | // The following GUID is for the ID of the typelib if this project is exposed to COM
19 | [assembly: Guid("fe69ce5f-2b54-417b-afe1-88f190699901")]
20 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/Assemblies/RoExceptionAssembly.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.IO;
6 | using System.Diagnostics;
7 | using System.Collections.Generic;
8 |
9 | namespace System.Reflection.TypeLoading
10 | {
11 | ///
12 | /// This "assembly" holds an exception resulting from a failure to bind an assembly name. It can be stored in bind caches and assembly ref
13 | /// memoization tables.
14 | ///
15 | internal sealed class RoExceptionAssembly : RoStubAssembly
16 | {
17 | internal RoExceptionAssembly(Exception exception)
18 | : base()
19 | {
20 | Exception = exception;
21 | }
22 |
23 | internal Exception Exception { get; }
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/General/Ecma/EcmaPinnedTypeProvider.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 |
7 | namespace System.Reflection.TypeLoading.Ecma
8 | {
9 | // This type provider is used to parse local variable signatures (whicj can have the PINNED constraint.)
10 | internal sealed class EcmaPinnedTypeProvider : EcmaWrappedTypeProvider
11 | {
12 | internal EcmaPinnedTypeProvider(EcmaModule module)
13 | : base(module)
14 | {
15 | }
16 |
17 | public sealed override RoType GetModifiedType(RoType modifier, RoType unmodifiedType, bool isRequired) => unmodifiedType;
18 | public sealed override RoType GetPinnedType(RoType elementType) => new RoPinnedType(elementType);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tests/Benchmarks/Helpers/Connection.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.IO.Pipelines
6 | {
7 | public class DuplexPipe : IDuplexPipe
8 | {
9 | public DuplexPipe(PipeOptions pipeOptions)
10 | {
11 | Input = new Pipe(pipeOptions);
12 | Output = new Pipe(pipeOptions);
13 | }
14 |
15 | PipeReader IDuplexPipe.Input => Input.Reader;
16 | PipeWriter IDuplexPipe.Output => Output.Writer;
17 |
18 | public Pipe Input { get; }
19 |
20 | public Pipe Output { get; }
21 |
22 | public void Dispose()
23 | {
24 | Input.Reader.Complete();
25 | Input.Writer.Complete();
26 | Output.Reader.Complete();
27 | Output.Writer.Complete();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/System.Security.Cryptography.Asn1.Experimental/System/Security/Cryptography/Asn1/AsnEncodingRules.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Security.Cryptography.Asn1
6 | {
7 | ///
8 | /// The encoding ruleset for an or .
9 | ///
10 | // ITU-T-REC.X.680-201508 sec 4.
11 | public enum AsnEncodingRules
12 | {
13 | ///
14 | /// ITU-T X.690 Basic Encoding Rules
15 | ///
16 | BER,
17 |
18 | ///
19 | /// ITU-T X.690 Canonical Encoding Rules
20 | ///
21 | CER,
22 |
23 | ///
24 | /// ITU-T X.690 Distinguished Encoding Rules
25 | ///
26 | DER,
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/System.Web.Compatibility/System/Web/Routing/StopRoutingHandler.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Runtime.CompilerServices;
7 |
8 | namespace System.Web.Routing
9 | {
10 | [TypeForwardedFrom("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
11 | public class StopRoutingHandler : IRouteHandler
12 | {
13 | protected virtual IHttpHandler GetHttpHandler(RequestContext requestContext)
14 | {
15 | throw new NotSupportedException();
16 | }
17 |
18 | #region IRouteHandler Members
19 | IHttpHandler IRouteHandler.GetHttpHandler(RequestContext requestContext)
20 | {
21 | return GetHttpHandler(requestContext);
22 | }
23 | #endregion
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/LibuvWithNonAllocatingFormatters/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection;
6 | using System.Runtime.InteropServices;
7 |
8 | // General Information about an assembly is controlled through the following
9 | // set of attributes. Change these attribute values to modify the information
10 | // associated with an assembly.
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
18 | // The following GUID is for the ID of the typelib if this project is exposed to COM
19 | [assembly: Guid("8a4c8106-67ec-4e5d-bc81-1db617413eea")]
20 |
--------------------------------------------------------------------------------
/samples/QotdService/Program.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Net.Libuv;
6 | using System.Text.Utf8;
7 |
8 | class QotdService
9 | {
10 | static Utf8String quote = (Utf8String)"Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein";
11 |
12 | static void Main()
13 | {
14 | var loop = new UVLoop();
15 |
16 | var listener = new TcpListener("0.0.0.0", 17, loop);
17 |
18 | listener.ConnectionAccepted += (Tcp connection) =>
19 | {
20 | connection.ReadCompleted += (data) =>
21 | {
22 | connection.TryWrite(quote.Bytes);
23 | };
24 |
25 | connection.ReadStart();
26 | };
27 |
28 | listener.Listen();
29 | loop.Run();
30 | }
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/Types/RoWrappedType.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | ///
11 | /// Base type for RoModifiedType and RoPinnedType. These types are very ill-behaved so they are only produced in very specific circumstances
12 | /// and quickly peeled away once their usefulness has ended.
13 | ///
14 | internal abstract class RoWrappedType : RoStubType
15 | {
16 | internal RoWrappedType(RoType unmodifiedType)
17 | {
18 | Debug.Assert(unmodifiedType != null);
19 | UnmodifiedType = unmodifiedType;
20 | }
21 |
22 | internal RoType UnmodifiedType { get; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/System.Web.Compatibility.Tests/System.Web.Compatibility.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0
5 |
6 |
7 |
8 |
9 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/System.Web.Compatibility/System/Web/Routing/RequestContext.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | namespace System.Web.Routing
8 | {
9 | [TypeForwardedFrom("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
10 | public class RequestContext
11 | {
12 | public RequestContext() { }
13 |
14 | public RequestContext(HttpContextBase httpContext, RouteData routeData)
15 | {
16 | HttpContext = httpContext ?? throw new ArgumentNullException(nameof(httpContext));
17 | RouteData = routeData ?? throw new ArgumentNullException(nameof(routeData));
18 | }
19 |
20 | public virtual HttpContextBase HttpContext { get; set; }
21 |
22 | public virtual RouteData RouteData { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/System.Text.Primitives.Tests/MemoryProtection/PoisonPagePlacement.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Primitives.Tests.MemoryProtection
6 | {
7 | ///
8 | /// Dictates where the poison page should be placed.
9 | ///
10 | public enum PoisonPagePlacement
11 | {
12 | ///
13 | /// The poison page should be placed before the span.
14 | /// Attempting to access the memory page immediately before the
15 | /// span will result in an AV.
16 | ///
17 | BeforeSpan,
18 |
19 | ///
20 | /// The poison page should be placed after the span.
21 | /// Attempting to access the memory page immediately following the
22 | /// span will result in an AV.
23 | ///
24 | AfterSpan
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/SimpleHttp/Server.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26510.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server.csproj", "{1D874906-8BCA-44C2-9F93-32A136E87E4A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {1D874906-8BCA-44C2-9F93-32A136E87E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {1D874906-8BCA-44C2-9F93-32A136E87E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {1D874906-8BCA-44C2-9F93-32A136E87E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {1D874906-8BCA-44C2-9F93-32A136E87E4A}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilNumericValueInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 |
7 | namespace System.Reflection.Metadata.Cil.Instructions
8 | {
9 | public abstract class CilNumericValueInstruction : CilInstructionWithValue
10 | {
11 | private string _bytes;
12 | internal CilNumericValueInstruction(OpCode opCode, T value, int token, int size)
13 | :base(opCode, value, token, size)
14 | {
15 | }
16 |
17 | public string Bytes
18 | {
19 | get
20 | {
21 | if(_bytes == null)
22 | {
23 | _bytes = GetBytes();
24 | }
25 | return _bytes;
26 | }
27 | }
28 |
29 | protected abstract string GetBytes();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/eng/common/post-build/nuget-validation.ps1:
--------------------------------------------------------------------------------
1 | # This script validates NuGet package metadata information using this
2 | # tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage
3 |
4 | param(
5 | [Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are
6 | [Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
7 | )
8 |
9 | try {
10 | . $PSScriptRoot\post-build-utils.ps1
11 |
12 | $url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1'
13 |
14 | New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
15 |
16 | Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
17 |
18 | & ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
19 | }
20 | catch {
21 | Write-Host $_.ScriptStackTrace
22 | Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
23 | ExitWithExitCode 1
24 | }
25 |
--------------------------------------------------------------------------------
/src/System.IO.FileSystem.Watcher.Polling/System/IO/FileState.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 |
7 | namespace System.IO
8 | {
9 | [Serializable]
10 | internal struct FileState
11 | {
12 | internal long _version; // removal notification are implemented something similar to "mark and sweep". This value is incremented in the mark phase
13 | public string Path;
14 | public string Directory;
15 | public DateTimeOffset LastWriteTimeUtc;
16 | public long Length;
17 |
18 | public FileState(string directory, string path) : this()
19 | {
20 | Debug.Assert(path != null);
21 | Directory = directory;
22 | Path = path;
23 | }
24 |
25 | public override string ToString()
26 | {
27 | return Path;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/ProxyService/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.AspNetCore.Http;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 | using Benchmarks.Middleware;
11 |
12 | namespace ProxyService
13 | {
14 | public class Startup
15 | {
16 | // This method gets called by the runtime. Use this method to add services to the container.
17 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
18 | public void ConfigureServices(IServiceCollection services)
19 | {
20 | }
21 |
22 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
23 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
24 | {
25 | app.UseProxy();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInt64Instruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilInt64Instruction : CilNumericValueInstruction, ICilVisitable
11 | {
12 | internal CilInt64Instruction(OpCode opCode, long value, int token, int size)
13 | :base(opCode, value, token, size)
14 | {
15 | }
16 |
17 | protected override string GetBytes()
18 | {
19 | var data = BitConverter.GetBytes(Value);
20 | return BitConverter.ToString(data).Replace("-", string.Empty);
21 | }
22 |
23 | public override void Accept(ICilVisitor visitor)
24 | {
25 | visitor.Visit(this);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/CilEntity.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Metadata.Cil
6 | {
7 | public enum EntityKind
8 | {
9 | TypeReference,
10 | TypeDefinition,
11 | TypeSpecification
12 | }
13 |
14 | public struct CilEntity
15 | {
16 | private object _entity;
17 | private EntityKind _kind;
18 |
19 | internal CilEntity(object entity, EntityKind kind)
20 | {
21 | _entity = entity;
22 | _kind = kind;
23 | }
24 |
25 | public object Entity
26 | {
27 | get
28 | {
29 | return _entity;
30 | }
31 | }
32 |
33 | public EntityKind Kind
34 | {
35 | get
36 | {
37 | return _kind;
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilSingleInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilSingleInstruction : CilNumericValueInstruction, ICilVisitable
11 | {
12 | internal CilSingleInstruction(OpCode opCode, float value, int token, int size)
13 | :base(opCode, value, token, size)
14 | {
15 | }
16 |
17 | protected override string GetBytes()
18 | {
19 | var data = BitConverter.GetBytes(Value);
20 | return BitConverter.ToString(data).Replace("-", string.Empty);
21 | }
22 |
23 | public override void Accept(ICilVisitor visitor)
24 | {
25 | visitor.Visit(this);
26 | }
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/FromCoreRt/System/Reflection/Runtime/BindingFlagSupport/MemberTypeIndex.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Runtime.BindingFlagSupport
6 | {
7 | //
8 | // When we want to store an object of type Foo for each possible M, it's convenient to use
9 | // an array of length MemberTypeIndex.Count, which each possible M assigned an index.
10 | //
11 | // This is defined as a set of consts rather than enum to avoid having to cast to int.
12 | //
13 | internal static class MemberTypeIndex
14 | {
15 | public const int Constructor = 0;
16 | public const int Event = 1;
17 | public const int Field = 2;
18 | public const int Method = 3;
19 | public const int NestedType = 4;
20 | public const int Property = 5;
21 |
22 | public const int Count = 6;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/System.Buffers.Primitives/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | [assembly: InternalsVisibleTo("System.Buffers.Primitives.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")]
8 | [assembly: InternalsVisibleTo("System.IO.Pipelines.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")]
9 |
10 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilDoubleInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilDoubleInstruction : CilNumericValueInstruction, ICilVisitable
11 | {
12 | internal CilDoubleInstruction(OpCode opCode, double value, int token, int size)
13 | :base(opCode, value, token, size)
14 | {
15 | }
16 |
17 | protected override string GetBytes()
18 | {
19 | var data = BitConverter.GetBytes(Value);
20 | return BitConverter.ToString(data).Replace("-", string.Empty);
21 | }
22 |
23 | public override void Accept(ICilVisitor visitor)
24 | {
25 | visitor.Visit(this);
26 | }
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInstructionWithValue.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 |
7 | namespace System.Reflection.Metadata.Cil.Instructions
8 | {
9 | public abstract class CilInstructionWithValue : CilInstruction
10 | {
11 | private T _value;
12 | private int _token;
13 |
14 | internal CilInstructionWithValue(OpCode opCode, T value, int token, int size)
15 | : base(opCode, size)
16 | {
17 | _value = value;
18 | _token = token;
19 | }
20 |
21 | public T Value
22 | {
23 | get
24 | {
25 | return _value;
26 | }
27 | }
28 |
29 | public int Token
30 | {
31 | get
32 | {
33 | return _token;
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/System.Web.Compatibility.Tests/RequestContextTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Web.Routing;
6 | using Xunit;
7 |
8 | namespace System.Web.Compatibility.Tests
9 | {
10 | public class RequestContextTests
11 | {
12 | [Fact]
13 | public void RequestContextDefaultCtor()
14 | {
15 | RequestContext rc = new RequestContext();
16 | Assert.Null(rc.HttpContext);
17 | Assert.Null(rc.RouteData);
18 | }
19 |
20 | [Fact]
21 | public void RequestContextCtor()
22 | {
23 | Assert.Throws("httpContext", () => new RequestContext(null, null));
24 | Assert.Throws("httpContext", () => new RequestContext(null, new RouteData()));
25 |
26 | // can't construct a HttpContextBase as it will throw PNSE
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/samples/SimpleHttpWithTasks/ServerWithTasks.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26510.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerWithTasks", "ServerWithTasks.csproj", "{88FFF10C-2A83-4AB7-93B5-6E54D9286C53}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {88FFF10C-2A83-4AB7-93B5-6E54D9286C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {88FFF10C-2A83-4AB7-93B5-6E54D9286C53}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {88FFF10C-2A83-4AB7-93B5-6E54D9286C53}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {88FFF10C-2A83-4AB7-93B5-6E54D9286C53}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/tests/System.Reflection.TypeLoader.Tests/src/Tests/Type/TypeTests.Enum.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.IO;
6 | using System.Linq;
7 | using System.Collections;
8 | using System.Collections.Generic;
9 |
10 | using SampleMetadata;
11 |
12 | using Xunit;
13 |
14 | namespace System.Reflection.Tests
15 | {
16 | public static partial class TypeTests
17 | {
18 | [Fact]
19 | public static void EnumUnderlyingTypeTest()
20 | {
21 | Type t = typeof(MyColor).Project();
22 | Type ut = t.GetEnumUnderlyingType();
23 | Assert.Equal(typeof(int).Project(), ut);
24 | }
25 |
26 | [Fact]
27 | public static void EnumUnderlyingTypeTestNotEnum()
28 | {
29 | Type t = typeof(object).Project();
30 | Assert.Throws(() => t.GetEnumUnderlyingType());
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/src/System.Text.Primitives/System/Precondition.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | namespace System.Diagnostics
8 | {
9 | internal static class Precondition
10 | {
11 | [MethodImpl(MethodImplOptions.AggressiveInlining)]
12 | public static void Require(bool condition)
13 | {
14 | if (!condition)
15 | {
16 | Fail();
17 | }
18 | }
19 |
20 | private static void Fail()
21 | {
22 | if (Debugger.IsAttached)
23 | {
24 | Debugger.Break();
25 | }
26 | throw new Failure();
27 | }
28 |
29 | public sealed class Failure : Exception
30 | {
31 | static string s_message = "precondition failed";
32 | internal Failure() : base(s_message) { }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).
6 |
7 | ## Reporting a Vulnerability
8 |
9 | Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC), either by emailing secure@microsoft.com or via the portal at https://msrc.microsoft.com.
10 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
11 | original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue).
12 |
13 | Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty).
14 |
15 | Please do not open issues for anything you think might have a security implication.
--------------------------------------------------------------------------------
/docs/specs/encoding.md:
--------------------------------------------------------------------------------
1 | # Encoding
2 |
3 | The existing .NET encoding APIs (System.Text.Encoding) don't work super well in
4 | non-allocating data pipelines:
5 |
6 | 1. They allocate output arrays (as opposed to taking output buffers are
7 | parameters).
8 | 2. They don't work with Span\
9 | 3. They have the overhead of virtual calls (which might be significant to
10 | transcoding small slices)
11 |
12 | The requirements for the new APIs are as follows:
13 |
14 | 1. Transcode bytes contained in ReadOnlySpan into a passed in Span
15 | 2. The API needs to handle running out of space in the output buffer and then
16 | continuing when an additional output buffer is passed in.
17 | 3. The API needs to be fast (on par with native code implementations)
18 | 4. Needs to do this with zero GC allocations
19 | 5. Needs to be stateless (multithreaded)
20 | 6. We need to support transcoding between UTF8, UTF16LE, ISO8859-1, and be able
21 | to support other encodings in the future.
22 |
23 | This document will describe these issues in detail and propose new APIs better
24 | suited for data pipelines.
25 |
--------------------------------------------------------------------------------
/archived_projects/src/System.CommandLine/System/CommandLine/ArgumentCommand.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.CommandLine
6 | {
7 | public abstract class ArgumentCommand
8 | {
9 | internal ArgumentCommand(string name)
10 | {
11 | Name = name;
12 | }
13 |
14 | public string Name { get; private set; }
15 |
16 | public string Help { get; set; }
17 |
18 | public object Value
19 | {
20 | get { return GetValue(); }
21 | }
22 |
23 | public bool IsHidden { get; set; }
24 |
25 | public bool IsActive { get; private set; }
26 |
27 | internal abstract object GetValue();
28 |
29 | internal void MarkActive()
30 | {
31 | IsActive = true;
32 | }
33 |
34 | public override string ToString()
35 | {
36 | return Name;
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/CilLocal.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Metadata.Cil.Visitor;
6 |
7 | namespace System.Reflection.Metadata.Cil
8 | {
9 | public struct CilLocal : ICilVisitable
10 | {
11 | private readonly string _name;
12 | private readonly string _type;
13 |
14 | public CilLocal(string name, string type)
15 | {
16 | _name = name;
17 | _type = type;
18 | }
19 |
20 | public string Name
21 | {
22 | get
23 | {
24 | return _name;
25 | }
26 | }
27 |
28 | public string Type
29 | {
30 | get
31 | {
32 | return _type;
33 | }
34 | }
35 |
36 | public void Accept(ICilVisitor visitor)
37 | {
38 | visitor.Visit(this);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/MethodBase/RoLocalVariableInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | internal sealed partial class RoLocalVariableInfo : LocalVariableInfo
11 | {
12 | private readonly int _localIndex;
13 | private readonly bool _isPinned;
14 | private readonly Type _localType;
15 |
16 | internal RoLocalVariableInfo(int localIndex, bool isPinned, Type localType)
17 | {
18 | _localIndex = localIndex;
19 | _isPinned = isPinned;
20 | _localType = localType;
21 | }
22 |
23 | public sealed override int LocalIndex => _localIndex;
24 | public sealed override bool IsPinned => _isPinned;
25 | public sealed override Type LocalType => _localType;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/System.Text.Formatting/System/InternalHelpers/Precondition.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Runtime.CompilerServices;
6 |
7 | namespace System.Diagnostics
8 | {
9 | internal static class Precondition
10 | {
11 | [MethodImpl(MethodImplOptions.AggressiveInlining)]
12 | public static void Require(bool condition)
13 | {
14 | if (!condition)
15 | {
16 | Fail();
17 | }
18 | }
19 |
20 | private static void Fail()
21 | {
22 | if (Debugger.IsAttached)
23 | {
24 | Debugger.Break();
25 | }
26 | throw new Failure();
27 | }
28 |
29 | public sealed class Failure : Exception
30 | {
31 | static string s_message = "precondition failed";
32 | internal Failure() : base(s_message) { }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/Types/RoInstantiationProviderType.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | ///
11 | /// Base type for RoDefinitionType and RoConstructedGenericType. These are the two types that can declare members backed by metadata.
12 | /// (Though Array types "declare" members too, those are not backed by actual metadata so there will never be a typespec that has to be resolved
13 | /// which is what an instantiation is for in the first place.)
14 | ///
15 | internal abstract partial class RoInstantiationProviderType : RoType
16 | {
17 | protected RoInstantiationProviderType()
18 | : base()
19 | {
20 | }
21 |
22 | internal abstract RoType[] Instantiation { get; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/System.Text.Primitives/System/Text/Encoders/Unicode/Unicode.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | namespace System.Buffers.Text
4 | {
5 | public static class Unicode
6 | {
7 | // TODO: Make this immutable and let them be strong typed
8 | // http://unicode.org/cldr/utility/list-unicodeset.jsp?a=\p{whitespace}&g=&i=
9 | private static readonly uint[] SortedWhitespaceCodePoints = new uint[]
10 | {
11 | 0x0009, 0x000A, 0x000B, 0x000C, 0x000D,
12 | 0x0020,
13 | 0x0085,
14 | 0x00A0,
15 | 0x1680,
16 | 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006,
17 | 0x2007,
18 | 0x2008, 0x2009, 0x200A,
19 | 0x2028, 0x2029,
20 | 0x202F,
21 | 0x205F,
22 | 0x3000
23 | };
24 |
25 | [MethodImpl(MethodImplOptions.AggressiveInlining)]
26 | public static bool IsWhitespace(uint codePoint)
27 | {
28 | return Array.BinarySearch(SortedWhitespaceCodePoints, codePoint) >= 0;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/System.Time/System.Time.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Date and Time helper classes
4 | netstandard2.0
5 | Date TimeOfDay Time corefxlab
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | True
15 | True
16 | Strings.resx
17 |
18 |
19 |
20 |
21 | ResXFileCodeGenerator
22 | Strings.Designer.cs
23 | System
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/run-script-ifequalelse.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | # if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command
3 | parameter1: ''
4 | parameter2: ''
5 | ifScript: ''
6 | elseScript: ''
7 |
8 | # name of script step
9 | name: Script
10 |
11 | # display name of script step
12 | displayName: If-Equal-Else Script
13 |
14 | # environment
15 | env: {}
16 |
17 | # conditional expression for step execution
18 | condition: ''
19 |
20 | steps:
21 | - ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}:
22 | - script: ${{ parameters.ifScript }}
23 | name: ${{ parameters.name }}
24 | displayName: ${{ parameters.displayName }}
25 | env: ${{ parameters.env }}
26 | condition: ${{ parameters.condition }}
27 |
28 | - ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}:
29 | - script: ${{ parameters.elseScript }}
30 | name: ${{ parameters.name }}
31 | displayName: ${{ parameters.displayName }}
32 | env: ${{ parameters.env }}
33 | condition: ${{ parameters.condition }}
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/Assemblies/AssemblyFileInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 |
7 | namespace System.Reflection.TypeLoading
8 | {
9 | //
10 | // Captures the contents of a row in the File metadata table in a format-agnostic way. The manifest module
11 | // is also represented as a fictious "row 0".
12 | //
13 | internal readonly struct AssemblyFileInfo
14 | {
15 | public AssemblyFileInfo(string name, bool containsMetadata, int rowIndex)
16 | {
17 | Debug.Assert(name != null);
18 |
19 | Name = name;
20 | ContainsMetadata = containsMetadata;
21 | RowIndex = rowIndex;
22 | }
23 |
24 | public string Name { get; }
25 | public int RowIndex { get; } // 0 for manifest modoule - 1..N for other modules.
26 | public bool ContainsMetadata { get; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/ByteDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class ByteDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public ByteDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public ByteDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public ByteDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public ByteDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal ByteDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/CharDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class CharDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public CharDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public CharDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public CharDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public CharDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal CharDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/Int32DataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class Int32DataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public Int32DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public Int32DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public Int32DataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public Int32DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal Int32DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/General/Ecma/EcmaModifiedTypeProvider.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 |
7 | namespace System.Reflection.TypeLoading.Ecma
8 | {
9 | //
10 | // A special purpose ISignatureTypeProvider for the GetCustomModifiers() api. Unlike the normal one, this one produces RoModifiedTypes
11 | // when custom modifiers are present.
12 | //
13 | internal sealed class EcmaModifiedTypeProvider : EcmaWrappedTypeProvider
14 | {
15 | internal EcmaModifiedTypeProvider(EcmaModule module)
16 | : base(module)
17 | {
18 | }
19 |
20 | public sealed override RoType GetModifiedType(RoType modifier, RoType unmodifiedType, bool isRequired) => new RoModifiedType(modifier.SkipTypeWrappers(), unmodifiedType, isRequired);
21 | public sealed override RoType GetPinnedType(RoType elementType) => elementType;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/Int64DataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class Int64DataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public Int64DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public Int64DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public Int64DataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public Int64DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal Int64DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/Benchmarks/System.Text.Primitives/AsciiDecoding.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Text.Utf8;
6 | using BenchmarkDotNet.Attributes;
7 |
8 | namespace System.Text.Primitives.Benchmarks
9 | {
10 | public class AsciiDecoding
11 | {
12 | private byte[] bytes;
13 |
14 | [Params("/plaintext", "text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7")]
15 | public string Text;
16 |
17 | [GlobalSetup]
18 | public void Setup() => bytes = Encoding.ASCII.GetBytes(Text);
19 |
20 | [Benchmark]
21 | public string AsciiToStringPrimitives() => Buffers.Text.TextEncodings.Ascii.ToUtf16String(bytes);
22 |
23 | [Benchmark(Baseline = true)]
24 | public string AsciiToStringClr() => Encoding.ASCII.GetString(bytes);
25 |
26 | [Benchmark]
27 | public string Utf8ToStringTextEncoder() => new Utf8Span(bytes).ToString();
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/tests/System.Text.Primitives.Tests/Encoding/TextEncoderConstants.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Primitives.Tests.Encoding
6 | {
7 | public static class TextEncoderConstants
8 | {
9 | public const ushort Utf16HighSurrogateFirstCodePoint = 0xD800;
10 | public const ushort Utf16HighSurrogateLastCodePoint = 0xDBFF;
11 | public const ushort Utf16LowSurrogateFirstCodePoint = 0xDC00;
12 | public const ushort Utf16LowSurrogateLastCodePoint = 0xDFFF;
13 |
14 | public const uint LastValidCodePoint = 0x10FFFF;
15 |
16 | public const byte Utf8OneByteLastCodePoint = 0x7F;
17 | public const ushort Utf8TwoBytesLastCodePoint = 0x7FF;
18 | public const ushort Utf8ThreeBytesLastCodePoint = 0xFFFF;
19 |
20 | public const int DataLength = 999; // Used as length of input string generated for encoding tests
21 |
22 | public const int RandomSeed = 42;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/Int16DataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class Int16DataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public Int16DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public Int16DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public Int16DataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public Int16DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal Int16DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/SByteDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class SByteDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public SByteDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public SByteDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public SByteDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public SByteDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal SByteDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/UInt32DataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class UInt32DataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public UInt32DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public UInt32DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public UInt32DataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public UInt32DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal UInt32DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilStringInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | public class CilStringInstruction : CilInstructionWithValue, ICilVisitable
11 | {
12 | private readonly bool _isPrintable;
13 | internal CilStringInstruction(OpCode opCode,string value, int token, int size, bool isPrintable = true)
14 | : base(opCode, value, token, size)
15 | {
16 | _isPrintable = isPrintable;
17 | }
18 |
19 | public bool IsPrintable
20 | {
21 | get
22 | {
23 | return _isPrintable;
24 | }
25 | }
26 |
27 | public override void Accept(ICilVisitor visitor)
28 | {
29 | visitor.Visit(this);
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/SingleDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class SingleDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public SingleDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public SingleDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public SingleDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public SingleDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal SingleDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/UInt64DataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class UInt64DataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public UInt64DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public UInt64DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public UInt64DataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public UInt64DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal UInt64DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/System.Text.Encodings.Web.Utf8.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection;
6 | using System.Runtime.InteropServices;
7 |
8 | // General Information about an assembly is controlled through the following
9 | // set of attributes. Change these attribute values to modify the information
10 | // associated with an assembly.
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("System.Text.Encodings.Web.Utf8.Tests")]
14 | [assembly: AssemblyTrademark("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("d38cf672-795e-41d2-b10d-cfa87927bbdc")]
23 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/BooleanDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class BooleanDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public BooleanDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public BooleanDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public BooleanDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public BooleanDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal BooleanDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/DoubleDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class DoubleDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public DoubleDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public DoubleDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public DoubleDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public DoubleDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal DoubleDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/UInt16DataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class UInt16DataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public UInt16DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public UInt16DataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public UInt16DataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public UInt16DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal UInt16DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/Types/RoModifiedType.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | ///
11 | /// This is used to represent a ModifiedType. It is quite ill-behaved so the only time it is created is by the EcmaModifiedTypeProvider.
12 | /// It is only used to implement the GetCustomModifiers apis.
13 | ///
14 | internal sealed class RoModifiedType : RoWrappedType
15 | {
16 | internal RoModifiedType(RoType modifier, RoType unmodifiedType, bool isRequired)
17 | : base(unmodifiedType)
18 | {
19 | Debug.Assert(modifier != null);
20 |
21 | Modifier = modifier;
22 | IsRequired = isRequired;
23 | }
24 |
25 | internal RoType Modifier { get; }
26 | internal bool IsRequired { get; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tests/System.Text.Primitives.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection;
6 | using System.Runtime.InteropServices;
7 |
8 | // General Information about an assembly is controlled through the following
9 | // set of attributes. Change these attribute values to modify the information
10 | // associated with an assembly.
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Microsoft Corporation")]
13 | [assembly: AssemblyProduct("System.Text.Primitives.Tests")]
14 | [assembly: AssemblyTrademark("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("67b42c20-d98a-420b-82c0-04afd963e650")]
23 |
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
14 | <_TranslateUrlPattern>(https://dnceng%40dev\.azure\.com/dnceng/internal/_git|https://dev\.azure\.com/dnceng/internal/_git|https://dnceng\.visualstudio\.com/internal/_git|dnceng%40vs-ssh\.visualstudio\.com:v3/dnceng/internal|git%40ssh\.dev\.azure\.com:v3/dnceng/internal)/([^/-]+)-(.+)
15 | <_TranslateUrlReplacement>https://github.com/$2/$3
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tests/System.Buffers.Experimental.Tests/BufferReferenceTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 | using Xunit;
5 |
6 | namespace System.Buffers.Tests
7 | {
8 | public class BufferReferenceUnitTests
9 | {
10 | [Fact]
11 | public void AutoDisposeBufferReferenceTests()
12 | {
13 | BufferReferenceTests.TestAutoOwnedBuffer(() => {
14 | return new AutoDisposeBuffer(new byte[1024]);
15 | });
16 | }
17 |
18 | [Fact]
19 | public void AutoPooledBufferReferenceTests()
20 | {
21 | BufferReferenceTests.TestAutoOwnedBuffer(() => {
22 | return new AutoPooledBuffer(1024);
23 | });
24 | }
25 |
26 | [Fact]
27 | public void CustomBufferReferenceTests()
28 | {
29 | BufferReferenceTests.TestMemoryManager(() => {
30 | return new CustomBuffer(512);
31 | });
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Microsoft.Data.Analysis/DecimalDataFrameColumn.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Text;
8 |
9 | namespace Microsoft.Data.Analysis
10 | {
11 | public partial class DecimalDataFrameColumn : PrimitiveDataFrameColumn
12 | {
13 | public DecimalDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
14 |
15 | public DecimalDataFrameColumn(string name, IEnumerable values) : base(name, values) { }
16 |
17 | public DecimalDataFrameColumn(string name, long length = 0) : base(name, length) { }
18 |
19 | public DecimalDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { }
20 |
21 | internal DecimalDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/FromCoreRt/System/Reflection/Runtime/BindingFlagSupport/NameFilter.Ecma.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Globalization;
6 | using System.Reflection.Metadata;
7 | using System.Reflection.TypeLoading.Ecma;
8 |
9 | namespace System.Reflection
10 | {
11 | internal abstract partial class NameFilter
12 | {
13 | public abstract bool Matches(StringHandle stringHandle, MetadataReader reader);
14 | }
15 |
16 | internal sealed partial class NameFilterCaseSensitive : NameFilter
17 | {
18 | public sealed override bool Matches(StringHandle stringHandle, MetadataReader reader) => stringHandle.Equals(_expectedNameUtf8, reader);
19 | }
20 |
21 | internal sealed partial class NameFilterCaseInsensitive : NameFilter
22 | {
23 | public sealed override bool Matches(StringHandle stringHandle, MetadataReader reader) => reader.StringComparer.Equals(stringHandle, ExpectedName, true);
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/src/System.Text.Primitives/System/Text/SymbolTable/SymbolTable_symbol.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Buffers.Text
6 | {
7 | public partial class SymbolTable
8 | {
9 | // Do not change the specific enum values without careful consideration of the impacts to the parsers.
10 | public enum Symbol : ushort {
11 | D0 = (ushort)0,
12 | D1 = (ushort)1,
13 | D2 = (ushort)2,
14 | D3 = (ushort)3,
15 | D4 = (ushort)4,
16 | D5 = (ushort)5,
17 | D6 = (ushort)6,
18 | D7 = (ushort)7,
19 | D8 = (ushort)8,
20 | D9 = (ushort)9,
21 | DecimalSeparator = (ushort)10,
22 | Exponent = (ushort)16,
23 | GroupSeparator = (ushort)11,
24 | InfinitySign = (ushort)12,
25 | MinusSign = (ushort)13,
26 | NaN = (ushort)15,
27 | PlusSign = (ushort)14,
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/LowAllocationWebServer/LowAllocationWebServerCore/Program.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Diagnostics;
7 | using System.Threading;
8 |
9 | namespace LowAllocationWebServer
10 | {
11 | public class Program
12 | {
13 | public static void Main(string[] args)
14 | {
15 | Console.WriteLine("Sample Rest Server Started");
16 | Console.WriteLine("Browse to http://:8080/time, http://:8080/plaintext, or http://:8080/json to test it.\n");
17 |
18 | var log = new ConsoleLog((Log.Level.Verbose));
19 | var cancellation = new CancellationTokenSource();
20 |
21 | var restServer = new SampleRestServer(cancellation.Token, log, 8080, 0, 0, 0, 0);
22 | restServer.StartAsync();
23 |
24 | Console.WriteLine("Press ENTER to exit ...");
25 | Console.ReadLine();
26 |
27 | cancellation.Cancel();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/System.Security.Cryptography.Asn1.Experimental/System/Security/Cryptography/Asn1/TagClass.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Security.Cryptography.Asn1
6 | {
7 | ///
8 | /// The tag class for a particular ASN.1 tag.
9 | ///
10 | // Uses a masked overlay of the tag class encoding.
11 | // T-REC-X.690-201508 sec 8.1.2.2
12 | public enum TagClass : byte
13 | {
14 | ///
15 | /// The Universal tag class
16 | ///
17 | Universal = 0,
18 |
19 | ///
20 | /// The Application tag class
21 | ///
22 | Application = 0b0100_0000,
23 |
24 | ///
25 | /// The Context-Specific tag class
26 | ///
27 | ContextSpecific = 0b1000_0000,
28 |
29 | ///
30 | /// The Private tag class
31 | ///
32 | Private = 0b1100_0000,
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/System.Text.Http/System/Text/Http/Parser/RequestRejectionReason.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Text.Http.Parser
6 | {
7 | internal enum RequestRejectionReason
8 | {
9 | UnrecognizedHTTPVersion,
10 | InvalidRequestLine,
11 | InvalidRequestHeader,
12 | InvalidRequestHeadersNoCRLF,
13 | MalformedRequestInvalidHeaders,
14 | InvalidContentLength,
15 | MultipleContentLengths,
16 | UnexpectedEndOfRequestContent,
17 | BadChunkSuffix,
18 | BadChunkSizeData,
19 | ChunkedRequestIncomplete,
20 | InvalidRequestTarget,
21 | InvalidCharactersInHeaderName,
22 | RequestLineTooLong,
23 | HeadersExceedMaxTotalSize,
24 | TooManyHeaders,
25 | RequestTimeout,
26 | FinalTransferCodingNotChunked,
27 | LengthRequired,
28 | LengthRequiredHttp10,
29 | OptionsMethodRequired,
30 | ConnectMethodRequired,
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/tests/System.Time.Tests/DateCalendarTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Globalization;
6 | using Xunit;
7 |
8 | namespace System._Time.Tests
9 | {
10 | public class DateCalendarTests
11 | {
12 | [Fact]
13 | public void CanCreateDateWithCalendar()
14 | {
15 | var actual = new Date(1436, 3, 10, new UmAlQuraCalendar());
16 | var expected = new Date(2015, 1, 1);
17 | Assert.Equal(expected, actual);
18 | }
19 |
20 | [Fact]
21 | public void CanUseDateInCalendar()
22 | {
23 | var dt = new Date(2015, 1, 1);
24 |
25 | var calendar = new UmAlQuraCalendar();
26 | var year = calendar.GetYear(dt);
27 | var month = calendar.GetMonth(dt);
28 | var day = calendar.GetDayOfMonth(dt);
29 |
30 | Assert.Equal(1436, year);
31 | Assert.Equal(3, month);
32 | Assert.Equal(10, day);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) .NET Foundation and Contributors
4 |
5 | All rights reserved.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/src/System.Security.Cryptography.Asn1.Experimental/System.Security.Cryptography.Asn1.Experimental.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | ASN.1 BER/CER/DER Reader/Writer
4 | netstandard2.0;netcoreapp2.1
5 | true
6 | ASN1 BER CER DER corefxlab
7 | true
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | True
17 | True
18 | Strings.resx
19 |
20 |
21 |
22 |
23 | ResXFileCodeGenerator
24 | Strings.Designer.cs
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/tools/publishing/publish.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp2.1
4 | 600
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 180
18 | true
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/tests/Microsoft.Experimental.Collections.Tests/Microsoft.Experimental.Collections.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 | ../../tools/test_key.snk
5 | true
6 | true
7 |
8 | Microsoft Corporation, All rights reserved
9 |
10 |
11 |
12 |
13 |
14 | False
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Decoder/CILTokenType.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace System.Reflection.Metadata.Cil.Decoder
6 | {
7 | public enum CilTokenType
8 | {
9 | Module = 0x00,
10 | TypeReference = 0x01,
11 | TypeDefinition = 0x02,
12 | FieldDefinition = 0x04,
13 | MethodDefinition = 0x06,
14 | ParameterDefinition = 0x08,
15 | InterfaceImplementation = 0x09,
16 | MemberReference = 0x0A,
17 | CustomAttribute = 0x0C,
18 | Permission = 0x0E,
19 | Signature = 0x11,
20 | Event = 0x14,
21 | Property = 0x17,
22 | ModuleReference = 0x1A,
23 | TypeSpecification = 0x1B,
24 | Assembly = 0x20,
25 | AssemblyReference = 0x23,
26 | File = 0x26,
27 | ExportedType = 0x27,
28 | ManifestResource = 0x28,
29 | GenericParameter = 0x2A,
30 | MethodSpecification = 0x2B,
31 | GenericParameterConstraint = 0x2C,
32 | UserString = 0x70,
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/System.Reflection.Metadata.Cil/Instructions/CilInstruction.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Reflection.Emit;
6 | using System.Reflection.Metadata.Cil.Visitor;
7 |
8 | namespace System.Reflection.Metadata.Cil.Instructions
9 | {
10 | ///
11 | /// Base class for IL instructions.
12 | ///
13 | public abstract class CilInstruction : ICilVisitable
14 | {
15 | private OpCode _opCode;
16 | private int _size;
17 |
18 | internal CilInstruction(OpCode opCode, int size)
19 | {
20 | _opCode = opCode;
21 | _size = size;
22 | }
23 |
24 | public OpCode opCode
25 | {
26 | get
27 | {
28 | return _opCode;
29 | }
30 | }
31 |
32 | public int Size
33 | {
34 | get
35 | {
36 | return _size;
37 | }
38 | }
39 |
40 | abstract public void Accept(ICilVisitor visitor);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/CustomAttributes/CustomAttributeArguments.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | //
11 | // This pairs the Fixed and Named argument lists of a CustomAttributeData in a single conceptual unit (and avoids the
12 | // the horror of a type name like "KeyValuePair")
13 | //
14 | internal readonly struct CustomAttributeArguments
15 | {
16 | public CustomAttributeArguments(IList fixedArguments, IList namedArguments)
17 | {
18 | FixedArguments = fixedArguments;
19 | NamedArguments = namedArguments;
20 | }
21 |
22 | public IList FixedArguments { get; }
23 | public IList NamedArguments { get; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/tests/System.IO.FileSystem.Watcher.Polling.Tests/Utility/TemporaryTestDirectory.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.IO;
7 |
8 | public class TemporaryTestDirectory : IDisposable
9 | {
10 | public TemporaryTestDirectory(string path)
11 | {
12 | Directory.CreateDirectory(path);
13 | this.Path = path;
14 | }
15 |
16 | public string Path { get; private set; }
17 |
18 | public void Move(string targetPath)
19 | {
20 | Directory.Move(this.Path, targetPath);
21 | this.Path = targetPath;
22 | }
23 |
24 | // Use a finalizer to ensure we always clean up
25 | ~TemporaryTestDirectory()
26 | {
27 | Dispose(false);
28 | }
29 |
30 | public void Dispose()
31 | {
32 | Dispose(true);
33 | GC.SuppressFinalize(this);
34 | }
35 |
36 | protected void Dispose(bool disposing)
37 | {
38 | if (!string.IsNullOrEmpty(this.Path))
39 | {
40 | Utility.EnsureDelete(this.Path);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/tests/System.Text.Primitives.Tests/Formatting/BooleanTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Buffers;
6 | using System.Buffers.Text;
7 | using Xunit;
8 |
9 | namespace System.Text.Primitives.Tests
10 | {
11 | public partial class FormattingTests
12 | {
13 | [Theory]
14 | [InlineData('G', true, "True")]
15 | [InlineData('G', false, "False")]
16 | [InlineData('l', true, "true")]
17 | [InlineData('l', false, "false")]
18 | [InlineData(' ', true, "True")]
19 | [InlineData(' ', false, "False")]
20 | public void BooleanUtf16(char format, bool value, string expected)
21 | {
22 | StandardFormat f = format == ' ' ? default : new StandardFormat(format);
23 | byte[] buffer = new byte[256];
24 | Assert.True(Utf16Formatter.TryFormat(value, buffer, out int bytesWritten, f));
25 | var actual = Text.Encoding.Unicode.GetString(buffer, 0, bytesWritten);
26 | Assert.Equal(expected, actual);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tests/System.Time.Tests/DateTimeTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System._Time.Tests
8 | {
9 | public class DateTimeTests
10 | {
11 | [Fact]
12 | public void CanGetDateFromDateTime()
13 | {
14 | DateTime dt = DateTime.MaxValue;
15 |
16 | Date d = dt.GetDate();
17 |
18 | Assert.Equal(dt.Year, d.Year);
19 | Assert.Equal(dt.Month, d.Month);
20 | Assert.Equal(dt.Day, d.Day);
21 | }
22 |
23 | [Fact]
24 | public void CanGetTimeFromDateTime()
25 | {
26 | DateTime dt = DateTime.MaxValue;
27 |
28 | Time t = dt.GetTime();
29 |
30 | Assert.Equal(dt.Hour, t.Hour);
31 | Assert.Equal(dt.Minute, t.Minute);
32 | Assert.Equal(dt.Second, t.Second);
33 | Assert.Equal(dt.Millisecond, t.Millisecond);
34 | Assert.Equal(dt.Ticks % TimeSpan.TicksPerMillisecond, t.Ticks % TimeSpan.TicksPerMillisecond);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/System.Reflection.TypeLoader.Tests/src/Tests/TypeLoader/ExternalAssemblies.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.IO;
6 | using System.Linq;
7 | using System.Globalization;
8 | using System.Collections.Generic;
9 |
10 | using Xunit;
11 |
12 | namespace System.Reflection.Tests
13 | {
14 | public static partial class TypeLoaderTests
15 | {
16 | [Fact]
17 | public static void LoadExternalAssembly1()
18 | {
19 | using (TypeLoader tl = new TypeLoader())
20 | {
21 | Assembly runtimeAssembly = typeof(object).Assembly; // Intentionally not projected.
22 | string location = runtimeAssembly.Location;
23 |
24 | tl.Resolving +=
25 | delegate (TypeLoader sender, AssemblyName an)
26 | {
27 | return runtimeAssembly;
28 | };
29 |
30 | Assert.Throws(() => tl.LoadFromAssemblyName("DontCare"));
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/System.Security.Cryptography.Asn1.Experimental/System/Security/Cryptography/Asn1/PointerMemoryManager.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Buffers;
6 |
7 | namespace System.Security.Cryptography.Asn1
8 | {
9 | internal sealed unsafe class PointerMemoryManager : MemoryManager where T : struct
10 | {
11 | private readonly void* _pointer;
12 | private readonly int _length;
13 |
14 | internal PointerMemoryManager(void* pointer, int length)
15 | {
16 | _pointer = pointer;
17 | _length = length;
18 | }
19 |
20 | protected override void Dispose(bool disposing)
21 | {
22 | }
23 |
24 | public override Span GetSpan()
25 | {
26 | return new Span(_pointer, _length);
27 | }
28 |
29 | public override MemoryHandle Pin(int elementIndex = 0)
30 | {
31 | throw new NotSupportedException();
32 | }
33 |
34 | public override void Unpin()
35 | {
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/samples/ProxyService/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using Microsoft.AspNetCore.Hosting;
4 | using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions;
5 | using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets;
6 |
7 | namespace ProxyService
8 | {
9 | public class Program
10 | {
11 | public static string ListenUrl = "http://0.0.0.0:5001";
12 | public static string ForwardUrl = "http://localhost:5000";
13 |
14 | public static void Main(string[] args)
15 | {
16 | Console.WriteLine("Starting Program forwarding from port {0} to {1}", ListenUrl, ForwardUrl);
17 | var host = new WebHostBuilder()
18 | .UseKestrel(options =>
19 | {
20 | // Run callbacks on the transport thread
21 | options.ApplicationSchedulingMode = SchedulingMode.Inline;
22 | })
23 | .UseContentRoot(Directory.GetCurrentDirectory())
24 | .UseStartup()
25 | .UseUrls(ListenUrl)
26 | .UseSockets()
27 | .Build();
28 |
29 | host.Run();
30 | Console.WriteLine("Proxy Service Ending");
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tests/Microsoft.Data.Analysis.Tests/Microsoft.Data.Analysis.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net461;netcoreapp3.0
5 | netcoreapp3.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | TextTemplatingFileGenerator
19 | DataFrameColumn.BinaryOperationTests.cs
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | True
30 | True
31 | DataFrameColumn.BinaryOperationTests.tt
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/System.Reflection.TypeLoader/src/System/Reflection/TypeLoading/MethodBase/RoMethodBody.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.Diagnostics;
6 | using System.Collections.Generic;
7 |
8 | namespace System.Reflection.TypeLoading
9 | {
10 | internal abstract partial class RoMethodBody : MethodBody
11 | {
12 | protected RoMethodBody()
13 | {
14 | }
15 |
16 | public abstract override bool InitLocals { get; }
17 | public abstract override int MaxStackSize { get; }
18 | public abstract override int LocalSignatureMetadataToken { get; }
19 |
20 | // Unlike most apis, this one does not copy the byte array.
21 | public sealed override byte[] GetILAsByteArray() => _lazyIL ?? (_lazyIL = ComputeIL());
22 | protected abstract byte[] ComputeIL();
23 | private volatile byte[] _lazyIL;
24 |
25 | public abstract override IList LocalVariables { get; }
26 | public abstract override IList ExceptionHandlingClauses { get; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Experimental.Collections/Microsoft.Experimental.Collections.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | This package provides collections that are being considered for future versions of .NET Core.
4 | netstandard2.0
5 | collections system microsoft multivaluedictionary dictionaryslim
6 | 1.0.7
7 | pdbonly
8 | true
9 | true
10 |
11 | $(NoWarn);1584;1658
12 |
13 |
14 |
15 |
16 | True
17 | True
18 | Strings.resx
19 |
20 |
21 |
22 |
23 | ResXFileCodeGenerator
24 | Strings.Designer.cs
25 | System
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/tests/System.Text.Formatting.Tests/PrimitiveFormattingTests-Guid.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System.Text.Formatting.Tests
8 | {
9 | public partial class SystemTextFormattingTests
10 | {
11 | [Fact]
12 | public void FormatGuid()
13 | {
14 | var guid = Guid.NewGuid();
15 | var sb = new StringFormatter();
16 |
17 | sb.Append(guid);
18 | Assert.Equal(guid.ToString(), sb.ToString());
19 | sb.Clear();
20 |
21 | sb.Append(guid, 'D');
22 | Assert.Equal(guid.ToString("D"), sb.ToString());
23 | sb.Clear();
24 |
25 | sb.Append(guid, 'N');
26 | Assert.Equal(guid.ToString("N"), sb.ToString());
27 | sb.Clear();
28 |
29 | sb.Append(guid, 'B');
30 | Assert.Equal(guid.ToString("B"), sb.ToString());
31 | sb.Clear();
32 |
33 | sb.Append(guid, 'P');
34 | Assert.Equal(guid.ToString("P"), sb.ToString());
35 | sb.Clear();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tests/System.Time.Tests/DateTimeOffsetTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System._Time.Tests
8 | {
9 | public class DateTimeOffsetTests
10 | {
11 | [Fact]
12 | public void CanGetDateFromDateTimeOffset()
13 | {
14 | DateTimeOffset dto = DateTimeOffset.MaxValue;
15 |
16 | Date d = dto.GetDate();
17 |
18 | Assert.Equal(dto.Year, d.Year);
19 | Assert.Equal(dto.Month, d.Month);
20 | Assert.Equal(dto.Day, d.Day);
21 | }
22 |
23 | [Fact]
24 | public void CanGetTimeFromDateTimeOffset()
25 | {
26 | DateTimeOffset dto = DateTimeOffset.MaxValue;
27 |
28 | Time t = dto.GetTime();
29 |
30 | Assert.Equal(dto.Hour, t.Hour);
31 | Assert.Equal(dto.Minute, t.Minute);
32 | Assert.Equal(dto.Second, t.Second);
33 | Assert.Equal(dto.Millisecond, t.Millisecond);
34 | Assert.Equal(dto.Ticks % TimeSpan.TicksPerMillisecond, t.Ticks % TimeSpan.TicksPerMillisecond);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/eng/Versions.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0.1.2
5 | alpha
6 | 4.3.0
7 | 2.8.0-beta4
8 | 4.5.1
9 | 4.5.2
10 | 4.5.0
11 | 4.5.0
12 | 4.5.2
13 | 4.6.0
14 | 4.5.1
15 | 1.9.1
16 | 15.0.0
17 | 0.11.3
18 | 1.0.0
19 | 2.5.2
20 | 0.2.0
21 | 6.0.0-beta.21058.3
22 |
23 |
24 |
--------------------------------------------------------------------------------
/tests/System.Text.Formatting.Tests/System.Text.Formatting.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 | True
5 | ../../tools/test_key.snk
6 | true
7 | true
8 |
9 | Microsoft Corporation, All rights reserved
10 |
11 |
12 |
13 |
14 |
15 | False
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/tests/Benchmarks/README.md:
--------------------------------------------------------------------------------
1 | # CoreFxLab Benchmarks
2 |
3 | This project contains performance benchmarks.
4 |
5 | ## Run the Performance Tests
6 |
7 | **Pre-requisite:** The dotnet cli is available at the root in the dotnetcli directory. On a clean repo, build.cmd at the root installs the latest available dotnet.exe.
8 |
9 | **Pre-requisite:** To use dotnet cli from the root directory remember to set `DOTNET_MULTILEVEL_LOOKUP` environment variable to `0`!
10 |
11 | $env:DOTNET_MULTILEVEL_LOOKUP=0
12 |
13 | 1. Navigate to the benchmarks directory (corefxlab\tests\Benchmarks\)
14 |
15 | 2. Run the benchmarks in Release, choose one of the benchmarks when prompted
16 |
17 | ```log
18 | ..\..\dotnetcli\dotnet.exe run -c Release
19 | ```
20 |
21 | 3. To run specific tests only, pass in the filter to the harness:
22 |
23 | ```log
24 | ..\..\dotnetcli\dotnet.exe run -c Release -- --filter namespace*
25 | ..\..\dotnetcli\dotnet.exe run -c Release -- --filter *typeName*
26 | ..\..\dotnetcli\dotnet.exe run -c Release -- --filter *.methodName
27 | ..\..\dotnetcli\dotnet.exe run -c Release -- --filter namespace.typeName.methodName
28 | ```
29 |
30 | 4. To find out more about supported command line arguments run
31 |
32 | ```log
33 | ..\..\dotnetcli\dotnet.exe run -c Release -- --help
34 | ```
35 |
--------------------------------------------------------------------------------
/tests/System.Reflection.TypeLoader.Tests/src/Tests/Module/ModuleProhibitedApiTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System.IO;
6 | using System.Linq;
7 | using System.Collections.Generic;
8 |
9 | using Xunit;
10 |
11 | namespace System.Reflection.Tests
12 | {
13 | public static partial class ModuleTests
14 | {
15 | [Fact]
16 | public static void CannotDoWithReflectionOnlyModule()
17 | {
18 | using (TypeLoader tl = new TypeLoader())
19 | {
20 | // Storing as ICustomAttributeProvider so we don't accidentally pick up the CustomAttributeExtensions extension methods.
21 | ICustomAttributeProvider icp = tl.LoadFromByteArray(TestData.s_SimpleAssemblyImage).ManifestModule;
22 |
23 | Assert.Throws(() => icp.GetCustomAttributes(inherit: false));
24 | Assert.Throws(() => icp.GetCustomAttributes(null, inherit: false));
25 | Assert.Throws(() => icp.IsDefined(null, inherit: false));
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/samples/AzCopyCore/AzCopyCore.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27323.2
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzCopyCore", "AzCopyCore\AzCopyCore.csproj", "{0D5ECA4A-2037-46FD-A684-372C7DDCB577}"
7 | EndProject
8 | Global
9 | GlobalSection(Performance) = preSolution
10 | HasPerformanceSessions = true
11 | EndGlobalSection
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Any CPU = Debug|Any CPU
14 | Release|Any CPU = Release|Any CPU
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {0D5ECA4A-2037-46FD-A684-372C7DDCB577}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18 | {0D5ECA4A-2037-46FD-A684-372C7DDCB577}.Debug|Any CPU.Build.0 = Debug|Any CPU
19 | {0D5ECA4A-2037-46FD-A684-372C7DDCB577}.Release|Any CPU.ActiveCfg = Release|Any CPU
20 | {0D5ECA4A-2037-46FD-A684-372C7DDCB577}.Release|Any CPU.Build.0 = Release|Any CPU
21 | EndGlobalSection
22 | GlobalSection(SolutionProperties) = preSolution
23 | HideSolutionNode = FALSE
24 | EndGlobalSection
25 | GlobalSection(ExtensibilityGlobals) = postSolution
26 | SolutionGuid = {1C22ED6F-9702-40F9-8BFC-CB5192009D9E}
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/tests/System.Collections.Sequences.Tests/System.Collections.Sequences.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 | False
5 | ../../tools/test_key.snk
6 | true
7 | true
8 |
9 | Microsoft Corporation, All rights reserved
10 |
11 |
12 |
13 |
14 |
15 | False
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/tests/System.Numerics.Experimental.Tests/System.Numerics.Experimental.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.0
4 | True
5 | ../../tools/test_key.snk
6 | true
7 | true
8 |
9 | Microsoft Corporation, All rights reserved
10 |
11 |
12 |
13 |
14 |
15 | False
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/tests/System.Buffers.Experimental.Tests/BufferExtensionsTests.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using Xunit;
6 |
7 | namespace System.Buffers.Tests
8 | {
9 | public class BufferExtensionTests
10 | {
11 | [Fact]
12 | public void ToSpanOnReadableBufferSingleSpan()
13 | {
14 | byte[] data = { 0, 1, 2, 3, 4, 5, 6, 7 };
15 |
16 | var readable = BufferUtilities.CreateBuffer(data);
17 | var span = readable.ToSpan();
18 |
19 | Assert.True(readable.IsSingleSegment);
20 | Assert.Equal(span.Length, data.Length);
21 | }
22 |
23 | [Fact]
24 | public void ToSpanOnReadableBufferMultiSpan()
25 | {
26 | byte[] data1 = { 0, 1, 2 };
27 | byte[] data2 = { 3, 4, 5 };
28 | byte[] data3 = { 6, 7, 8 };
29 |
30 | var readable = BufferUtilities.CreateBuffer(data1, data2, data3);
31 | var span = readable.ToSpan();
32 |
33 | Assert.False(readable.IsSingleSegment);
34 | Assert.Equal(span.Length, data1.Length + data2.Length + data3.Length);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/ALCProxy.Communication/IProxyServer.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Reflection;
9 | using System.Runtime.Loader;
10 |
11 | namespace ALCProxy.Communication
12 | {
13 | ///
14 | /// The client interface we can wrap both in-proc and out-of-proc proxies around, will add more methods here as they are found needed by both versions
15 | ///
16 | public interface IProxyServer
17 | {
18 | ///
19 | /// Sends a message to the server to proc the method call, and return the result
20 | ///
21 | /// the method that needs to be called
22 | /// The parameters for the given method, converted into a serialized object by the client that now need to be deserialized
23 | /// The types of each stream, so the server knows how to decode the streams
24 | ///
25 | object CallObject(MethodInfo method, IList