You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@@ -164,6 +164,9 @@ namespace System.Globalization
|
||||
[System.Security.SecuritySafeCritical]
|
||||
private String GetAsciiUsingOS(String unicode)
|
||||
{
|
||||
#if MONO
|
||||
throw new NotSupportedException ();
|
||||
#else
|
||||
if (unicode.Length == 0)
|
||||
{
|
||||
throw new ArgumentException(Environment.GetResourceString(
|
||||
@@ -208,6 +211,7 @@ namespace System.Globalization
|
||||
}
|
||||
|
||||
return new String(output, 0, length);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Gets Unicode version of the string. Normalized and limited to IDNA characters.
|
||||
@@ -267,6 +271,9 @@ namespace System.Globalization
|
||||
[System.Security.SecuritySafeCritical]
|
||||
private string GetUnicodeUsingOS(string ascii)
|
||||
{
|
||||
#if MONO
|
||||
throw new NotSupportedException ();
|
||||
#else
|
||||
uint flags = (uint)((AllowUnassigned ? IDN_ALLOW_UNASSIGNED : 0) | (UseStd3AsciiRules ? IDN_USE_STD3_ASCII_RULES : 0));
|
||||
int length = IdnToUnicode(flags, ascii, ascii.Length, null, 0);
|
||||
int lastError;
|
||||
@@ -297,6 +304,7 @@ namespace System.Globalization
|
||||
}
|
||||
|
||||
return new String(output, 0, length);
|
||||
#endif
|
||||
}
|
||||
|
||||
public override bool Equals(Object obj)
|
||||
@@ -1118,8 +1126,7 @@ namespace System.Globalization
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
|
||||
#if !MONO
|
||||
private const int IDN_ALLOW_UNASSIGNED = 0x1;
|
||||
private const int IDN_USE_STD3_ASCII_RULES = 0x2;
|
||||
|
||||
@@ -1136,7 +1143,8 @@ namespace System.Globalization
|
||||
[MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
|
||||
String lpUnicodeCharStr,
|
||||
int cchUnicodeChar,
|
||||
[System.Runtime.InteropServices.OutAttribute()]
|
||||
[System.Runtime.InteropServices.OutAttribute()]
|
||||
|
||||
char [] lpASCIICharStr,
|
||||
int cchASCIIChar);
|
||||
|
||||
@@ -1150,9 +1158,11 @@ namespace System.Globalization
|
||||
[MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
|
||||
string lpASCIICharStr,
|
||||
int cchASCIIChar,
|
||||
int cchASCIIChar,
|
||||
[System.Runtime.InteropServices.OutAttribute()]
|
||||
|
||||
char [] lpUnicodeCharStr,
|
||||
int cchUnicodeChar);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user