You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
50
external/corefx/src/System.IO.Ports/System.IO.Ports.sln
vendored
Normal file
50
external/corefx/src/System.IO.Ports/System.IO.Ports.sln
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.IO.Ports.Tests", "tests\System.IO.Ports.Tests.csproj", "{4259DCE9-3480-40BB-B08A-64A2D446264B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{187503F4-BEF9-4369-A1B2-E3DC5D564E4E} = {187503F4-BEF9-4369-A1B2-E3DC5D564E4E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.IO.Ports", "src\System.IO.Ports.csproj", "{187503F4-BEF9-4369-A1B2-E3DC5D564E4E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{75DE4259-43BB-4067-9F30-3AC920D51AEC} = {75DE4259-43BB-4067-9F30-3AC920D51AEC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.IO.Ports", "ref\System.IO.Ports.csproj", "{75DE4259-43BB-4067-9F30-3AC920D51AEC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4259DCE9-3480-40BB-B08A-64A2D446264B}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU
|
||||
{4259DCE9-3480-40BB-B08A-64A2D446264B}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU
|
||||
{4259DCE9-3480-40BB-B08A-64A2D446264B}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU
|
||||
{4259DCE9-3480-40BB-B08A-64A2D446264B}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU
|
||||
{187503F4-BEF9-4369-A1B2-E3DC5D564E4E}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU
|
||||
{187503F4-BEF9-4369-A1B2-E3DC5D564E4E}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU
|
||||
{187503F4-BEF9-4369-A1B2-E3DC5D564E4E}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU
|
||||
{187503F4-BEF9-4369-A1B2-E3DC5D564E4E}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU
|
||||
{75DE4259-43BB-4067-9F30-3AC920D51AEC}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
|
||||
{75DE4259-43BB-4067-9F30-3AC920D51AEC}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
|
||||
{75DE4259-43BB-4067-9F30-3AC920D51AEC}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
|
||||
{75DE4259-43BB-4067-9F30-3AC920D51AEC}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{4259DCE9-3480-40BB-B08A-64A2D446264B} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{187503F4-BEF9-4369-A1B2-E3DC5D564E4E} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
|
||||
{75DE4259-43BB-4067-9F30-3AC920D51AEC} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
7
external/corefx/src/System.IO.Ports/dir.props
vendored
Normal file
7
external/corefx/src/System.IO.Ports/dir.props
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
14
external/corefx/src/System.IO.Ports/pkg/System.IO.Ports.pkgproj
vendored
Normal file
14
external/corefx/src/System.IO.Ports/pkg/System.IO.Ports.pkgproj
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ref\System.IO.Ports.csproj">
|
||||
<SupportedFramework>net463;netcoreapp2.0</SupportedFramework>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\src\System.IO.Ports.csproj" />
|
||||
<NotSupportedOnTargetFramework Include="netcore50">
|
||||
<PackageTargetRuntime>win</PackageTargetRuntime>
|
||||
</NotSupportedOnTargetFramework>
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
8
external/corefx/src/System.IO.Ports/ref/Configurations.props
vendored
Normal file
8
external/corefx/src/System.IO.Ports/ref/Configurations.props
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildConfigurations>
|
||||
netstandard;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
124
external/corefx/src/System.IO.Ports/ref/System.IO.Ports.cs
vendored
Normal file
124
external/corefx/src/System.IO.Ports/ref/System.IO.Ports.cs
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public enum Handshake
|
||||
{
|
||||
None = 0,
|
||||
RequestToSend = 2,
|
||||
RequestToSendXOnXOff = 3,
|
||||
XOnXOff = 1,
|
||||
}
|
||||
public enum Parity
|
||||
{
|
||||
Even = 2,
|
||||
Mark = 3,
|
||||
None = 0,
|
||||
Odd = 1,
|
||||
Space = 4,
|
||||
}
|
||||
public enum SerialData
|
||||
{
|
||||
Chars = 1,
|
||||
Eof = 2,
|
||||
}
|
||||
public partial class SerialDataReceivedEventArgs : System.EventArgs
|
||||
{
|
||||
internal SerialDataReceivedEventArgs() { }
|
||||
public System.IO.Ports.SerialData EventType { get { throw null; } }
|
||||
}
|
||||
public delegate void SerialDataReceivedEventHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e);
|
||||
public enum SerialError
|
||||
{
|
||||
Frame = 8,
|
||||
Overrun = 2,
|
||||
RXOver = 1,
|
||||
RXParity = 4,
|
||||
TXFull = 256,
|
||||
}
|
||||
public partial class SerialErrorReceivedEventArgs : System.EventArgs
|
||||
{
|
||||
internal SerialErrorReceivedEventArgs() { }
|
||||
public System.IO.Ports.SerialError EventType { get { throw null; } }
|
||||
}
|
||||
public delegate void SerialErrorReceivedEventHandler(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e);
|
||||
public enum SerialPinChange
|
||||
{
|
||||
Break = 64,
|
||||
CDChanged = 32,
|
||||
CtsChanged = 8,
|
||||
DsrChanged = 16,
|
||||
Ring = 256,
|
||||
}
|
||||
public partial class SerialPinChangedEventArgs : System.EventArgs
|
||||
{
|
||||
internal SerialPinChangedEventArgs() { }
|
||||
public System.IO.Ports.SerialPinChange EventType { get { throw null; } }
|
||||
}
|
||||
public delegate void SerialPinChangedEventHandler(object sender, System.IO.Ports.SerialPinChangedEventArgs e);
|
||||
public partial class SerialPort : System.ComponentModel.Component
|
||||
{
|
||||
public const int InfiniteTimeout = -1;
|
||||
public SerialPort() { }
|
||||
public SerialPort(System.ComponentModel.IContainer container) { }
|
||||
public SerialPort(string portName) { }
|
||||
public SerialPort(string portName, int baudRate) { }
|
||||
public SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity) { }
|
||||
public SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity, int dataBits) { }
|
||||
public SerialPort(string portName, int baudRate, System.IO.Ports.Parity parity, int dataBits, System.IO.Ports.StopBits stopBits) { }
|
||||
public System.IO.Stream BaseStream { get { throw null; } }
|
||||
public int BaudRate { get { throw null; } set { } }
|
||||
public bool BreakState { get { throw null; } set { } }
|
||||
public int BytesToRead { get { throw null; } }
|
||||
public int BytesToWrite { get { throw null; } }
|
||||
public bool CDHolding { get { throw null; } }
|
||||
public bool CtsHolding { get { throw null; } }
|
||||
public int DataBits { get { throw null; } set { } }
|
||||
public bool DiscardNull { get { throw null; } set { } }
|
||||
public bool DsrHolding { get { throw null; } }
|
||||
public bool DtrEnable { get { throw null; } set { } }
|
||||
public System.Text.Encoding Encoding { get { throw null; } set { } }
|
||||
public System.IO.Ports.Handshake Handshake { get { throw null; } set { } }
|
||||
public bool IsOpen { get { throw null; } }
|
||||
public string NewLine { get { throw null; } set { } }
|
||||
public System.IO.Ports.Parity Parity { get { throw null; } set { } }
|
||||
public byte ParityReplace { get { throw null; } set { } }
|
||||
public string PortName { get { throw null; } set { } }
|
||||
public int ReadBufferSize { get { throw null; } set { } }
|
||||
public int ReadTimeout { get { throw null; } set { } }
|
||||
public int ReceivedBytesThreshold { get { throw null; } set { } }
|
||||
public bool RtsEnable { get { throw null; } set { } }
|
||||
public System.IO.Ports.StopBits StopBits { get { throw null; } set { } }
|
||||
public int WriteBufferSize { get { throw null; } set { } }
|
||||
public int WriteTimeout { get { throw null; } set { } }
|
||||
public event System.IO.Ports.SerialDataReceivedEventHandler DataReceived { add { } remove { } }
|
||||
public event System.IO.Ports.SerialErrorReceivedEventHandler ErrorReceived { add { } remove { } }
|
||||
public event System.IO.Ports.SerialPinChangedEventHandler PinChanged { add { } remove { } }
|
||||
public void Close() { }
|
||||
public void DiscardInBuffer() { }
|
||||
public void DiscardOutBuffer() { }
|
||||
protected override void Dispose(bool disposing) { }
|
||||
public static string[] GetPortNames() { throw null; }
|
||||
public void Open() { }
|
||||
public int Read(byte[] buffer, int offset, int count) { throw null; }
|
||||
public int Read(char[] buffer, int offset, int count) { throw null; }
|
||||
public int ReadByte() { throw null; }
|
||||
public int ReadChar() { throw null; }
|
||||
public string ReadExisting() { throw null; }
|
||||
public string ReadLine() { throw null; }
|
||||
public string ReadTo(string value) { throw null; }
|
||||
public void Write(byte[] buffer, int offset, int count) { }
|
||||
public void Write(char[] buffer, int offset, int count) { }
|
||||
public void Write(string text) { }
|
||||
public void WriteLine(string text) { }
|
||||
}
|
||||
public enum StopBits
|
||||
{
|
||||
None = 0,
|
||||
One = 1,
|
||||
OnePointFive = 3,
|
||||
Two = 2,
|
||||
}
|
||||
}
|
||||
14
external/corefx/src/System.IO.Ports/ref/System.IO.Ports.csproj
vendored
Normal file
14
external/corefx/src/System.IO.Ports/ref/System.IO.Ports.csproj
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{75DE4259-43BB-4067-9F30-3AC920D51AEC}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
|
||||
<ItemGroup>
|
||||
<Compile Include="System.IO.Ports.cs" />
|
||||
<Reference Include="netstandard" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
9
external/corefx/src/System.IO.Ports/src/Configurations.props
vendored
Normal file
9
external/corefx/src/System.IO.Ports/src/Configurations.props
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildConfigurations>
|
||||
netstandard-Windows_NT;
|
||||
netfx;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
14
external/corefx/src/System.IO.Ports/src/PinvokeAnalyzerExceptionList.analyzerdata
vendored
Normal file
14
external/corefx/src/System.IO.Ports/src/PinvokeAnalyzerExceptionList.analyzerdata
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
kernel32.dll!ClearCommBreak
|
||||
kernel32.dll!ClearCommError
|
||||
kernel32.dll!CreateFileW
|
||||
kernel32.dll!EscapeCommFunction
|
||||
kernel32.dll!GetCommModemStatus
|
||||
kernel32.dll!GetCommProperties
|
||||
kernel32.dll!GetCommState
|
||||
kernel32.dll!PurgeComm
|
||||
kernel32.dll!SetCommBreak
|
||||
kernel32.dll!SetCommMask
|
||||
kernel32.dll!SetCommState
|
||||
kernel32.dll!SetCommTimeouts
|
||||
kernel32.dll!SetupComm
|
||||
kernel32.dll!WaitCommEvent
|
||||
172
external/corefx/src/System.IO.Ports/src/Resources/Strings.resx
vendored
Normal file
172
external/corefx/src/System.IO.Ports/src/Resources/Strings.resx
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="IO_EOF_ReadBeyondEOF" xml:space="preserve">
|
||||
<value>Unable to read beyond the end of the stream.</value>
|
||||
</data>
|
||||
<data name="BaseStream_Invalid_Not_Open" xml:space="preserve">
|
||||
<value>The BaseStream is only available when the port is open.</value>
|
||||
</data>
|
||||
<data name="PortNameEmpty_String" xml:space="preserve">
|
||||
<value>The PortName cannot be empty.</value>
|
||||
</data>
|
||||
<data name="Port_not_open" xml:space="preserve">
|
||||
<value>The port is closed.</value>
|
||||
</data>
|
||||
<data name="Port_already_open" xml:space="preserve">
|
||||
<value>The port is already open.</value>
|
||||
</data>
|
||||
<data name="Cant_be_set_when_open" xml:space="preserve">
|
||||
<value>'{0}' cannot be set while the port is open.</value>
|
||||
</data>
|
||||
<data name="Max_Baud" xml:space="preserve">
|
||||
<value>The maximum baud rate for the device is {0}.</value>
|
||||
</data>
|
||||
<data name="In_Break_State" xml:space="preserve">
|
||||
<value>The port is in the break state and cannot be written to.</value>
|
||||
</data>
|
||||
<data name="Write_timed_out" xml:space="preserve">
|
||||
<value>The write timed out.</value>
|
||||
</data>
|
||||
<data name="CantSetRtsWithHandshaking" xml:space="preserve">
|
||||
<value>RtsEnable cannot be accessed if Handshake is set to RequestToSend or RequestToSendXOnXOff.</value>
|
||||
</data>
|
||||
<data name="NotSupportedEncoding" xml:space="preserve">
|
||||
<value>SerialPort does not support encoding '{0}'. The supported encodings include ASCIIEncoding, UTF8Encoding, UnicodeEncoding, UTF32Encoding, and most single or double byte code pages. For a complete list please see the documentation.</value>
|
||||
</data>
|
||||
<data name="Arg_InvalidSerialPort" xml:space="preserve">
|
||||
<value>The given port name does not start with COM/com or does not resolve to a valid serial port.</value>
|
||||
</data>
|
||||
<data name="Arg_InvalidSerialPortExtended" xml:space="preserve">
|
||||
<value>The given port name is invalid. It may be a valid port, but not a serial port.</value>
|
||||
</data>
|
||||
<data name="Argument_InvalidOffLen" xml:space="preserve">
|
||||
<value>Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.</value>
|
||||
</data>
|
||||
<data name="ArgumentOutOfRange_Bounds_Lower_Upper" xml:space="preserve">
|
||||
<value>Argument must be between {0} and {1}.</value>
|
||||
</data>
|
||||
<data name="ArgumentOutOfRange_Enum" xml:space="preserve">
|
||||
<value>Enum value was out of legal range.</value>
|
||||
</data>
|
||||
<data name="ArgumentOutOfRange_NeedNonNegNumRequired" xml:space="preserve">
|
||||
<value>Non-negative number required.</value>
|
||||
</data>
|
||||
<data name="ArgumentOutOfRange_NeedPosNum" xml:space="preserve">
|
||||
<value>Positive number required.</value>
|
||||
</data>
|
||||
<data name="ArgumentOutOfRange_Timeout" xml:space="preserve">
|
||||
<value>The timeout must be greater than or equal to -1.</value>
|
||||
</data>
|
||||
<data name="ArgumentOutOfRange_WriteTimeout" xml:space="preserve">
|
||||
<value>The timeout must be either a positive number or -1.</value>
|
||||
</data>
|
||||
<data name="IndexOutOfRange_IORaceCondition" xml:space="preserve">
|
||||
<value>Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.</value>
|
||||
</data>
|
||||
<data name="IO_BindHandleFailed" xml:space="preserve">
|
||||
<value>BindHandle for ThreadPool failed on this handle.</value>
|
||||
</data>
|
||||
<data name="IO_OperationAborted" xml:space="preserve">
|
||||
<value>The I/O operation has been aborted because of either a thread exit or an application request.</value>
|
||||
</data>
|
||||
<data name="NotSupported_UnseekableStream" xml:space="preserve">
|
||||
<value>Stream does not support seeking.</value>
|
||||
</data>
|
||||
<data name="IO_EOF_ReadBeyondEOF" xml:space="preserve">
|
||||
<value>Unable to read beyond the end of the stream.</value>
|
||||
</data>
|
||||
<data name="ObjectDisposed_StreamClosed" xml:space="preserve">
|
||||
<value>Can not access a closed Stream.</value>
|
||||
</data>
|
||||
<data name="InvalidNullEmptyArgument" xml:space="preserve">
|
||||
<value>Argument {0} cannot be null or zero-length.</value>
|
||||
</data>
|
||||
<data name="Arg_WrongAsyncResult" xml:space="preserve">
|
||||
<value>IAsyncResult object did not come from the corresponding async method on this type.</value>
|
||||
</data>
|
||||
<data name="InvalidOperation_EndReadCalledMultiple" xml:space="preserve">
|
||||
<value>EndRead can only be called once for each asynchronous operation.</value>
|
||||
</data>
|
||||
<data name="InvalidOperation_EndWriteCalledMultiple" xml:space="preserve">
|
||||
<value>EndWrite can only be called once for each asynchronous operation.</value>
|
||||
</data>
|
||||
<data name="IO_PortNotFound" xml:space="preserve">
|
||||
<value>The specified port does not exist.</value>
|
||||
</data>
|
||||
<data name="IO_PortNotFoundFileName" xml:space="preserve">
|
||||
<value>The port '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="UnauthorizedAccess_IODenied_NoPathName" xml:space="preserve">
|
||||
<value>Access to the port is denied.</value>
|
||||
</data>
|
||||
<data name="IO_PathTooLong" xml:space="preserve">
|
||||
<value>The specified port name is too long. The port name must be less than 260 characters.</value>
|
||||
</data>
|
||||
<data name="IO_SharingViolation_NoFileName" xml:space="preserve">
|
||||
<value>The process cannot access the port because it is being used by another process.</value>
|
||||
</data>
|
||||
<data name="IO_SharingViolation_File" xml:space="preserve">
|
||||
<value>The process cannot access the port '{0}' because it is being used by another process.</value>
|
||||
</data>
|
||||
<data name="UnauthorizedAccess_IODenied_Path" xml:space="preserve">
|
||||
<value>Access to the port '{0}' is denied.</value>
|
||||
</data>
|
||||
</root>
|
||||
138
external/corefx/src/System.IO.Ports/src/System.IO.Ports.csproj
vendored
Normal file
138
external/corefx/src/System.IO.Ports/src/System.IO.Ports.csproj
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ProjectGuid>{187503F4-BEF9-4369-A1B2-E3DC5D564E4E}</ProjectGuid>
|
||||
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
|
||||
</PropertyGroup>
|
||||
<!-- Default configurations to help VS understand the options -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Release|AnyCPU'" />
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
|
||||
<Compile Include="System\IO\Ports\Handshake.cs" />
|
||||
<Compile Include="System\IO\Ports\InternalResources.cs" />
|
||||
<Compile Include="System\IO\Ports\NativeMethods.cs" />
|
||||
<Compile Include="System\IO\Ports\Parity.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialData.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialDataReceivedEventHandler.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialError.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialErrorReceivedEventArgs.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialErrorReceivedEventHandler.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialPinChange.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialPinChangedEventArgs.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialPinChangedEventHandler.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialPort.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="System\IO\Ports\SerialDataReceivedEventArgs.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialStream.cs" />
|
||||
<Compile Include="System\IO\Ports\StopBits.cs" />
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.DCB.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.DCB.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.COMMPROP.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.COMMPROP.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.COMMTIMEOUTS.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.COMMTIMEOUTS.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.COMSTAT.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.COMSTAT.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SetCommState.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.SetCommState.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SetCommBreak.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.SetCommBreak.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.ClearCommBreak.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.ClearCommBreak.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.EscapeCommFunction.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.EscapeCommFunction.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SetCommTimeouts.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.SetCommTimeouts.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetCommModemStatus.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.GetCommModemStatus.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.ClearCommError.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.ClearCommError.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetCommProperties.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.GetCommProperties.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SetCommMask.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.SetCommMask.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.PurgeComm.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.PurgeComm.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SetupComm.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.SetupComm.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetCommState.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.GetCommState.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.WaitCommEvent.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.WaitCommEvent.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.CreateFile.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.CreateFile.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.ReadFile_SafeHandle_IntPtr.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.ReadFile_SafeHandle_IntPtr.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.ReadFile_SafeHandle_NativeOverlapped.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.ReadFile_SafeHandle_NativeOverlapped.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.WriteFile_SafeHandle_IntPtr.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.WriteFile_SafeHandle_IntPtr.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.WriteFile_SafeHandle_NativeOverlapped.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.WriteFile_SafeHandle_NativeOverlapped.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetOverlappedResult.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.GetOverlappedResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.FlushFileBuffers.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.FlushFileBuffers.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GenericOperations.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.GenericOperations.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SECURITY_ATTRIBUTES.cs">
|
||||
<Link>Common\Interop\Windows\Interop.SECURITY_ATTRIBUTES.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.FileTypes.cs">
|
||||
<Link>Common\Interop\Windows\Interop.FileTypes.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\IO\PathInternal.Windows.cs">
|
||||
<Link>Common\System\IO\PathInternal.Windows.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetFileType_SafeHandle.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.GetFileType_SafeHandle.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
|
||||
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Errors.cs">
|
||||
<Link>Common\Interop\Windows\Interop.Errors.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\Interop.BOOL.cs">
|
||||
<Link>Common\Interop\Windows\Interop.BOOL.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
|
||||
<Reference Include="Microsoft.Win32.Registry" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
14
external/corefx/src/System.IO.Ports/src/System/IO/Ports/Handshake.cs
vendored
Normal file
14
external/corefx/src/System.IO.Ports/src/System/IO/Ports/Handshake.cs
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public enum Handshake
|
||||
{
|
||||
None,
|
||||
XOnXOff,
|
||||
RequestToSend,
|
||||
RequestToSendXOnXOff
|
||||
};
|
||||
}
|
||||
102
external/corefx/src/System.IO.Ports/src/System/IO/Ports/InternalResources.cs
vendored
Normal file
102
external/corefx/src/System.IO.Ports/src/System/IO/Ports/InternalResources.cs
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.ComponentModel;
|
||||
using Marshal = System.Runtime.InteropServices.Marshal;
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
internal static class InternalResources
|
||||
{
|
||||
// Beginning of static Error methods
|
||||
internal static void EndOfFile()
|
||||
{
|
||||
throw new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
|
||||
}
|
||||
|
||||
internal static String GetMessage(int errorCode)
|
||||
{
|
||||
return new Win32Exception(errorCode).Message;
|
||||
}
|
||||
|
||||
internal static void FileNotOpen()
|
||||
{
|
||||
throw new ObjectDisposedException(null, SR.Port_not_open);
|
||||
}
|
||||
|
||||
internal static void WrongAsyncResult()
|
||||
{
|
||||
throw new ArgumentException(SR.Arg_WrongAsyncResult);
|
||||
}
|
||||
|
||||
internal static void EndReadCalledTwice()
|
||||
{
|
||||
// Should ideally be InvalidOperationExc but we can't maintain parity with Stream and SerialStream without some work
|
||||
throw new ArgumentException(SR.InvalidOperation_EndReadCalledMultiple);
|
||||
}
|
||||
|
||||
internal static void EndWriteCalledTwice()
|
||||
{
|
||||
// Should ideally be InvalidOperationExc but we can't maintain parity with Stream and SerialStream without some work
|
||||
throw new ArgumentException(SR.InvalidOperation_EndWriteCalledMultiple);
|
||||
}
|
||||
|
||||
internal static void WinIOError()
|
||||
{
|
||||
int errorCode = Marshal.GetLastWin32Error();
|
||||
WinIOError(errorCode, String.Empty);
|
||||
}
|
||||
|
||||
internal static void WinIOError(string str)
|
||||
{
|
||||
int errorCode = Marshal.GetLastWin32Error();
|
||||
WinIOError(errorCode, str);
|
||||
}
|
||||
|
||||
// After calling GetLastWin32Error(), it clears the last error field,
|
||||
// so you must save the HResult and pass it to this method. This method
|
||||
// will determine the appropriate exception to throw dependent on your
|
||||
// error, and depending on the error, insert a string into the message
|
||||
// gotten from the ResourceManager.
|
||||
internal static void WinIOError(int errorCode, String str)
|
||||
{
|
||||
switch (errorCode)
|
||||
{
|
||||
case Interop.Errors.ERROR_FILE_NOT_FOUND:
|
||||
case Interop.Errors.ERROR_PATH_NOT_FOUND:
|
||||
if (str.Length == 0)
|
||||
throw new IOException(SR.IO_PortNotFound);
|
||||
else
|
||||
throw new IOException(string.Format(SR.IO_PortNotFoundFileName, str));
|
||||
|
||||
case Interop.Errors.ERROR_ACCESS_DENIED:
|
||||
if (str.Length == 0)
|
||||
throw new UnauthorizedAccessException(SR.UnauthorizedAccess_IODenied_NoPathName);
|
||||
else
|
||||
throw new UnauthorizedAccessException(string.Format(SR.UnauthorizedAccess_IODenied_Path, str));
|
||||
|
||||
case Interop.Errors.ERROR_FILENAME_EXCED_RANGE:
|
||||
throw new PathTooLongException(SR.IO_PathTooLong);
|
||||
|
||||
case Interop.Errors.ERROR_SHARING_VIOLATION:
|
||||
// error message.
|
||||
if (str.Length == 0)
|
||||
throw new IOException(SR.IO_SharingViolation_NoFileName);
|
||||
else
|
||||
throw new IOException(string.Format(SR.IO_SharingViolation_File, str));
|
||||
|
||||
default:
|
||||
throw new IOException(GetMessage(errorCode), MakeHRFromErrorCode(errorCode));
|
||||
}
|
||||
}
|
||||
|
||||
// Use this to translate error codes like the above into HRESULTs like
|
||||
// 0x80070006 for ERROR_INVALID_HANDLE
|
||||
internal static int MakeHRFromErrorCode(int errorCode)
|
||||
{
|
||||
return unchecked(((int)0x80070000) | errorCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
90
external/corefx/src/System.IO.Ports/src/System/IO/Ports/NativeMethods.cs
vendored
Normal file
90
external/corefx/src/System.IO.Ports/src/System/IO/Ports/NativeMethods.cs
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
// TODO: These should be put in Common\Interop in classes like GenericOperations
|
||||
internal class NativeMethods
|
||||
{
|
||||
internal const int FILE_ATTRIBUTE_NORMAL = 0x00000080;
|
||||
internal const int FILE_FLAG_OVERLAPPED = 0x40000000;
|
||||
|
||||
// The following are unique to the SerialPort/SerialStream classes
|
||||
internal const byte ONESTOPBIT = 0;
|
||||
internal const byte ONE5STOPBITS = 1;
|
||||
internal const byte TWOSTOPBITS = 2;
|
||||
|
||||
internal const int DTR_CONTROL_DISABLE = 0x00;
|
||||
internal const int DTR_CONTROL_ENABLE = 0x01;
|
||||
internal const int DTR_CONTROL_HANDSHAKE = 0x02;
|
||||
|
||||
internal const int RTS_CONTROL_DISABLE = 0x00;
|
||||
internal const int RTS_CONTROL_ENABLE = 0x01;
|
||||
internal const int RTS_CONTROL_HANDSHAKE = 0x02;
|
||||
internal const int RTS_CONTROL_TOGGLE = 0x03;
|
||||
|
||||
internal const int MS_CTS_ON = 0x10;
|
||||
internal const int MS_DSR_ON = 0x20;
|
||||
internal const int MS_RING_ON = 0x40;
|
||||
internal const int MS_RLSD_ON = 0x80;
|
||||
|
||||
internal const byte EOFCHAR = 26;
|
||||
|
||||
// Since C# does not provide access to bitfields and the native DCB structure contains
|
||||
// a very necessary one, these are the positional offsets (from the right) of areas
|
||||
// of the 32-bit integer used in SerialStream's SetDcbFlag() and GetDcbFlag() methods.
|
||||
internal const int FBINARY = 0;
|
||||
internal const int FPARITY = 1;
|
||||
internal const int FOUTXCTSFLOW = 2;
|
||||
internal const int FOUTXDSRFLOW = 3;
|
||||
internal const int FDTRCONTROL = 4;
|
||||
internal const int FDSRSENSITIVITY = 6;
|
||||
internal const int FTXCONTINUEONXOFF = 7;
|
||||
internal const int FOUTX = 8;
|
||||
internal const int FINX = 9;
|
||||
internal const int FERRORCHAR = 10;
|
||||
internal const int FNULL = 11;
|
||||
internal const int FRTSCONTROL = 12;
|
||||
internal const int FABORTONOERROR = 14;
|
||||
internal const int FDUMMY2 = 15;
|
||||
|
||||
internal const int PURGE_TXABORT = 0x0001; // Kill the pending/current writes to the comm port.
|
||||
internal const int PURGE_RXABORT = 0x0002; // Kill the pending/current reads to the comm port.
|
||||
internal const int PURGE_TXCLEAR = 0x0004; // Kill the transmit queue if there.
|
||||
internal const int PURGE_RXCLEAR = 0x0008; // Kill the typeahead buffer if there.
|
||||
|
||||
internal const byte DEFAULTXONCHAR = (byte)17;
|
||||
internal const byte DEFAULTXOFFCHAR = (byte)19;
|
||||
|
||||
internal const int SETRTS = 3; // Set RTS high
|
||||
internal const int CLRRTS = 4; // Set RTS low
|
||||
internal const int SETDTR = 5; // Set DTR high
|
||||
internal const int CLRDTR = 6;
|
||||
|
||||
internal const int EV_RXCHAR = 0x01;
|
||||
internal const int EV_RXFLAG = 0x02;
|
||||
internal const int EV_CTS = 0x08;
|
||||
internal const int EV_DSR = 0x10;
|
||||
internal const int EV_RLSD = 0x20;
|
||||
internal const int EV_BREAK = 0x40;
|
||||
internal const int EV_ERR = 0x80;
|
||||
internal const int EV_RING = 0x100;
|
||||
internal const int ALL_EVENTS = 0x1fb; // don't use EV_TXEMPTY
|
||||
|
||||
internal const int CE_RXOVER = 0x01;
|
||||
internal const int CE_OVERRUN = 0x02;
|
||||
internal const int CE_PARITY = 0x04;
|
||||
internal const int CE_FRAME = 0x08;
|
||||
internal const int CE_BREAK = 0x10;
|
||||
internal const int CE_TXFULL = 0x100;
|
||||
|
||||
internal const int MAXDWORD = -1; // note this is 0xfffffff, or UInt32.MaxValue, here used as an int
|
||||
|
||||
internal const int NOPARITY = 0;
|
||||
internal const int ODDPARITY = 1;
|
||||
internal const int EVENPARITY = 2;
|
||||
internal const int MARKPARITY = 3;
|
||||
internal const int SPACEPARITY = 4;
|
||||
}
|
||||
}
|
||||
16
external/corefx/src/System.IO.Ports/src/System/IO/Ports/Parity.cs
vendored
Normal file
16
external/corefx/src/System.IO.Ports/src/System/IO/Ports/Parity.cs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public enum Parity
|
||||
{
|
||||
None = NativeMethods.NOPARITY,
|
||||
Odd = NativeMethods.ODDPARITY,
|
||||
Even = NativeMethods.EVENPARITY,
|
||||
Mark = NativeMethods.MARKPARITY,
|
||||
Space = NativeMethods.SPACEPARITY
|
||||
};
|
||||
}
|
||||
|
||||
15
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialData.cs
vendored
Normal file
15
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialData.cs
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public enum SerialData
|
||||
{
|
||||
// EV_RXCHAR
|
||||
Chars = 0x01,
|
||||
|
||||
// EV_RXFLAG
|
||||
Eof = 0x02
|
||||
}
|
||||
}
|
||||
17
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialDataReceivedEventArgs.cs
vendored
Normal file
17
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialDataReceivedEventArgs.cs
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public class SerialDataReceivedEventArgs : EventArgs
|
||||
{
|
||||
internal SerialDataReceivedEventArgs(SerialData eventCode)
|
||||
{
|
||||
EventType = eventCode;
|
||||
}
|
||||
|
||||
public SerialData EventType { get; private set; }
|
||||
}
|
||||
}
|
||||
|
||||
8
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialDataReceivedEventHandler.cs
vendored
Normal file
8
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialDataReceivedEventHandler.cs
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public delegate void SerialDataReceivedEventHandler(object sender, SerialDataReceivedEventArgs e);
|
||||
}
|
||||
15
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialError.cs
vendored
Normal file
15
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialError.cs
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public enum SerialError
|
||||
{
|
||||
TXFull = NativeMethods.CE_TXFULL,
|
||||
RXOver = NativeMethods.CE_RXOVER,
|
||||
Overrun = NativeMethods.CE_OVERRUN,
|
||||
RXParity = NativeMethods.CE_PARITY,
|
||||
Frame = NativeMethods.CE_FRAME,
|
||||
}
|
||||
}
|
||||
16
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialErrorReceivedEventArgs.cs
vendored
Normal file
16
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialErrorReceivedEventArgs.cs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public class SerialErrorReceivedEventArgs : EventArgs
|
||||
{
|
||||
internal SerialErrorReceivedEventArgs(SerialError eventCode)
|
||||
{
|
||||
EventType = eventCode;
|
||||
}
|
||||
|
||||
public SerialError EventType { get; private set; }
|
||||
}
|
||||
}
|
||||
8
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialErrorReceivedEventHandler.cs
vendored
Normal file
8
external/corefx/src/System.IO.Ports/src/System/IO/Ports/SerialErrorReceivedEventHandler.cs
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.IO.Ports
|
||||
{
|
||||
public delegate void SerialErrorReceivedEventHandler(object sender, SerialErrorReceivedEventArgs e);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user