You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.69
Former-commit-id: fc39669a0b707dd3c063977486506b6793da2890
This commit is contained in:
parent
d8f8abd549
commit
e2950ec768
@@ -11,8 +11,5 @@
|
||||
<InboxOnTargetFramework Include="$(UAPvNextTFM)" />
|
||||
<ProjectReference Include="..\src\System.IO.Ports.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InboxOnTargetFramework Include="$(UAPvNextTFM)" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
@@ -1,5 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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">
|
||||
@@ -169,4 +228,7 @@
|
||||
<data name="PlatformNotSupported_SerialPort_GetPortNames" xml:space="preserve">
|
||||
<value>Enumeration of serial port names is not supported on the current platform.</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="IO_PathTooLong_Path" xml:space="preserve">
|
||||
<value>The specified port name '{0}' is too long. The port name must be less than 260 characters.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -112,9 +112,6 @@
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.FileTypes.cs">
|
||||
<Link>Common\Interop\Windows\Interop.FileTypes.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernelbase\Interop.OpenCommPort.cs">
|
||||
<Link>Common\Interop\Windows\kernelbase\Interop.OpenCommPort.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\IO\PathInternal.Windows.cs">
|
||||
<Link>Common\System\IO\PathInternal.Windows.cs</Link>
|
||||
</Compile>
|
||||
@@ -130,6 +127,9 @@
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\Interop.BOOL.cs">
|
||||
<Link>Common\Interop\Windows\Interop.BOOL.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.CloseHandle.cs">
|
||||
<Link>Common\Interop\Windows\kernel32\Interop.CloseHandle.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap' and '$(TargetsWindows)' == 'true'">
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.CreateFile.cs">
|
||||
@@ -137,6 +137,9 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\mincore\Interop.OpenCommPort.cs">
|
||||
<Link>Common\Interop\Windows\mincore\Interop.OpenCommPort.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="System\IO\Ports\SerialPort.Uap.cs" />
|
||||
<Compile Include="System\IO\Ports\SerialStream.Uap.cs" />
|
||||
</ItemGroup>
|
||||
@@ -167,4 +170,4 @@
|
||||
<Reference Include="System.Threading.ThreadPool" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -56,8 +56,8 @@ namespace System.IO.Ports
|
||||
|
||||
// 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
|
||||
// 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)
|
||||
{
|
||||
@@ -77,7 +77,10 @@ namespace System.IO.Ports
|
||||
throw new UnauthorizedAccessException(string.Format(SR.UnauthorizedAccess_IODenied_Path, str));
|
||||
|
||||
case Interop.Errors.ERROR_FILENAME_EXCED_RANGE:
|
||||
throw new PathTooLongException(SR.IO_PathTooLong);
|
||||
if (string.IsNullOrEmpty(str))
|
||||
throw new PathTooLongException(SR.IO_PathTooLong);
|
||||
else
|
||||
throw new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, str));
|
||||
|
||||
case Interop.Errors.ERROR_SHARING_VIOLATION:
|
||||
// error message.
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace System.IO.Ports
|
||||
{
|
||||
public SafeFileHandle OpenPort(uint portNumber)
|
||||
{
|
||||
return Interop.KernelBase.OpenCommPort(
|
||||
return Interop.mincore.OpenCommPort(
|
||||
portNumber,
|
||||
Interop.Kernel32.GenericOperations.GENERIC_READ | Interop.Kernel32.GenericOperations.GENERIC_WRITE,
|
||||
NativeMethods.FILE_FLAG_OVERLAPPED);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace System.IO.Ports
|
||||
{
|
||||
public SafeFileHandle OpenPort(uint portNumber)
|
||||
{
|
||||
return Interop.Kernel32.CreateFileDefaultSecurity(
|
||||
return Interop.Kernel32.CreateFile(
|
||||
@"\\?\COM" + portNumber.ToString(CultureInfo.InvariantCulture),
|
||||
Interop.Kernel32.GenericOperations.GENERIC_READ | Interop.Kernel32.GenericOperations.GENERIC_WRITE,
|
||||
0, // comm devices must be opened w/exclusive-access
|
||||
|
||||
Reference in New Issue
Block a user