Simplify built-in types across corefx (#30656)

This commit is contained in:
Stephen Toub 2018-06-25 19:54:41 -04:00 коммит произвёл Jan Kotas
Родитель a10890f4ff
Коммит e0ba7aa802
689 изменённых файлов: 4945 добавлений и 4945 удалений

Просмотреть файл

@ -35,6 +35,6 @@ internal static partial class Interop
internal static extern unsafe bool GetLocaleInfoGroupingSizes(string localeName, uint localeGroupingData, ref int primaryGroupSize, ref int secondaryGroupSize);
[DllImport(Libraries.GlobalizationNative, CharSet = CharSet.Unicode, EntryPoint = "GlobalizationNative_GetLocales")]
internal static extern unsafe int GetLocales([Out] Char[] value, int valueLength);
internal static extern unsafe int GetLocales([Out] char[] value, int valueLength);
}
}

Просмотреть файл

@ -32,7 +32,7 @@ namespace System.Globalization
internal partial class CalendarData
{
private bool LoadCalendarDataFromSystem(String localeName, CalendarId calendarId)
private bool LoadCalendarDataFromSystem(string localeName, CalendarId calendarId)
{
bool result = true;
result &= GetCalendarInfo(localeName, calendarId, CalendarDataType.NativeName, out this.sNativeName);

Просмотреть файл

@ -722,7 +722,7 @@ namespace System.Globalization
}
}
private unsafe SortKey CreateSortKey(String source, CompareOptions options)
private unsafe SortKey CreateSortKey(string source, CompareOptions options)
{
Debug.Assert(!_invariantMode);

Просмотреть файл

@ -227,19 +227,19 @@ namespace System.Globalization
return this.GetLocaleInfo(LocaleNumberData.FirstDayOfWeek);
}
private String[] GetTimeFormats()
private string[] GetTimeFormats()
{
string format = GetTimeFormatString(false);
return new string[] { format };
}
private String[] GetShortTimeFormats()
private string[] GetShortTimeFormats()
{
string format = GetTimeFormatString(true);
return new string[] { format };
}
private static CultureData GetCultureDataFromRegionName(String regionName)
private static CultureData GetCultureDataFromRegionName(string regionName)
{
// no support to lookup by region name, other than the hard-coded list in CultureData
return null;
@ -371,7 +371,7 @@ namespace System.Globalization
return Array.Empty<CultureInfo>();
}
Char [] chars = new Char[bufferLength];
char [] chars = new char[bufferLength];
bufferLength = Interop.Globalization.GetLocales(chars, bufferLength);
if (bufferLength <= 0)
@ -394,7 +394,7 @@ namespace System.Globalization
int length = (int) chars[index++];
if (index + length <= bufferLength)
{
CultureInfo ci = CultureInfo.GetCultureInfo(new String(chars, index, length));
CultureInfo ci = CultureInfo.GetCultureInfo(new string(chars, index, length));
if ((enumNeutrals && ci.IsNeutralCulture) || (enumSpecificss && !ci.IsNeutralCulture))
{
list.Add(ci);

Просмотреть файл

@ -46,7 +46,7 @@ namespace System.Globalization
// PAL Layer ends here
private static string[] JapaneseErasEnglishNames = new String[] { "M", "T", "S", "H" };
private static string[] JapaneseErasEnglishNames = new string[] { "M", "T", "S", "H" };
private static string GetJapaneseEnglishEraName(int era)
{

Просмотреть файл

@ -33,7 +33,7 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLBindCol(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLUSMALLINT*/UInt16 ColumnNumber,
/*SQLUSMALLINT*/ushort ColumnNumber,
/*SQLSMALLINT*/ODBC32.SQL_C TargetType,
/*SQLPOINTER*/HandleRef TargetValue,
/*SQLLEN*/IntPtr BufferLength,
@ -42,7 +42,7 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLBindCol(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLUSMALLINT*/UInt16 ColumnNumber,
/*SQLUSMALLINT*/ushort ColumnNumber,
/*SQLSMALLINT*/ODBC32.SQL_C TargetType,
/*SQLPOINTER*/IntPtr TargetValue,
/*SQLLEN*/IntPtr BufferLength,
@ -51,10 +51,10 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLBindParameter(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLUSMALLINT*/UInt16 ParameterNumber,
/*SQLSMALLINT*/Int16 ParamDirection,
/*SQLUSMALLINT*/ushort ParameterNumber,
/*SQLSMALLINT*/short ParamDirection,
/*SQLSMALLINT*/ODBC32.SQL_C SQLCType,
/*SQLSMALLINT*/Int16 SQLType,
/*SQLSMALLINT*/short SQLType,
/*SQLULEN*/IntPtr cbColDef,
/*SQLSMALLINT*/IntPtr ibScale,
/*SQLPOINTER*/HandleRef rgbValue,
@ -72,11 +72,11 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLColAttributeW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLUSMALLINT*/Int16 ColumnNumber,
/*SQLUSMALLINT*/Int16 FieldIdentifier,
/*SQLUSMALLINT*/short ColumnNumber,
/*SQLUSMALLINT*/short FieldIdentifier,
/*SQLPOINTER*/CNativeBuffer CharacterAttribute,
/*SQLSMALLINT*/Int16 BufferLength,
/*SQLSMALLINT* */out Int16 StringLength,
/*SQLSMALLINT*/short BufferLength,
/*SQLSMALLINT* */out short StringLength,
/*SQLPOINTER*/out IntPtr NumericAttribute);
// note: in sql.h this is defined differently for the 64Bit platform.
@ -99,16 +99,16 @@ internal static partial class Interop
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableName,
/*SQLSMALLINT*/Int16 NameLen3,
/*SQLSMALLINT*/short NameLen3,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string ColumnName,
/*SQLSMALLINT*/Int16 NameLen4);
/*SQLSMALLINT*/short NameLen4);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLDisconnect(
@ -120,24 +120,24 @@ internal static partial class Interop
/*SQLHWND*/IntPtr hwnd,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string connectionstring,
/*SQLSMALLINT*/Int16 cbConnectionstring,
/*SQLSMALLINT*/short cbConnectionstring,
/*SQLCHAR* */IntPtr connectionstringout,
/*SQLSMALLINT*/Int16 cbConnectionstringoutMax,
/*SQLSMALLINT* */out Int16 cbConnectionstringout,
/*SQLUSMALLINT*/Int16 fDriverCompletion);
/*SQLSMALLINT*/short cbConnectionstringoutMax,
/*SQLSMALLINT* */out short cbConnectionstringout,
/*SQLUSMALLINT*/short fDriverCompletion);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLEndTran(
/*SQLSMALLINT*/ODBC32.SQL_HANDLE HandleType,
/*SQLHANDLE*/IntPtr Handle,
/*SQLSMALLINT*/Int16 CompletionType);
/*SQLSMALLINT*/short CompletionType);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLExecDirectW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string StatementText,
/*SQLINTEGER*/Int32 TextLength);
/*SQLINTEGER*/int TextLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLExecute(
@ -162,13 +162,13 @@ internal static partial class Interop
/*SQLHBDC*/OdbcConnectionHandle ConnectionHandle,
/*SQLINTEGER*/ODBC32.SQL_ATTR Attribute,
/*SQLPOINTER*/byte[] Value,
/*SQLINTEGER*/Int32 BufferLength,
/*SQLINTEGER* */out Int32 StringLength);
/*SQLINTEGER*/int BufferLength,
/*SQLINTEGER* */out int StringLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetData(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLUSMALLINT*/UInt16 ColumnNumber,
/*SQLUSMALLINT*/ushort ColumnNumber,
/*SQLSMALLINT*/ODBC32.SQL_C TargetType,
/*SQLPOINTER*/CNativeBuffer TargetValue,
/*SQLLEN*/IntPtr BufferLength, // sql.h differs from MSDN
@ -177,54 +177,54 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetDescFieldW(
/*SQLHSTMT*/OdbcDescriptorHandle StatementHandle,
/*SQLUSMALLINT*/Int16 RecNumber,
/*SQLUSMALLINT*/short RecNumber,
/*SQLUSMALLINT*/ODBC32.SQL_DESC FieldIdentifier,
/*SQLPOINTER*/CNativeBuffer ValuePointer,
/*SQLINTEGER*/Int32 BufferLength,
/*SQLINTEGER* */out Int32 StringLength);
/*SQLINTEGER*/int BufferLength,
/*SQLINTEGER* */out int StringLength);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetDiagRecW(
/*SQLSMALLINT*/ODBC32.SQL_HANDLE HandleType,
/*SQLHANDLE*/OdbcHandle Handle,
/*SQLSMALLINT*/Int16 RecNumber,
/*SQLSMALLINT*/short RecNumber,
/*SQLCHAR* */ StringBuilder rchState,
/*SQLINTEGER* */out Int32 NativeError,
/*SQLINTEGER* */out int NativeError,
/*SQLCHAR* */StringBuilder MessageText,
/*SQLSMALLINT*/Int16 BufferLength,
/*SQLSMALLINT* */out Int16 TextLength);
/*SQLSMALLINT*/short BufferLength,
/*SQLSMALLINT* */out short TextLength);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetDiagFieldW(
/*SQLSMALLINT*/ ODBC32.SQL_HANDLE HandleType,
/*SQLHANDLE*/ OdbcHandle Handle,
/*SQLSMALLINT*/ Int16 RecNumber,
/*SQLSMALLINT*/ Int16 DiagIdentifier,
/*SQLSMALLINT*/ short RecNumber,
/*SQLSMALLINT*/ short DiagIdentifier,
[MarshalAs(UnmanagedType.LPWStr)]
/*SQLPOINTER*/ StringBuilder rchState,
/*SQLSMALLINT*/ Int16 BufferLength,
/*SQLSMALLINT* */ out Int16 StringLength);
/*SQLSMALLINT*/ short BufferLength,
/*SQLSMALLINT* */ out short StringLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetFunctions(
/*SQLHBDC*/OdbcConnectionHandle hdbc,
/*SQLUSMALLINT*/ODBC32.SQL_API fFunction,
/*SQLUSMALLINT* */out Int16 pfExists);
/*SQLUSMALLINT* */out short pfExists);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetInfoW(
/*SQLHBDC*/OdbcConnectionHandle hdbc,
/*SQLUSMALLINT*/ODBC32.SQL_INFO fInfoType,
/*SQLPOINTER*/byte[] rgbInfoValue,
/*SQLSMALLINT*/Int16 cbInfoValueMax,
/*SQLSMALLINT* */out Int16 pcbInfoValue);
/*SQLSMALLINT*/short cbInfoValueMax,
/*SQLSMALLINT* */out short pcbInfoValue);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetInfoW(
/*SQLHBDC*/OdbcConnectionHandle hdbc,
/*SQLUSMALLINT*/ODBC32.SQL_INFO fInfoType,
/*SQLPOINTER*/byte[] rgbInfoValue,
/*SQLSMALLINT*/Int16 cbInfoValueMax,
/*SQLSMALLINT*/short cbInfoValueMax,
/*SQLSMALLINT* */IntPtr pcbInfoValue);
[DllImport(Interop.Libraries.Odbc32)]
@ -232,13 +232,13 @@ internal static partial class Interop
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLINTEGER*/ODBC32.SQL_ATTR Attribute,
/*SQLPOINTER*/out IntPtr Value,
/*SQLINTEGER*/Int32 BufferLength,
/*SQLINTEGER*/out Int32 StringLength);
/*SQLINTEGER*/int BufferLength,
/*SQLINTEGER*/out int StringLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetTypeInfo(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLSMALLINT*/Int16 fSqlType);
/*SQLSMALLINT*/short fSqlType);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLMoreResults(
@ -247,49 +247,49 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLNumResultCols(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLSMALLINT* */out Int16 ColumnCount);
/*SQLSMALLINT* */out short ColumnCount);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLPrepareW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string StatementText,
/*SQLINTEGER*/Int32 TextLength);
/*SQLINTEGER*/int TextLength);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLPrimaryKeysW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */ string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableName,
/*SQLSMALLINT*/Int16 NameLen3);
/*SQLSMALLINT*/short NameLen3);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLProcedureColumnsW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string ProcName,
/*SQLSMALLINT*/Int16 NameLen3,
/*SQLSMALLINT*/short NameLen3,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string ColumnName,
/*SQLSMALLINT*/Int16 NameLen4);
/*SQLSMALLINT*/short NameLen4);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLProceduresW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string ProcName,
/*SQLSMALLINT*/Int16 NameLen3);
/*SQLSMALLINT*/short NameLen3);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLRowCount(
@ -301,44 +301,44 @@ internal static partial class Interop
/*SQLHBDC*/OdbcConnectionHandle ConnectionHandle,
/*SQLINTEGER*/ODBC32.SQL_ATTR Attribute,
/*SQLPOINTER*/System.Transactions.IDtcTransaction Value,
/*SQLINTEGER*/Int32 StringLength);
/*SQLINTEGER*/int StringLength);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetConnectAttrW(
/*SQLHBDC*/OdbcConnectionHandle ConnectionHandle,
/*SQLINTEGER*/ODBC32.SQL_ATTR Attribute,
/*SQLPOINTER*/string Value,
/*SQLINTEGER*/Int32 StringLength);
/*SQLINTEGER*/int StringLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetConnectAttrW(
/*SQLHBDC*/OdbcConnectionHandle ConnectionHandle,
/*SQLINTEGER*/ODBC32.SQL_ATTR Attribute,
/*SQLPOINTER*/IntPtr Value,
/*SQLINTEGER*/Int32 StringLength);
/*SQLINTEGER*/int StringLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetConnectAttrW( // used only for AutoCommitOn
/*SQLHBDC*/IntPtr ConnectionHandle,
/*SQLINTEGER*/ODBC32.SQL_ATTR Attribute,
/*SQLPOINTER*/IntPtr Value,
/*SQLINTEGER*/Int32 StringLength);
/*SQLINTEGER*/int StringLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetDescFieldW(
/*SQLHSTMT*/OdbcDescriptorHandle StatementHandle,
/*SQLSMALLINT*/Int16 ColumnNumber,
/*SQLSMALLINT*/short ColumnNumber,
/*SQLSMALLINT*/ODBC32.SQL_DESC FieldIdentifier,
/*SQLPOINTER*/HandleRef CharacterAttribute,
/*SQLINTEGER*/Int32 BufferLength);
/*SQLINTEGER*/int BufferLength);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetDescFieldW(
/*SQLHSTMT*/OdbcDescriptorHandle StatementHandle,
/*SQLSMALLINT*/Int16 ColumnNumber,
/*SQLSMALLINT*/short ColumnNumber,
/*SQLSMALLINT*/ODBC32.SQL_DESC FieldIdentifier,
/*SQLPOINTER*/IntPtr CharacterAttribute,
/*SQLINTEGER*/Int32 BufferLength);
/*SQLINTEGER*/int BufferLength);
[DllImport(Interop.Libraries.Odbc32)]
// user can set SQL_ATTR_CONNECTION_POOLING attribute with envHandle = null, this attribute is process-level attribute
@ -351,9 +351,9 @@ internal static partial class Interop
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetStmtAttrW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
/*SQLINTEGER*/Int32 Attribute,
/*SQLINTEGER*/int Attribute,
/*SQLPOINTER*/IntPtr Value,
/*SQLINTEGER*/Int32 StringLength);
/*SQLINTEGER*/int StringLength);
[DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSpecialColumnsW(
@ -361,13 +361,13 @@ internal static partial class Interop
/*SQLUSMALLINT*/ODBC32.SQL_SPECIALCOLS IdentifierType,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableName,
/*SQLSMALLINT*/Int16 NameLen3,
/*SQLSMALLINT*/short NameLen3,
/*SQLUSMALLINT*/ODBC32.SQL_SCOPE Scope,
/*SQLUSMALLINT*/ ODBC32.SQL_NULLABILITY Nullable);
@ -376,30 +376,30 @@ internal static partial class Interop
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableName,
/*SQLSMALLINT*/Int16 NameLen3,
/*SQLUSMALLINT*/Int16 Unique,
/*SQLUSMALLINT*/Int16 Reserved);
/*SQLSMALLINT*/short NameLen3,
/*SQLUSMALLINT*/short Unique,
/*SQLUSMALLINT*/short Reserved);
[DllImport(Interop.Libraries.Odbc32)]
internal static extern /*SQLRETURN*/ODBC32.RetCode SQLTablesW(
/*SQLHSTMT*/OdbcStatementHandle StatementHandle,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string CatalogName,
/*SQLSMALLINT*/Int16 NameLen1,
/*SQLSMALLINT*/short NameLen1,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string SchemaName,
/*SQLSMALLINT*/Int16 NameLen2,
/*SQLSMALLINT*/short NameLen2,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableName,
/*SQLSMALLINT*/Int16 NameLen3,
/*SQLSMALLINT*/short NameLen3,
[In, MarshalAs(UnmanagedType.LPWStr)]
/*SQLCHAR* */string TableType,
/*SQLSMALLINT*/Int16 NameLen4);
/*SQLSMALLINT*/short NameLen4);
}
}

Просмотреть файл

@ -14,7 +14,7 @@ internal static partial class Interop
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct GssBuffer : IDisposable
{
internal UInt64 _length;
internal ulong _length;
internal IntPtr _data;
internal int Copy(byte[] destination, int offset)

Просмотреть файл

@ -15,7 +15,7 @@ internal static partial class Interop
[DllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseGssBuffer")]
internal static extern void ReleaseGssBuffer(
IntPtr bufferPtr,
UInt64 length);
ulong length);
[DllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_DisplayMinorStatus")]
internal static extern Status DisplayMinorStatus(

Просмотреть файл

@ -65,7 +65,7 @@ namespace Internal.NativeCrypto
public const string BCRYPT_CHAIN_MODE_CBC = "ChainingModeCBC";
public const string BCRYPT_CHAIN_MODE_ECB = "ChainingModeECB";
public static SafeAlgorithmHandle BCryptOpenAlgorithmProvider(String pszAlgId, String pszImplementation, OpenAlgorithmProviderFlags dwFlags)
public static SafeAlgorithmHandle BCryptOpenAlgorithmProvider(string pszAlgId, string pszImplementation, OpenAlgorithmProviderFlags dwFlags)
{
SafeAlgorithmHandle hAlgorithm = null;
NTSTATUS ntStatus = Interop.BCryptOpenAlgorithmProvider(out hAlgorithm, pszAlgId, pszImplementation, (int)dwFlags);
@ -78,7 +78,7 @@ namespace Internal.NativeCrypto
{
unsafe
{
const String BCRYPT_KEY_DATA_BLOB = "KeyDataBlob";
const string BCRYPT_KEY_DATA_BLOB = "KeyDataBlob";
int keySize = key.Length;
int blobSize = sizeof(BCRYPT_KEY_DATA_BLOB_HEADER) + keySize;
byte[] blob = new byte[blobSize];
@ -101,12 +101,12 @@ namespace Internal.NativeCrypto
[StructLayout(LayoutKind.Sequential)]
private struct BCRYPT_KEY_DATA_BLOB_HEADER
{
public UInt32 dwMagic;
public UInt32 dwVersion;
public UInt32 cbKeyData;
public uint dwMagic;
public uint dwVersion;
public uint cbKeyData;
public const UInt32 BCRYPT_KEY_DATA_BLOB_MAGIC = 0x4d42444b;
public const UInt32 BCRYPT_KEY_DATA_BLOB_VERSION1 = 0x1;
public const uint BCRYPT_KEY_DATA_BLOB_MAGIC = 0x4d42444b;
public const uint BCRYPT_KEY_DATA_BLOB_VERSION1 = 0x1;
}
public static void SetCipherMode(this SafeAlgorithmHandle hAlg, string cipherMode)
@ -187,10 +187,10 @@ namespace Internal.NativeCrypto
private static class BCryptGetPropertyStrings
{
public const String BCRYPT_HASH_LENGTH = "HashDigestLength";
public const string BCRYPT_HASH_LENGTH = "HashDigestLength";
}
public static String CryptFormatObject(String oidValue, byte[] rawData, bool multiLine)
public static string CryptFormatObject(string oidValue, byte[] rawData, bool multiLine)
{
const int X509_ASN_ENCODING = 0x00000001;
const int CRYPT_FORMAT_STR_MULTI_LINE = 0x00000001;
@ -227,10 +227,10 @@ namespace Internal.NativeCrypto
private static class Interop
{
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)]
public static extern NTSTATUS BCryptOpenAlgorithmProvider(out SafeAlgorithmHandle phAlgorithm, String pszAlgId, String pszImplementation, int dwFlags);
public static extern NTSTATUS BCryptOpenAlgorithmProvider(out SafeAlgorithmHandle phAlgorithm, string pszAlgId, string pszImplementation, int dwFlags);
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)]
public static extern unsafe NTSTATUS BCryptSetProperty(SafeAlgorithmHandle hObject, String pszProperty, String pbInput, int cbInput, int dwFlags);
public static extern unsafe NTSTATUS BCryptSetProperty(SafeAlgorithmHandle hObject, string pszProperty, string pbInput, int cbInput, int dwFlags);
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode, EntryPoint = "BCryptSetProperty")]
private static extern unsafe NTSTATUS BCryptSetIntPropertyPrivate(SafeBCryptHandle hObject, string pszProperty, ref int pdwInput, int cbInput, int dwFlags);
@ -241,7 +241,7 @@ namespace Internal.NativeCrypto
}
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)]
public static extern NTSTATUS BCryptImportKey(SafeAlgorithmHandle hAlgorithm, IntPtr hImportKey, String pszBlobType, out SafeKeyHandle hKey, IntPtr pbKeyObject, int cbKeyObject, byte[] pbInput, int cbInput, int dwFlags);
public static extern NTSTATUS BCryptImportKey(SafeAlgorithmHandle hAlgorithm, IntPtr hImportKey, string pszBlobType, out SafeKeyHandle hKey, IntPtr pbKeyObject, int cbKeyObject, byte[] pbInput, int cbInput, int dwFlags);
[DllImport(Libraries.BCrypt, CharSet = CharSet.Unicode)]
public static extern unsafe NTSTATUS BCryptEncrypt(SafeKeyHandle hKey, byte* pbInput, int cbInput, IntPtr paddingInfo, [In,Out] byte [] pbIV, int cbIV, byte* pbOutput, int cbOutput, out int cbResult, int dwFlags);
@ -256,7 +256,7 @@ namespace Internal.NativeCrypto
[In] int dwFormatStrType, // select multiline
[In] IntPtr pFormatStruct, // unused - pass IntPtr.Zero
[MarshalAs(UnmanagedType.LPStr)]
[In] String lpszStructType, // OID value
[In] string lpszStructType, // OID value
[In] byte[] pbEncoded, // Data to be formatted
[In] int cbEncoded, // Length of data to be formatted
[MarshalAs(UnmanagedType.LPWStr)]

Просмотреть файл

@ -178,15 +178,15 @@ internal static partial class Interop
internal uint[] zoneIndices;
internal IntPtr firstPrefix;
internal UInt64 transmitLinkSpeed;
internal UInt64 receiveLinkSpeed;
internal ulong transmitLinkSpeed;
internal ulong receiveLinkSpeed;
internal IntPtr firstWinsServerAddress;
internal IntPtr firstGatewayAddress;
internal UInt32 ipv4Metric;
internal UInt32 ipv6Metric;
internal UInt64 luid;
internal uint ipv4Metric;
internal uint ipv6Metric;
internal ulong luid;
internal IpSocketAddress dhcpv4Server;
internal UInt32 compartmentId;
internal uint compartmentId;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
internal byte[] networkGuid;
internal InterfaceConnectionType connectionType;
@ -194,8 +194,8 @@ internal static partial class Interop
internal IpSocketAddress dhcpv6Server; // Never available in Windows.
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 130)]
internal byte[] dhcpv6ClientDuid;
internal UInt32 dhcpv6ClientDuidLength;
internal UInt32 dhcpV6Iaid;
internal uint dhcpv6ClientDuidLength;
internal uint dhcpV6Iaid;
/* Windows 2008 +
PIP_ADAPTER_DNS_SUFFIX FirstDnsSuffix;
@ -255,53 +255,53 @@ internal static partial class Interop
private const int IfMaxStringSize = 256;
private const int IfMaxPhysAddressLength = 32;
internal UInt64 interfaceLuid;
internal UInt32 interfaceIndex;
internal ulong interfaceLuid;
internal uint interfaceIndex;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = GuidLength)]
internal byte[] interfaceGuid;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IfMaxStringSize + 1)]
internal char[] alias; // Null terminated string.
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IfMaxStringSize + 1)]
internal char[] description; // Null terminated string.
internal UInt32 physicalAddressLength;
internal uint physicalAddressLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IfMaxPhysAddressLength)]
internal byte[] physicalAddress; // ANSI
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IfMaxPhysAddressLength)]
internal byte[] permanentPhysicalAddress; // ANSI
internal UInt32 mtu;
internal uint mtu;
internal NetworkInterfaceType type;
internal InterfaceTunnelType tunnelType;
internal UInt32 mediaType; // Enum
internal UInt32 physicalMediumType; // Enum
internal UInt32 accessType; // Enum
internal UInt32 directionType; // Enum
internal uint mediaType; // Enum
internal uint physicalMediumType; // Enum
internal uint accessType; // Enum
internal uint directionType; // Enum
internal byte interfaceAndOperStatusFlags; // Flags Enum
internal OperationalStatus operStatus;
internal UInt32 adminStatus; // Enum
internal UInt32 mediaConnectState; // Enum
internal uint adminStatus; // Enum
internal uint mediaConnectState; // Enum
[MarshalAs(UnmanagedType.ByValArray, SizeConst = GuidLength)]
internal byte[] networkGuid;
internal InterfaceConnectionType connectionType;
internal UInt64 transmitLinkSpeed;
internal UInt64 receiveLinkSpeed;
internal UInt64 inOctets;
internal UInt64 inUcastPkts;
internal UInt64 inNUcastPkts;
internal UInt64 inDiscards;
internal UInt64 inErrors;
internal UInt64 inUnknownProtos;
internal UInt64 inUcastOctets;
internal UInt64 inMulticastOctets;
internal UInt64 inBroadcastOctets;
internal UInt64 outOctets;
internal UInt64 outUcastPkts;
internal UInt64 outNUcastPkts;
internal UInt64 outDiscards;
internal UInt64 outErrors;
internal UInt64 outUcastOctets;
internal UInt64 outMulticastOctets;
internal UInt64 outBroadcastOctets;
internal UInt64 outQLen;
internal ulong transmitLinkSpeed;
internal ulong receiveLinkSpeed;
internal ulong inOctets;
internal ulong inUcastPkts;
internal ulong inNUcastPkts;
internal ulong inDiscards;
internal ulong inErrors;
internal ulong inUnknownProtos;
internal ulong inUcastOctets;
internal ulong inMulticastOctets;
internal ulong inBroadcastOctets;
internal ulong outOctets;
internal ulong outUcastPkts;
internal ulong outNUcastPkts;
internal ulong outDiscards;
internal ulong outErrors;
internal ulong outUcastOctets;
internal ulong outMulticastOctets;
internal ulong outBroadcastOctets;
internal ulong outQLen;
}
[StructLayout(LayoutKind.Sequential)]

Просмотреть файл

@ -67,7 +67,7 @@ internal static partial class Interop
[System.Runtime.InteropServices.FieldOffset(4)]
internal uint length;
[System.Runtime.InteropServices.FieldOffset(8)]
internal Int64 fileOffset;
internal long fileOffset;
[System.Runtime.InteropServices.FieldOffset(8)]
internal IntPtr buffer;
[System.Runtime.InteropServices.FieldOffset(16)]

Просмотреть файл

@ -11,6 +11,6 @@ internal partial class Interop
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegConnectRegistryW")]
internal static extern int RegConnectRegistry(String machineName, SafeRegistryHandle key, out SafeRegistryHandle result);
internal static extern int RegConnectRegistry(string machineName, SafeRegistryHandle key, out SafeRegistryHandle result);
}
}

Просмотреть файл

@ -15,9 +15,9 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegCreateKeyExW")]
internal static extern int RegCreateKeyEx(
SafeRegistryHandle hKey,
String lpSubKey,
string lpSubKey,
int Reserved,
String lpClass,
string lpClass,
int dwOptions,
int samDesired,
ref Interop.Kernel32.SECURITY_ATTRIBUTES secAttrs,

Просмотреть файл

@ -11,6 +11,6 @@ internal partial class Interop
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegDeleteKeyExW")]
internal static extern int RegDeleteKeyEx(SafeRegistryHandle hKey, String lpSubKey, int samDesired, int Reserved);
internal static extern int RegDeleteKeyEx(SafeRegistryHandle hKey, string lpSubKey, int samDesired, int Reserved);
}
}

Просмотреть файл

@ -11,6 +11,6 @@ internal partial class Interop
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegDeleteValueW")]
internal static extern int RegDeleteValue(SafeRegistryHandle hKey, String lpValueName);
internal static extern int RegDeleteValue(SafeRegistryHandle hKey, string lpValueName);
}
}

Просмотреть файл

@ -32,7 +32,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
internal static extern int RegQueryValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int[] lpReserved,
ref int lpType,
ref long lpData,
@ -41,7 +41,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
internal static extern int RegQueryValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int[] lpReserved,
ref int lpType,
[Out] char[] lpData,
@ -50,7 +50,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
internal static extern int RegQueryValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int[] lpReserved,
ref int lpType,
[Out]StringBuilder lpData,

Просмотреть файл

@ -14,7 +14,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegSetValueExW")]
internal static extern int RegSetValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int Reserved,
RegistryValueKind dwType,
byte[] lpData,
@ -23,7 +23,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegSetValueExW")]
internal static extern int RegSetValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int Reserved,
RegistryValueKind dwType,
char[] lpData,
@ -32,7 +32,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegSetValueExW")]
internal static extern int RegSetValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int Reserved,
RegistryValueKind dwType,
ref int lpData,
@ -41,7 +41,7 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegSetValueExW")]
internal static extern int RegSetValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int Reserved,
RegistryValueKind dwType,
ref long lpData,
@ -50,10 +50,10 @@ internal partial class Interop
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegSetValueExW")]
internal static extern int RegSetValueEx(
SafeRegistryHandle hKey,
String lpValueName,
string lpValueName,
int Reserved,
RegistryValueKind dwType,
String lpData,
string lpData,
int cbData);
}
}

Просмотреть файл

@ -12,9 +12,9 @@ internal partial class Interop
[DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "ReadConsoleW")]
internal static extern unsafe bool ReadConsole(
IntPtr hConsoleInput,
Byte* lpBuffer,
Int32 nNumberOfCharsToRead,
out Int32 lpNumberOfCharsRead,
byte* lpBuffer,
int nNumberOfCharsToRead,
out int lpNumberOfCharsRead,
IntPtr pInputControl);
}
}

Просмотреть файл

@ -12,9 +12,9 @@ internal partial class Interop
[DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "WriteConsoleW")]
internal static extern unsafe bool WriteConsole(
IntPtr hConsoleOutput,
Byte* lpBuffer,
Int32 nNumberOfCharsToWrite,
out Int32 lpNumberOfCharsWritten,
byte* lpBuffer,
int nNumberOfCharsToWrite,
out int lpNumberOfCharsWritten,
IntPtr lpReservedMustBeNull);
}
}

Просмотреть файл

@ -14,6 +14,6 @@ internal partial class Interop
internal static extern int RoGetActivationFactory(
[MarshalAs(UnmanagedType.HString)] string activatableClassId,
[In] ref Guid iid,
[Out, MarshalAs(UnmanagedType.IInspectable)] out Object factory);
[Out, MarshalAs(UnmanagedType.IInspectable)] out object factory);
}
}

Просмотреть файл

@ -14,6 +14,6 @@ internal partial class Interop
internal partial class mincore
{
[DllImport(Libraries.RoBuffer, CallingConvention = CallingConvention.StdCall, PreserveSig = true)]
internal static extern Int32 RoGetBufferMarshaler(out IMarshal bufferMarshalerPtr);
internal static extern int RoGetBufferMarshaler(out IMarshal bufferMarshalerPtr);
}
}

Просмотреть файл

@ -62,7 +62,7 @@ namespace System.Net
public override string ToString()
{
return "Capabilities:" + String.Format(CultureInfo.InvariantCulture, "0x{0:x}", Capabilities)
return "Capabilities:" + string.Format(CultureInfo.InvariantCulture, "0x{0:x}", Capabilities)
+ " Version:" + Version.ToString(NumberFormatInfo.InvariantInfo)
+ " RPCID:" + RPCID.ToString(NumberFormatInfo.InvariantInfo)
+ " MaxToken:" + MaxToken.ToString(NumberFormatInfo.InvariantInfo)

Просмотреть файл

@ -66,7 +66,7 @@ namespace Microsoft.Internal
{
if (!condition)
{
throw UncatchableException(String.Format(message, arg0));
throw UncatchableException(string.Format(message, arg0));
}
}
@ -75,7 +75,7 @@ namespace Microsoft.Internal
{
if (!condition)
{
throw UncatchableException(String.Format(message, arg0, arg1));
throw UncatchableException(string.Format(message, arg0, arg1));
}
}
@ -84,7 +84,7 @@ namespace Microsoft.Internal
{
if (!condition)
{
throw UncatchableException(String.Format(message, arg0, arg1, arg2));
throw UncatchableException(string.Format(message, arg0, arg1, arg2));
}
}
@ -93,7 +93,7 @@ namespace Microsoft.Internal
{
if (!condition)
{
throw UncatchableException(String.Format(message, args));
throw UncatchableException(string.Format(message, args));
}
}

Просмотреть файл

@ -420,7 +420,7 @@ namespace System.Data.Common
bool compValue = s_connectionStringValidKeyRegex.IsMatch(keyname);
Debug.Assert(((0 < keyname.Length) && (';' != keyname[0]) && !Char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000'))) == compValue, "IsValueValid mismatch with regex");
#endif
return ((0 < keyname.Length) && (';' != keyname[0]) && !Char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000')));
return ((0 < keyname.Length) && (';' != keyname[0]) && !char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000')));
}
return false;
}

Просмотреть файл

@ -61,7 +61,7 @@ namespace System.Data.Common
private static bool IsWhitespace(char ch)
{
return Char.IsWhiteSpace(ch);
return char.IsWhiteSpace(ch);
}
internal static string[] ParseMultipartIdentifier(string name, string leftQuote, string rightQuote, char separator, int limit, bool removequotes, string property, bool ThrowOnEmptyMultipartName)

Просмотреть файл

@ -240,7 +240,7 @@ namespace System.Data.ProviderBase
DataColumn collectionNameColumn = metaDataCollectionsTable.Columns[DbMetaDataColumnNames.CollectionName];
if ((null == collectionNameColumn) || (typeof(System.String) != collectionNameColumn.DataType))
if ((null == collectionNameColumn) || (typeof(string) != collectionNameColumn.DataType))
{
throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, DbMetaDataColumnNames.CollectionName);
}
@ -509,7 +509,7 @@ namespace System.Data.ProviderBase
_metaDataCollectionsDataSet.ReadXml(XmlStream);
}
protected virtual DataTable PrepareCollection(string collectionName, String[] restrictions, DbConnection connection)
protected virtual DataTable PrepareCollection(string collectionName, string[] restrictions, DbConnection connection)
{
throw ADP.NotSupported();
}
@ -519,7 +519,7 @@ namespace System.Data.ProviderBase
bool result = true;
DataColumnCollection tableColumns = requestedCollectionRow.Table.Columns;
DataColumn versionColumn;
Object version;
object version;
// check the minimum version first
versionColumn = tableColumns[_minimumVersion];

Просмотреть файл

@ -127,7 +127,7 @@ namespace System.Data.ProviderBase
{
get
{
return (_isInfiniteTimeout) ? Int64.MaxValue : _timerExpire;
return (_isInfiniteTimeout) ? long.MaxValue : _timerExpire;
}
}

Просмотреть файл

@ -138,7 +138,7 @@ namespace System.Drawing
private static int IntFromString(string value, NumberFormatInfo formatInfo)
{
return Int32.Parse(value, NumberStyles.Integer, formatInfo);
return int.Parse(value, NumberStyles.Integer, formatInfo);
}
}
}

Просмотреть файл

@ -194,7 +194,7 @@ namespace System.Net
{
_tokenLength = 0;
_start = _index;
while ((_index < _length) && Char.IsWhiteSpace(_tokenStream[_index]))
while ((_index < _length) && char.IsWhiteSpace(_tokenStream[_index]))
{
++_index;
++_start;

Просмотреть файл

@ -7,8 +7,8 @@ namespace System.Reflection
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true, Inherited=false)]
internal sealed class AssemblyMetadataAttribute : Attribute
{
private String m_key;
private String m_value;
private string m_key;
private string m_value;
public AssemblyMetadataAttribute(string key, string value)
{

Просмотреть файл

@ -27,7 +27,7 @@ namespace System.Reflection.Emit
// Create backing field as:
// private string assemblyName;
FieldBuilder assemblyNameField =
attributeTypeBuilder.DefineField("assemblyName", typeof(String), FieldAttributes.Private);
attributeTypeBuilder.DefineField("assemblyName", typeof(string), FieldAttributes.Private);
// Create ctor as:
// public IgnoresAccessChecksToAttribute(string)
@ -52,14 +52,14 @@ namespace System.Reflection.Emit
"AssemblyName",
PropertyAttributes.None,
CallingConventions.HasThis,
returnType: typeof(String),
returnType: typeof(string),
parameterTypes: null);
MethodBuilder getterMethodBuilder = attributeTypeBuilder.DefineMethod(
"get_AssemblyName",
MethodAttributes.Public,
CallingConventions.HasThis,
returnType: typeof(String),
returnType: typeof(string),
parameterTypes: null);
// Generate body:

Просмотреть файл

@ -56,7 +56,7 @@ namespace System.Text
int index = 0;
if (count > 0 && Char.IsLowSurrogate(chars[0]))
if (count > 0 && char.IsLowSurrogate(chars[0]))
{
pTempBuffer[1] = chars[0];
index++;
@ -82,7 +82,7 @@ namespace System.Text
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
bool excludeLastChar = count > 0 && !flush && Char.IsHighSurrogate(chars[count - 1]);
bool excludeLastChar = count > 0 && !flush && char.IsHighSurrogate(chars[count - 1]);
if (excludeLastChar)
count--;
@ -144,7 +144,7 @@ namespace System.Text
if (byteCount == 0)
return 0;
char lastChar = charCount > 0 && !flush && Char.IsHighSurrogate(chars[charCount - 1]) ? chars[charCount - 1] : NULL_CHAR;
char lastChar = charCount > 0 && !flush && char.IsHighSurrogate(chars[charCount - 1]) ? chars[charCount - 1] : NULL_CHAR;
if (lastChar != NULL_CHAR)
charCount--;

Просмотреть файл

@ -38,7 +38,7 @@ namespace System.Text
}
}
public override unsafe int GetByteCount(String s)
public override unsafe int GetByteCount(string s)
{
// Validate input
if (s == null)
@ -53,7 +53,7 @@ namespace System.Text
}
}
public override unsafe int GetBytes(String s, int charIndex, int charCount, byte[] bytes, int byteIndex)
public override unsafe int GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex)
{
if (s == null || bytes == null)
throw new ArgumentNullException(s == null ? nameof(s) : nameof(bytes), SR.ArgumentNull_Array);
@ -183,7 +183,7 @@ namespace System.Text
return (int)charCount;
}
public override String EncodingName
public override string EncodingName
{
get
{
@ -195,7 +195,7 @@ namespace System.Text
}
}
public override String WebName
public override string WebName
{
get
{

Просмотреть файл

@ -11,7 +11,7 @@ namespace System
public static partial class PlatformDetection
{
private static string FrameworkName => AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
private static Version TargetVersion => String.IsNullOrEmpty(FrameworkName) ? new Version(4, 5, 0, 0) : new FrameworkName(FrameworkName).Version;
private static Version TargetVersion => string.IsNullOrEmpty(FrameworkName) ? new Version(4, 5, 0, 0) : new FrameworkName(FrameworkName).Version;
// The current full framework xunit runner is targeting 4.5.2 so we expect TargetsNetFx452OrLower to be true.
// When we update xunit runner in the future which may target recent framework version, TargetsNetFx452OrLower can start return

Просмотреть файл

@ -99,7 +99,7 @@ namespace System.ComponentModel
s.AppendFormat(CultureInfo.InvariantCulture, " ({0:X8}, {1})", HResult, nativeErrorString);
}
if (!(String.IsNullOrEmpty(message)))
if (!(string.IsNullOrEmpty(message)))
{
s.Append(": ");
s.Append(message);

Просмотреть файл

@ -97,7 +97,7 @@ namespace Microsoft.Win32
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Registry);
}
private Object InternalGetValueCore(string name, Object defaultValue, bool doNotExpand)
private object InternalGetValueCore(string name, object defaultValue, bool doNotExpand)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Registry);
}
@ -107,7 +107,7 @@ namespace Microsoft.Win32
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Registry);
}
private void SetValueCore(string name, Object value, RegistryValueKind valueKind)
private void SetValueCore(string name, object value, RegistryValueKind valueKind)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Registry);
}

Просмотреть файл

@ -448,7 +448,7 @@ namespace Microsoft.XmlSerializer.Generator
private void WriteHeader()
{
// do not localize Copyright header
Console.WriteLine(String.Format(CultureInfo.CurrentCulture, "[Microsoft (R) .NET Core Xml Serialization Generation Utility, Version {0}]", ThisAssembly.InformationalVersion));
Console.WriteLine(string.Format(CultureInfo.CurrentCulture, "[Microsoft (R) .NET Core Xml Serialization Generation Utility, Version {0}]", ThisAssembly.InformationalVersion));
Console.WriteLine("Copyright (C) Microsoft Corporation. All rights reserved.");
}

Просмотреть файл

@ -1757,10 +1757,10 @@ nameof(collections), SR.BlockingCollection_ValidateCollectionsArray_DispElems);
private static void ValidateTimeout(TimeSpan timeout)
{
long totalMilliseconds = (long)timeout.TotalMilliseconds;
if ((totalMilliseconds < 0 || totalMilliseconds > Int32.MaxValue) && (totalMilliseconds != Timeout.Infinite))
if ((totalMilliseconds < 0 || totalMilliseconds > int.MaxValue) && (totalMilliseconds != Timeout.Infinite))
{
throw new ArgumentOutOfRangeException(nameof(timeout), timeout,
String.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, Int32.MaxValue));
string.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, int.MaxValue));
}
}
@ -1774,7 +1774,7 @@ nameof(collections), SR.BlockingCollection_ValidateCollectionsArray_DispElems);
if ((millisecondsTimeout < 0) && (millisecondsTimeout != Timeout.Infinite))
{
throw new ArgumentOutOfRangeException(nameof(millisecondsTimeout), millisecondsTimeout,
String.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, Int32.MaxValue));
string.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, int.MaxValue));
}
}

Просмотреть файл

@ -256,7 +256,7 @@ namespace System.Collections.Concurrent
return _source.Current.Value;
}
}
Object IEnumerator.Current
object IEnumerator.Current
{
get
{

Просмотреть файл

@ -401,7 +401,7 @@ namespace System.Collections.Concurrent
/// <summary>
/// Get the current element in the current partition. Property required by IEnumerator interface
/// </summary>
Object IEnumerator.Current
object IEnumerator.Current
{
get
{
@ -1491,7 +1491,7 @@ namespace System.Collections.Concurrent
}
}
Object IEnumerator.Current
object IEnumerator.Current
{
get
{

Просмотреть файл

@ -214,7 +214,7 @@ namespace System.Collections.Immutable
get
{
var self = this;
return self.IsDefault ? "Uninitialized" : String.Format(CultureInfo.CurrentCulture, "Length = {0}", self.Length);
return self.IsDefault ? "Uninitialized" : string.Format(CultureInfo.CurrentCulture, "Length = {0}", self.Length);
}
}

Просмотреть файл

@ -262,7 +262,7 @@ namespace System.Collections.Immutable
{
if (_syncRoot == null)
{
Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new object(), null);
}
return _syncRoot;

Просмотреть файл

@ -157,13 +157,13 @@ namespace System.Collections.Immutable
case KeyCollisionBehavior.ThrowIfValueDifferent:
if (!valueComparer.Equals(_firstValue.Value, value))
{
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
}
result = OperationResult.NoChangeRequired;
return this;
case KeyCollisionBehavior.ThrowAlways:
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
default:
throw new InvalidOperationException(); // unreachable
}
@ -193,13 +193,13 @@ namespace System.Collections.Immutable
#endif
if (!valueComparer.Equals(existingEntry.Value, value))
{
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
}
result = OperationResult.NoChangeRequired;
return this;
case KeyCollisionBehavior.ThrowAlways:
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
default:
throw new InvalidOperationException(); // unreachable
}

Просмотреть файл

@ -224,7 +224,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Add(key, value);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
}
while (!successful);
@ -268,7 +268,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.SetItem(key, newValue);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
}
while (!successful);
@ -311,7 +311,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.SetItem(key, newValue);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
}
while (!successful);
@ -345,7 +345,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Add(key, value);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
@ -380,7 +380,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.SetItem(key, newValue);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
@ -411,7 +411,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Remove(key);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
@ -445,7 +445,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Pop(out value);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
@ -468,7 +468,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Push(value);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
}
@ -500,7 +500,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Dequeue(out value);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
@ -523,7 +523,7 @@ namespace System.Collections.Immutable
var updatedCollection = priorCollection.Enqueue(value);
var interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
successful = Object.ReferenceEquals(priorCollection, interlockedResult);
successful = object.ReferenceEquals(priorCollection, interlockedResult);
priorCollection = interlockedResult; // we already have a volatile read that we can reuse for the next loop
} while (!successful);
}

Просмотреть файл

@ -1100,7 +1100,7 @@ namespace System.Collections.Immutable
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new object(), null);
}
return _syncRoot;

Просмотреть файл

@ -275,7 +275,7 @@ namespace System.Collections.Immutable
{
if (_syncRoot == null)
{
Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new object(), null);
}
return _syncRoot;

Просмотреть файл

@ -728,7 +728,7 @@ namespace System.Collections.Immutable
}
else
{
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
}
}

Просмотреть файл

@ -922,7 +922,7 @@ namespace System.Collections.Immutable
{
if (!_valueComparer.Equals(value, item.Value))
{
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, item.Key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, item.Key));
}
}
else

Просмотреть файл

@ -492,7 +492,7 @@ namespace System.Collections.Immutable
{
if (_syncRoot == null)
{
Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new object(), null);
}
return _syncRoot;

Просмотреть файл

@ -437,7 +437,7 @@ namespace System.Collections.Immutable
}
else
{
throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.DuplicateKey, key));
}
}

Просмотреть файл

@ -61,10 +61,10 @@ namespace System.Collections
// If a doesn't implement IComparable and b does, -(b.CompareTo(a)) is returned.
// Otherwise an exception is thrown.
//
public int Compare(Object a, Object b)
public int Compare(object a, object b)
{
String sa = a as String;
String sb = b as String;
string sa = a as string;
string sb = b as string;
if (sa != null && sb != null)
return _compareInfo.Compare(sa, sb, CompareOptions.IgnoreCase);
else

Просмотреть файл

@ -73,7 +73,7 @@ namespace System.Collections
{
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
Object temp = InnerList[index];
object temp = InnerList[index];
OnValidate(temp);
OnRemove(index, temp);
InnerList.RemoveAt(index);
@ -103,7 +103,7 @@ namespace System.Collections
get { return InnerList.IsSynchronized; }
}
Object ICollection.SyncRoot
object ICollection.SyncRoot
{
get { return InnerList.SyncRoot; }
}
@ -113,7 +113,7 @@ namespace System.Collections
InnerList.CopyTo(array, index);
}
Object IList.this[int index]
object IList.this[int index]
{
get
{
@ -126,7 +126,7 @@ namespace System.Collections
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
OnValidate(value);
Object temp = InnerList[index];
object temp = InnerList[index];
OnSet(index, temp, value);
InnerList[index] = value;
try
@ -141,12 +141,12 @@ namespace System.Collections
}
}
bool IList.Contains(Object value)
bool IList.Contains(object value)
{
return InnerList.Contains(value);
}
int IList.Add(Object value)
int IList.Add(object value)
{
OnValidate(value);
OnInsert(InnerList.Count, value);
@ -164,7 +164,7 @@ namespace System.Collections
}
void IList.Remove(Object value)
void IList.Remove(object value)
{
OnValidate(value);
int index = InnerList.IndexOf(value);
@ -182,12 +182,12 @@ namespace System.Collections
}
}
int IList.IndexOf(Object value)
int IList.IndexOf(object value)
{
return InnerList.IndexOf(value);
}
void IList.Insert(int index, Object value)
void IList.Insert(int index, object value)
{
if (index < 0 || index > Count)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
@ -210,11 +210,11 @@ namespace System.Collections
return InnerList.GetEnumerator();
}
protected virtual void OnSet(int index, Object oldValue, Object newValue)
protected virtual void OnSet(int index, object oldValue, object newValue)
{
}
protected virtual void OnInsert(int index, Object value)
protected virtual void OnInsert(int index, object value)
{
}
@ -222,20 +222,20 @@ namespace System.Collections
{
}
protected virtual void OnRemove(int index, Object value)
protected virtual void OnRemove(int index, object value)
{
}
protected virtual void OnValidate(Object value)
protected virtual void OnValidate(object value)
{
if (value == null) throw new ArgumentNullException(nameof(value));
}
protected virtual void OnSetComplete(int index, Object oldValue, Object newValue)
protected virtual void OnSetComplete(int index, object oldValue, object newValue)
{
}
protected virtual void OnInsertComplete(int index, Object value)
protected virtual void OnInsertComplete(int index, object value)
{
}
@ -243,7 +243,7 @@ namespace System.Collections
{
}
protected virtual void OnRemoveComplete(int index, Object value)
protected virtual void OnRemoveComplete(int index, object value)
{
}
}

Просмотреть файл

@ -60,7 +60,7 @@ namespace System.Collections
get { return InnerHashtable.Keys; }
}
Object ICollection.SyncRoot
object ICollection.SyncRoot
{
get { return InnerHashtable.SyncRoot; }
}
@ -87,7 +87,7 @@ namespace System.Collections
{
OnValidate(key, value);
bool keyExists = true;
Object temp = InnerHashtable[key];
object temp = InnerHashtable[key];
if (temp == null)
{
keyExists = InnerHashtable.Contains(key);
@ -146,7 +146,7 @@ namespace System.Collections
{
if (InnerHashtable.Contains(key))
{
Object temp = InnerHashtable[key];
object temp = InnerHashtable[key];
OnValidate(key, temp);
OnRemove(key, temp);

Просмотреть файл

@ -23,14 +23,14 @@ namespace System.Collections
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Queue : ICollection, ICloneable
{
private Object[] _array; // Do not rename (binary serialization)
private object[] _array; // Do not rename (binary serialization)
private int _head; // First valid element in the queue. Do not rename (binary serialization)
private int _tail; // Last valid element in the queue. Do not rename (binary serialization)
private int _size; // Number of elements. Do not rename (binary serialization)
private int _growFactor; // 100 == 1.0, 130 == 1.3, 200 == 2.0. Do not rename (binary serialization)
private int _version; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
private object _syncRoot;
private const int _MinimumGrow = 4;
private const int _ShrinkThreshold = 32;
@ -60,7 +60,7 @@ namespace System.Collections
if (!(growFactor >= 1.0 && growFactor <= 10.0))
throw new ArgumentOutOfRangeException(nameof(growFactor), SR.Format(SR.ArgumentOutOfRange_QueueGrowFactor, 1, 10));
_array = new Object[capacity];
_array = new object[capacity];
_head = 0;
_tail = 0;
_size = 0;
@ -86,7 +86,7 @@ namespace System.Collections
get { return _size; }
}
public virtual Object Clone()
public virtual object Clone()
{
Queue q = new Queue(_size);
q._size = _size;
@ -107,13 +107,13 @@ namespace System.Collections
get { return false; }
}
public virtual Object SyncRoot
public virtual object SyncRoot
{
get
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new object(), null);
}
return _syncRoot;
}
@ -168,7 +168,7 @@ namespace System.Collections
// Adds obj to the tail of the queue.
//
public virtual void Enqueue(Object obj)
public virtual void Enqueue(object obj)
{
if (_size == _array.Length)
{
@ -196,12 +196,12 @@ namespace System.Collections
// Removes the object at the head of the queue and returns it. If the queue
// is empty, this method simply returns null.
public virtual Object Dequeue()
public virtual object Dequeue()
{
if (Count == 0)
throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue);
Object removed = _array[_head];
object removed = _array[_head];
_array[_head] = null;
_head = (_head + 1) % _array.Length;
_size--;
@ -212,7 +212,7 @@ namespace System.Collections
// Returns the object at the head of the queue. The object remains in the
// queue. If the queue is empty, this method throws an
// InvalidOperationException.
public virtual Object Peek()
public virtual object Peek()
{
if (Count == 0)
throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue);
@ -236,7 +236,7 @@ namespace System.Collections
// Equality is determined using obj.Equals().
//
// Exceptions: ArgumentNullException if obj == null.
public virtual bool Contains(Object obj)
public virtual bool Contains(object obj)
{
int index = _head;
int count = _size;
@ -258,7 +258,7 @@ namespace System.Collections
return false;
}
internal Object GetElement(int i)
internal object GetElement(int i)
{
return _array[(_head + i) % _array.Length];
}
@ -267,12 +267,12 @@ namespace System.Collections
// objects in the Queue, or an empty array if the queue is empty.
// The order of elements in the array is first in to last in, the same
// order produced by successive calls to Dequeue.
public virtual Object[] ToArray()
public virtual object[] ToArray()
{
if (_size == 0)
return Array.Empty<Object>();
Object[] arr = new Object[_size];
object[] arr = new object[_size];
if (_head < _tail)
{
Array.Copy(_array, _head, arr, 0, _size);
@ -291,7 +291,7 @@ namespace System.Collections
// must be >= _size.
private void SetCapacity(int capacity)
{
Object[] newarray = new Object[capacity];
object[] newarray = new object[capacity];
if (_size > 0)
{
if (_head < _tail)
@ -321,7 +321,7 @@ namespace System.Collections
private class SynchronizedQueue : Queue
{
private Queue _q;
private Object _root;
private object _root;
internal SynchronizedQueue(Queue q)
{
@ -334,7 +334,7 @@ namespace System.Collections
get { return true; }
}
public override Object SyncRoot
public override object SyncRoot
{
get
{
@ -361,7 +361,7 @@ namespace System.Collections
}
}
public override Object Clone()
public override object Clone()
{
lock (_root)
{
@ -369,7 +369,7 @@ namespace System.Collections
}
}
public override bool Contains(Object obj)
public override bool Contains(object obj)
{
lock (_root)
{
@ -385,7 +385,7 @@ namespace System.Collections
}
}
public override void Enqueue(Object value)
public override void Enqueue(object value)
{
lock (_root)
{
@ -394,7 +394,7 @@ namespace System.Collections
}
[SuppressMessage("Microsoft.Contracts", "CC1055")] // Thread safety problems with precondition - can't express the precondition as of Dev10.
public override Object Dequeue()
public override object Dequeue()
{
lock (_root)
{
@ -411,7 +411,7 @@ namespace System.Collections
}
[SuppressMessage("Microsoft.Contracts", "CC1055")] // Thread safety problems with precondition - can't express the precondition as of Dev10.
public override Object Peek()
public override object Peek()
{
lock (_root)
{
@ -419,7 +419,7 @@ namespace System.Collections
}
}
public override Object[] ToArray()
public override object[] ToArray()
{
lock (_root)
{
@ -445,7 +445,7 @@ namespace System.Collections
private Queue _q;
private int _index;
private int _version;
private Object _currentElement;
private object _currentElement;
internal QueueEnumerator(Queue q)
{
@ -477,7 +477,7 @@ namespace System.Collections
return true;
}
public virtual Object Current
public virtual object Current
{
get
{
@ -516,7 +516,7 @@ namespace System.Collections
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public Object[] Items
public object[] Items
{
get
{

Просмотреть файл

@ -63,15 +63,15 @@ namespace System.Collections
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class SortedList : IDictionary, ICloneable
{
private Object[] keys; // Do not rename (binary serialization)
private Object[] values; // Do not rename (binary serialization)
private object[] keys; // Do not rename (binary serialization)
private object[] values; // Do not rename (binary serialization)
private int _size; // Do not rename (binary serialization)
private int version; // Do not rename (binary serialization)
private IComparer comparer; // Do not rename (binary serialization)
private KeyList keyList; // Do not rename (binary serialization)
private ValueList valueList; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
private object _syncRoot;
private const int _defaultCapacity = 16;
@ -109,8 +109,8 @@ namespace System.Collections
if (initialCapacity < 0)
throw new ArgumentOutOfRangeException(nameof(initialCapacity), SR.ArgumentOutOfRange_NeedNonNegNum);
keys = new Object[initialCapacity];
values = new Object[initialCapacity];
keys = new object[initialCapacity];
values = new object[initialCapacity];
comparer = new Comparer(CultureInfo.CurrentCulture);
}
@ -186,7 +186,7 @@ namespace System.Collections
// Adds an entry with the given key and value to this sorted list. An
// ArgumentException is thrown if the key is already present in the sorted list.
//
public virtual void Add(Object key, Object value)
public virtual void Add(object key, object value)
{
if (key == null) throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
@ -219,8 +219,8 @@ namespace System.Collections
{
if (value > 0)
{
Object[] newKeys = new Object[value];
Object[] newValues = new Object[value];
object[] newKeys = new object[value];
object[] newValues = new object[value];
if (_size > 0)
{
Array.Copy(keys, 0, newKeys, 0, _size);
@ -292,13 +292,13 @@ namespace System.Collections
}
// Synchronization root for this object.
public virtual Object SyncRoot
public virtual object SyncRoot
{
get
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new object(), null);
}
return _syncRoot;
}
@ -317,7 +317,7 @@ namespace System.Collections
// Makes a virtually identical copy of this SortedList. This is a shallow
// copy. IE, the Objects in the SortedList are not cloned - we copy the
// references to those objects.
public virtual Object Clone()
public virtual object Clone()
{
SortedList sl = new SortedList(_size);
Array.Copy(keys, 0, sl.keys, 0, _size);
@ -332,14 +332,14 @@ namespace System.Collections
// Checks if this sorted list contains an entry with the given key.
//
public virtual bool Contains(Object key)
public virtual bool Contains(object key)
{
return IndexOfKey(key) >= 0;
}
// Checks if this sorted list contains an entry with the given key.
//
public virtual bool ContainsKey(Object key)
public virtual bool ContainsKey(object key)
{
// Yes, this is a SPEC'ed duplicate of Contains().
return IndexOfKey(key) >= 0;
@ -351,7 +351,7 @@ namespace System.Collections
// search and is substantially slower than the Contains
// method.
//
public virtual bool ContainsValue(Object value)
public virtual bool ContainsValue(object value)
{
return IndexOfValue(value) >= 0;
}
@ -405,7 +405,7 @@ namespace System.Collections
// Returns the value of the entry at the given index.
//
public virtual Object GetByIndex(int index)
public virtual object GetByIndex(int index)
{
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
@ -434,7 +434,7 @@ namespace System.Collections
// Returns the key of the entry at the given index.
//
public virtual Object GetKey(int index)
public virtual object GetKey(int index)
{
if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
return keys[index];
@ -478,7 +478,7 @@ namespace System.Collections
// Returns the value associated with the given key. If an entry with the
// given key is not found, the returned value is null.
//
public virtual Object this[Object key]
public virtual object this[object key]
{
get
{
@ -507,7 +507,7 @@ namespace System.Collections
// the given key does not occur in this sorted list. Null is an invalid
// key value.
//
public virtual int IndexOfKey(Object key)
public virtual int IndexOfKey(object key)
{
if (key == null)
throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
@ -521,13 +521,13 @@ namespace System.Collections
// size of this sorted list. The elements of the list are compared to the
// given value using the Object.Equals method.
//
public virtual int IndexOfValue(Object value)
public virtual int IndexOfValue(object value)
{
return Array.IndexOf(values, value, 0, _size);
}
// Inserts an entry with a given key and value at a given index.
private void Insert(int index, Object key, Object value)
private void Insert(int index, object key, object value)
{
if (_size == keys.Length) EnsureCapacity(_size + 1);
if (index < _size)
@ -562,7 +562,7 @@ namespace System.Collections
// key exists in the sorted list, it is removed. An ArgumentException is
// thrown if the key is null.
//
public virtual void Remove(Object key)
public virtual void Remove(object key)
{
int i = IndexOfKey(key);
if (i >= 0)
@ -572,7 +572,7 @@ namespace System.Collections
// Sets the value at an index to a given value. The previous value of
// the given entry is overwritten.
//
public virtual void SetByIndex(int index, Object value)
public virtual void SetByIndex(int index, object value)
{
if (index < 0 || index >= Count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
values[index] = value;
@ -607,7 +607,7 @@ namespace System.Collections
private class SyncSortedList : SortedList
{
private SortedList _list; // Do not rename (binary serialization)
private Object _root; // Do not rename (binary serialization)
private object _root; // Do not rename (binary serialization)
internal SyncSortedList(SortedList list)
{
@ -620,7 +620,7 @@ namespace System.Collections
get { lock (_root) { return _list.Count; } }
}
public override Object SyncRoot
public override object SyncRoot
{
get { return _root; }
}
@ -641,7 +641,7 @@ namespace System.Collections
get { return true; }
}
public override Object this[Object key]
public override object this[object key]
{
get
{
@ -659,7 +659,7 @@ namespace System.Collections
}
}
public override void Add(Object key, Object value)
public override void Add(object key, object value)
{
lock (_root)
{
@ -680,7 +680,7 @@ namespace System.Collections
}
}
public override Object Clone()
public override object Clone()
{
lock (_root)
{
@ -688,7 +688,7 @@ namespace System.Collections
}
}
public override bool Contains(Object key)
public override bool Contains(object key)
{
lock (_root)
{
@ -696,7 +696,7 @@ namespace System.Collections
}
}
public override bool ContainsKey(Object key)
public override bool ContainsKey(object key)
{
lock (_root)
{
@ -704,7 +704,7 @@ namespace System.Collections
}
}
public override bool ContainsValue(Object key)
public override bool ContainsValue(object key)
{
lock (_root)
{
@ -721,7 +721,7 @@ namespace System.Collections
}
[SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems.
public override Object GetByIndex(int index)
public override object GetByIndex(int index)
{
lock (_root)
{
@ -738,7 +738,7 @@ namespace System.Collections
}
[SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems.
public override Object GetKey(int index)
public override object GetKey(int index)
{
lock (_root)
{
@ -762,7 +762,7 @@ namespace System.Collections
}
}
public override int IndexOfKey(Object key)
public override int IndexOfKey(object key)
{
if (key == null)
throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
@ -774,7 +774,7 @@ namespace System.Collections
}
[SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems.
public override int IndexOfValue(Object value)
public override int IndexOfValue(object value)
{
lock (_root)
{
@ -791,7 +791,7 @@ namespace System.Collections
}
}
public override void Remove(Object key)
public override void Remove(object key)
{
lock (_root)
{
@ -800,7 +800,7 @@ namespace System.Collections
}
[SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems.
public override void SetByIndex(int index, Object value)
public override void SetByIndex(int index, object value)
{
lock (_root)
{
@ -825,8 +825,8 @@ namespace System.Collections
private class SortedListEnumerator : IDictionaryEnumerator, ICloneable
{
private SortedList _sortedList;
private Object _key;
private Object _value;
private object _key;
private object _value;
private int _index;
private int _startIndex; // Store for Reset.
private int _endIndex;
@ -852,7 +852,7 @@ namespace System.Collections
public object Clone() => MemberwiseClone();
public virtual Object Key
public virtual object Key
{
get
{
@ -889,7 +889,7 @@ namespace System.Collections
}
}
public virtual Object Current
public virtual object Current
{
get
{
@ -904,7 +904,7 @@ namespace System.Collections
}
}
public virtual Object Value
public virtual object Value
{
get
{
@ -955,12 +955,12 @@ namespace System.Collections
get { return sortedList.IsSynchronized; }
}
public virtual Object SyncRoot
public virtual object SyncRoot
{
get { return sortedList.SyncRoot; }
}
public virtual int Add(Object key)
public virtual int Add(object key)
{
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
// return 0; // suppress compiler warning
@ -971,7 +971,7 @@ namespace System.Collections
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}
public virtual bool Contains(Object key)
public virtual bool Contains(object key)
{
return sortedList.Contains(key);
}
@ -985,12 +985,12 @@ namespace System.Collections
Array.Copy(sortedList.keys, 0, array, arrayIndex, sortedList.Count);
}
public virtual void Insert(int index, Object value)
public virtual void Insert(int index, object value)
{
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}
public virtual Object this[int index]
public virtual object this[int index]
{
get
{
@ -1007,7 +1007,7 @@ namespace System.Collections
return new SortedListEnumerator(sortedList, 0, sortedList.Count, SortedListEnumerator.Keys);
}
public virtual int IndexOf(Object key)
public virtual int IndexOf(object key)
{
if (key == null)
throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
@ -1018,7 +1018,7 @@ namespace System.Collections
return -1;
}
public virtual void Remove(Object key)
public virtual void Remove(object key)
{
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}
@ -1060,12 +1060,12 @@ namespace System.Collections
get { return sortedList.IsSynchronized; }
}
public virtual Object SyncRoot
public virtual object SyncRoot
{
get { return sortedList.SyncRoot; }
}
public virtual int Add(Object key)
public virtual int Add(object key)
{
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}
@ -1075,7 +1075,7 @@ namespace System.Collections
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}
public virtual bool Contains(Object value)
public virtual bool Contains(object value)
{
return sortedList.ContainsValue(value);
}
@ -1089,12 +1089,12 @@ namespace System.Collections
Array.Copy(sortedList.values, 0, array, arrayIndex, sortedList.Count);
}
public virtual void Insert(int index, Object value)
public virtual void Insert(int index, object value)
{
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}
public virtual Object this[int index]
public virtual object this[int index]
{
get
{
@ -1111,12 +1111,12 @@ namespace System.Collections
return new SortedListEnumerator(sortedList, 0, sortedList.Count, SortedListEnumerator.Values);
}
public virtual int IndexOf(Object value)
public virtual int IndexOf(object value)
{
return Array.IndexOf(sortedList.values, value, 0, sortedList.Count);
}
public virtual void Remove(Object value)
public virtual void Remove(object value)
{
throw new NotSupportedException(SR.NotSupported_SortedListNestedWrite);
}

Просмотреть файл

@ -24,17 +24,17 @@ namespace System.Collections
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class Stack : ICollection, ICloneable
{
private Object[] _array; // Storage for stack elements. Do not rename (binary serialization)
private object[] _array; // Storage for stack elements. Do not rename (binary serialization)
private int _size; // Number of items in the stack. Do not rename (binary serialization)
private int _version; // Used to keep enumerator in sync w/ collection. Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
private object _syncRoot;
private const int _defaultCapacity = 10;
public Stack()
{
_array = new Object[_defaultCapacity];
_array = new object[_defaultCapacity];
_size = 0;
_version = 0;
}
@ -48,7 +48,7 @@ namespace System.Collections
if (initialCapacity < _defaultCapacity)
initialCapacity = _defaultCapacity; // Simplify doubling logic in Push.
_array = new Object[initialCapacity];
_array = new object[initialCapacity];
_size = 0;
_version = 0;
}
@ -79,13 +79,13 @@ namespace System.Collections
get { return false; }
}
public virtual Object SyncRoot
public virtual object SyncRoot
{
get
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new object(), null);
}
return _syncRoot;
}
@ -99,7 +99,7 @@ namespace System.Collections
_version++;
}
public virtual Object Clone()
public virtual object Clone()
{
Stack s = new Stack(_size);
s._size = _size;
@ -108,7 +108,7 @@ namespace System.Collections
return s;
}
public virtual bool Contains(Object obj)
public virtual bool Contains(object obj)
{
int count = _size;
@ -167,7 +167,7 @@ namespace System.Collections
// Returns the top object on the stack without removing it. If the stack
// is empty, Peek throws an InvalidOperationException.
public virtual Object Peek()
public virtual object Peek()
{
if (_size == 0)
throw new InvalidOperationException(SR.InvalidOperation_EmptyStack);
@ -177,24 +177,24 @@ namespace System.Collections
// Pops an item from the top of the stack. If the stack is empty, Pop
// throws an InvalidOperationException.
public virtual Object Pop()
public virtual object Pop()
{
if (_size == 0)
throw new InvalidOperationException(SR.InvalidOperation_EmptyStack);
_version++;
Object obj = _array[--_size];
object obj = _array[--_size];
_array[_size] = null; // Free memory quicker.
return obj;
}
// Pushes an item to the top of the stack.
//
public virtual void Push(Object obj)
public virtual void Push(object obj)
{
if (_size == _array.Length)
{
Object[] newArray = new Object[2 * _array.Length];
object[] newArray = new object[2 * _array.Length];
Array.Copy(_array, 0, newArray, 0, _size);
_array = newArray;
}
@ -214,12 +214,12 @@ namespace System.Collections
// Copies the Stack to an array, in the same order Pop would return the items.
public virtual Object[] ToArray()
public virtual object[] ToArray()
{
if (_size == 0)
return Array.Empty<Object>();
Object[] objArray = new Object[_size];
object[] objArray = new object[_size];
int i = 0;
while (i < _size)
{
@ -232,7 +232,7 @@ namespace System.Collections
private class SyncStack : Stack
{
private Stack _s;
private Object _root;
private object _root;
internal SyncStack(Stack stack)
{
@ -245,7 +245,7 @@ namespace System.Collections
get { return true; }
}
public override Object SyncRoot
public override object SyncRoot
{
get
{
@ -264,7 +264,7 @@ namespace System.Collections
}
}
public override bool Contains(Object obj)
public override bool Contains(object obj)
{
lock (_root)
{
@ -272,7 +272,7 @@ namespace System.Collections
}
}
public override Object Clone()
public override object Clone()
{
lock (_root)
{
@ -296,7 +296,7 @@ namespace System.Collections
}
}
public override void Push(Object value)
public override void Push(object value)
{
lock (_root)
{
@ -304,7 +304,7 @@ namespace System.Collections
}
}
public override Object Pop()
public override object Pop()
{
lock (_root)
{
@ -320,7 +320,7 @@ namespace System.Collections
}
}
public override Object Peek()
public override object Peek()
{
lock (_root)
{
@ -328,7 +328,7 @@ namespace System.Collections
}
}
public override Object[] ToArray()
public override object[] ToArray()
{
lock (_root)
{
@ -342,7 +342,7 @@ namespace System.Collections
private Stack _stack;
private int _index;
private int _version;
private Object _currentElement;
private object _currentElement;
internal StackEnumerator(Stack stack)
{
@ -379,7 +379,7 @@ namespace System.Collections
return retval;
}
public virtual Object Current
public virtual object Current
{
get
{
@ -410,7 +410,7 @@ namespace System.Collections
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public Object[] Items
public object[] Items
{
get
{

Просмотреть файл

@ -20,7 +20,7 @@ namespace System.Collections.Specialized
private int count; // Do not rename (binary serialization)
private readonly IComparer comparer; // Do not rename (binary serialization)
[NonSerialized]
private Object _syncRoot;
private object _syncRoot;
public ListDictionary()
{
@ -152,7 +152,7 @@ namespace System.Collections.Specialized
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new object(), null);
}
return _syncRoot;
}

Просмотреть файл

@ -30,7 +30,7 @@ namespace System.Collections.Specialized
private volatile NameObjectEntry _nullKeyEntry;
private KeysCollection _keys;
private int _version;
private Object _syncRoot;
private object _syncRoot;
private static readonly StringComparer s_defaultComparer = CultureInfo.InvariantCulture.CompareInfo.GetStringComparer(CompareOptions.IgnoreCase);
@ -48,7 +48,7 @@ namespace System.Collections.Specialized
Reset();
}
protected NameObjectCollectionBase(Int32 capacity, IEqualityComparer equalityComparer) : this(equalityComparer)
protected NameObjectCollectionBase(int capacity, IEqualityComparer equalityComparer) : this(equalityComparer)
{
Reset(capacity);
}
@ -111,7 +111,7 @@ namespace System.Collections.Specialized
_version++;
}
private NameObjectEntry FindEntry(String key)
private NameObjectEntry FindEntry(string key)
{
if (key != null)
return (NameObjectEntry)_entriesTable[key];
@ -158,7 +158,7 @@ namespace System.Collections.Specialized
/// <para>Adds an entry with the specified key and value into the
/// <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected void BaseAdd(String name, Object value)
protected void BaseAdd(string name, object value)
{
if (_readOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
@ -187,7 +187,7 @@ namespace System.Collections.Specialized
/// <para>Removes the entries with the specified key from the
/// <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected void BaseRemove(String name)
protected void BaseRemove(string name)
{
if (_readOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
@ -229,7 +229,7 @@ namespace System.Collections.Specialized
if (_readOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
String key = BaseGetKey(index);
string key = BaseGetKey(index);
if (key != null)
{
@ -267,7 +267,7 @@ namespace System.Collections.Specialized
/// <para>Gets the value of the first entry with the specified key from
/// the <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected Object BaseGet(String name)
protected object BaseGet(string name)
{
NameObjectEntry e = FindEntry(name);
return (e != null) ? e.Value : null;
@ -279,7 +279,7 @@ namespace System.Collections.Specialized
/// into the <see cref='System.Collections.Specialized.NameObjectCollectionBase'/>
/// instance.</para>
/// </devdoc>
protected void BaseSet(String name, Object value)
protected void BaseSet(string name, object value)
{
if (_readOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
@ -304,7 +304,7 @@ namespace System.Collections.Specialized
/// <para>Gets the value of the entry at the specified index of
/// the <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected Object BaseGet(int index)
protected object BaseGet(int index)
{
NameObjectEntry entry = (NameObjectEntry)_entriesArray[index];
return entry.Value;
@ -315,7 +315,7 @@ namespace System.Collections.Specialized
/// <see cref='System.Collections.Specialized.NameObjectCollectionBase'/>
/// instance.</para>
/// </devdoc>
protected String BaseGetKey(int index)
protected string BaseGetKey(int index)
{
NameObjectEntry entry = (NameObjectEntry)_entriesArray[index];
return entry.Key;
@ -325,7 +325,7 @@ namespace System.Collections.Specialized
/// <para>Sets the value of the entry at the specified index of
/// the <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected void BaseSet(int index, Object value)
protected void BaseSet(int index, object value)
{
if (_readOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
@ -384,13 +384,13 @@ namespace System.Collections.Specialized
array.SetValue(e.Current, index++);
}
Object ICollection.SyncRoot
object ICollection.SyncRoot
{
get
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new object(), null);
}
return _syncRoot;
}
@ -409,10 +409,10 @@ namespace System.Collections.Specialized
/// <para>Returns a <see cref='System.String' qualify='true'/> array containing all the keys in the
/// <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected String[] BaseGetAllKeys()
protected string[] BaseGetAllKeys()
{
int n = _entriesArray.Count;
String[] allKeys = new String[n];
string[] allKeys = new string[n];
for (int i = 0; i < n; i++)
allKeys[i] = BaseGetKey(i);
@ -424,10 +424,10 @@ namespace System.Collections.Specialized
/// <para>Returns an <see cref='System.Object' qualify='true'/> array containing all the values in the
/// <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
protected Object[] BaseGetAllValues()
protected object[] BaseGetAllValues()
{
int n = _entriesArray.Count;
Object[] allValues = new Object[n];
object[] allValues = new object[n];
for (int i = 0; i < n; i++)
allValues[i] = BaseGet(i);
@ -480,14 +480,14 @@ namespace System.Collections.Specialized
internal class NameObjectEntry
{
internal NameObjectEntry(String name, Object value)
internal NameObjectEntry(string name, object value)
{
Key = name;
Value = value;
}
internal String Key;
internal Object Value;
internal string Key;
internal object Value;
}
//
@ -531,7 +531,7 @@ namespace System.Collections.Specialized
_pos = -1;
}
public Object Current
public object Current
{
get
{
@ -568,7 +568,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para> Gets the key at the specified index of the collection.</para>
/// </devdoc>
public virtual String Get(int index)
public virtual string Get(int index)
{
return _coll.BaseGetKey(index);
}
@ -576,7 +576,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Represents the entry at the specified index of the collection.</para>
/// </devdoc>
public String this[int index]
public string this[int index]
{
get
{
@ -632,7 +632,7 @@ namespace System.Collections.Specialized
array.SetValue(e.Current, index++);
}
Object ICollection.SyncRoot
object ICollection.SyncRoot
{
get { return ((ICollection)_coll).SyncRoot; }
}

Просмотреть файл

@ -19,8 +19,8 @@ namespace System.Collections.Specialized
/// </devdoc>
public class NameValueCollection : NameObjectCollectionBase
{
private String[] _all; // Do not rename (binary serialization)
private String[] _allKeys; // Do not rename (binary serialization)
private string[] _all; // Do not rename (binary serialization)
private string[] _allKeys; // Do not rename (binary serialization)
//
// Constructors
@ -64,7 +64,7 @@ namespace System.Collections.Specialized
{
}
public NameValueCollection(Int32 capacity, IEqualityComparer equalityComparer)
public NameValueCollection(int capacity, IEqualityComparer equalityComparer)
: base(capacity, equalityComparer)
{
}
@ -109,22 +109,22 @@ namespace System.Collections.Specialized
_allKeys = null;
}
private static String GetAsOneString(ArrayList list)
private static string GetAsOneString(ArrayList list)
{
int n = (list != null) ? list.Count : 0;
if (n == 1)
{
return (String)list[0];
return (string)list[0];
}
else if (n > 1)
{
StringBuilder s = new StringBuilder((String)list[0]);
StringBuilder s = new StringBuilder((string)list[0]);
for (int i = 1; i < n; i++)
{
s.Append(',');
s.Append((String)list[i]);
s.Append((string)list[i]);
}
return s.ToString();
@ -135,13 +135,13 @@ namespace System.Collections.Specialized
}
}
private static String[] GetAsStringArray(ArrayList list)
private static string[] GetAsStringArray(ArrayList list)
{
int n = (list != null) ? list.Count : 0;
if (n == 0)
return null;
String[] array = new String[n];
string[] array = new string[n];
list.CopyTo(0, array, 0, n);
return array;
}
@ -166,8 +166,8 @@ namespace System.Collections.Specialized
for (int i = 0; i < n; i++)
{
String key = c.GetKey(i);
String[] values = c.GetValues(i);
string key = c.GetKey(i);
string[] values = c.GetValues(i);
if (values != null)
{
@ -219,7 +219,7 @@ namespace System.Collections.Specialized
int n = Count;
if (_all == null)
{
String[] all = new String[n];
string[] all = new string[n];
for (int i = 0; i < n; i++)
{
all[i] = Get(i);
@ -260,7 +260,7 @@ namespace System.Collections.Specialized
/// <para>Adds an entry with the specified name and value into the
/// <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public virtual void Add(String name, String value)
public virtual void Add(string name, string value)
{
if (IsReadOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
@ -288,7 +288,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para> Gets the values associated with the specified key from the <see cref='System.Collections.Specialized.NameValueCollection'/> combined into one comma-separated list.</para>
/// </devdoc>
public virtual String Get(String name)
public virtual string Get(string name)
{
ArrayList values = (ArrayList)BaseGet(name);
return GetAsOneString(values);
@ -297,7 +297,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Gets the values associated with the specified key from the <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public virtual String[] GetValues(String name)
public virtual string[] GetValues(string name)
{
ArrayList values = (ArrayList)BaseGet(name);
return GetAsStringArray(values);
@ -306,7 +306,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Adds a value to an entry in the <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public virtual void Set(String name, String value)
public virtual void Set(string name, string value)
{
if (IsReadOnly)
throw new NotSupportedException(SR.CollectionReadOnly);
@ -321,7 +321,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Removes the entries with the specified key from the <see cref='System.Collections.Specialized.NameObjectCollectionBase'/> instance.</para>
/// </devdoc>
public virtual void Remove(String name)
public virtual void Remove(string name)
{
InvalidateCachedArrays();
BaseRemove(name);
@ -331,7 +331,7 @@ namespace System.Collections.Specialized
/// <para> Represents the entry with the specified key in the
/// <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public String this[String name]
public string this[string name]
{
get
{
@ -353,7 +353,7 @@ namespace System.Collections.Specialized
/// Gets the values at the specified index of the <see cref='System.Collections.Specialized.NameValueCollection'/> combined into one
/// comma-separated list.</para>
/// </devdoc>
public virtual String Get(int index)
public virtual string Get(int index)
{
ArrayList values = (ArrayList)BaseGet(index);
return GetAsOneString(values);
@ -362,7 +362,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para> Gets the values at the specified index of the <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public virtual String[] GetValues(int index)
public virtual string[] GetValues(int index)
{
ArrayList values = (ArrayList)BaseGet(index);
return GetAsStringArray(values);
@ -371,7 +371,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Gets the key at the specified index of the <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public virtual String GetKey(int index)
public virtual string GetKey(int index)
{
return BaseGetKey(index);
}
@ -379,7 +379,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Represents the entry at the specified index of the <see cref='System.Collections.Specialized.NameValueCollection'/>.</para>
/// </devdoc>
public String this[int index]
public string this[int index]
{
get
{
@ -394,7 +394,7 @@ namespace System.Collections.Specialized
/// <devdoc>
/// <para>Gets all the keys in the <see cref='System.Collections.Specialized.NameValueCollection'/>. </para>
/// </devdoc>
public virtual String[] AllKeys
public virtual string[] AllKeys
{
get
{

Просмотреть файл

@ -29,7 +29,7 @@ namespace System.Collections.Specialized
private int _initialCapacity;
private IEqualityComparer _comparer;
private bool _readOnly;
private Object _syncRoot;
private object _syncRoot;
private SerializationInfo _siInfo; //A temporary variable which we need during deserialization.
private const string KeyComparerName = "KeyComparer"; // Do not rename (binary serialization)
@ -162,7 +162,7 @@ namespace System.Collections.Specialized
{
if (_syncRoot == null)
{
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
System.Threading.Interlocked.CompareExchange(ref _syncRoot, new object(), null);
}
return _syncRoot;
}

Просмотреть файл

@ -574,7 +574,7 @@ namespace System.Collections
}
}
public Object SyncRoot
public object SyncRoot
{
get
{

Просмотреть файл

@ -413,7 +413,7 @@ namespace System.Collections.Generic
#region IDeserializationCallback methods
public virtual void OnDeserialization(Object sender)
public virtual void OnDeserialization(object sender)
{
if (_siInfo == null)
{

Просмотреть файл

@ -354,7 +354,7 @@ namespace System.Collections.Generic
}
}
public virtual void OnDeserialization(Object sender)
public virtual void OnDeserialization(object sender)
{
if (_siInfo == null)
{
@ -627,7 +627,7 @@ namespace System.Collections.Generic
throw new PlatformNotSupportedException();
}
void IDeserializationCallback.OnDeserialization(Object sender)
void IDeserializationCallback.OnDeserialization(object sender)
{
throw new PlatformNotSupportedException();
}

Просмотреть файл

@ -346,12 +346,12 @@ namespace System.Collections.Generic
throw new PlatformNotSupportedException();
}
void IDeserializationCallback.OnDeserialization(Object sender)
void IDeserializationCallback.OnDeserialization(object sender)
{
throw new PlatformNotSupportedException();
}
protected override void OnDeserialization(Object sender) => throw new PlatformNotSupportedException();
protected override void OnDeserialization(object sender) => throw new PlatformNotSupportedException();
}
}
}

Просмотреть файл

@ -39,7 +39,7 @@ namespace System.ComponentModel.DataAnnotations
bool digitFound = false;
foreach (char c in valueAsString)
{
if (Char.IsDigit(c))
if (char.IsDigit(c))
{
digitFound = true;
break;
@ -53,8 +53,8 @@ namespace System.ComponentModel.DataAnnotations
foreach (char c in valueAsString)
{
if (!(Char.IsDigit(c)
|| Char.IsWhiteSpace(c)
if (!(char.IsDigit(c)
|| char.IsWhiteSpace(c)
|| AdditionalPhoneNumberCharacters.IndexOf(c) != -1))
{
return false;
@ -115,7 +115,7 @@ namespace System.ComponentModel.DataAnnotations
foreach (char c in potentialExtension)
{
if (!Char.IsDigit(c))
if (!char.IsDigit(c))
{
return false;
}

Просмотреть файл

@ -18,19 +18,19 @@ namespace Microsoft.Internal
// typeofs are pretty expensive, so we cache them statically
private static readonly Type TypeType = typeof(System.Type);
private static readonly Type StringType = typeof(System.String);
private static readonly Type CharType = typeof(System.Char);
private static readonly Type BooleanType = typeof(System.Boolean);
private static readonly Type ByteType = typeof(System.Byte);
private static readonly Type SByteType = typeof(System.SByte);
private static readonly Type Int16Type = typeof(System.Int16);
private static readonly Type UInt16Type = typeof(System.UInt16);
private static readonly Type Int32Type = typeof(System.Int32);
private static readonly Type UInt32Type = typeof(System.UInt32);
private static readonly Type Int64Type = typeof(System.Int64);
private static readonly Type UInt64Type = typeof(System.UInt64);
private static readonly Type DoubleType = typeof(System.Double);
private static readonly Type SingleType = typeof(System.Single);
private static readonly Type StringType = typeof(string);
private static readonly Type CharType = typeof(char);
private static readonly Type BooleanType = typeof(bool);
private static readonly Type ByteType = typeof(byte);
private static readonly Type SByteType = typeof(sbyte);
private static readonly Type Int16Type = typeof(short);
private static readonly Type UInt16Type = typeof(ushort);
private static readonly Type Int32Type = typeof(int);
private static readonly Type UInt32Type = typeof(uint);
private static readonly Type Int64Type = typeof(long);
private static readonly Type UInt64Type = typeof(ulong);
private static readonly Type DoubleType = typeof(double);
private static readonly Type SingleType = typeof(float);
private static readonly Type IEnumerableTypeofT = typeof(System.Collections.Generic.IEnumerable<>);
private static readonly Type IEnumerableType = typeof(System.Collections.IEnumerable);

Просмотреть файл

@ -88,7 +88,7 @@ namespace System.ComponentModel
private static string Format(string format, params string[] arguments)
{
return String.Format(CultureInfo.CurrentCulture, format, arguments);
return string.Format(CultureInfo.CurrentCulture, format, arguments);
}
}
}

Просмотреть файл

@ -354,7 +354,7 @@ namespace System.ComponentModel.Composition.Hosting
private string GetDisplayName()
{
return String.Format(CultureInfo.CurrentCulture,
return string.Format(CultureInfo.CurrentCulture,
SR.TypeCatalog_DisplayNameFormat,
GetType().Name,
GetTypesDisplay());

Просмотреть файл

@ -52,7 +52,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
// we'll add some context and rethrow.
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ExportThrewException,
_member.GetDisplayName()),
Definition.ToElement(),
@ -64,7 +64,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
// this is not supported in MEF currently. Ideally we would validate against it, however, we already shipped
// so we will turn it into a ComposablePartException instead, that they should already be prepared for
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ExportNotValidOnIndexers,
_member.GetDisplayName()),
Definition.ToElement(),
@ -92,7 +92,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
{ // Property does not have a getter
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ExportNotReadable,
_member.GetDisplayName()),
Definition.ToElement());

Просмотреть файл

@ -94,7 +94,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
if (!ContractServices.TryCast(type, value, out result))
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportNotAssignableFromExport,
export.ToElement().DisplayName,
type.FullName),

Просмотреть файл

@ -69,7 +69,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
// leak out as a 'raw' unhandled exception, instead,
// we'll add some context and rethrow.
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportThrewException,
_member.GetDisplayName()),
Definition.ToElement(),
@ -81,7 +81,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
// this is not supported in MEF currently. Ideally we would validate against it, however, we already shipped
// so we will turn it into a ComposablePartException instead, that they should already be prepared for
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ImportNotValidOnIndexers,
_member.GetDisplayName()),
Definition.ToElement(),
@ -96,7 +96,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
// field is marked as read-only.
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportNotWritable,
_member.GetDisplayName()),
Definition.ToElement());
@ -133,7 +133,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
catch (TargetInvocationException exception)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionGetThrewException,
_member.GetDisplayName()),
Definition.ToElement(),
@ -155,7 +155,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
catch (TargetInvocationException exception)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionConstructionThrewException,
_member.GetDisplayName(),
ImportType.ActualType.FullName),
@ -170,7 +170,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
if (collectionObject == null)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionNull,
_member.GetDisplayName()),
Definition.ToElement());
@ -194,7 +194,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
catch (Exception exception)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionIsReadOnlyThrewException,
_member.GetDisplayName(),
collection.GetType().FullName),
@ -205,7 +205,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
if (isReadOnly)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionNotWritable,
_member.GetDisplayName()),
Definition.ToElement());
@ -224,7 +224,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
catch (Exception exception)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionClearThrewException,
_member.GetDisplayName(),
collection.GetType().FullName),
@ -241,7 +241,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
catch (Exception exception)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportCollectionAddThrewException,
_member.GetDisplayName(),
collection.GetType().FullName),

Просмотреть файл

@ -273,7 +273,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
if (constructor == null)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_PartConstructorMissing,
Definition.GetPartType().FullName),
Definition.ToElement());
@ -321,7 +321,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
if (definition.Cardinality == ImportCardinality.ZeroOrMore && !import.ImportType.IsAssignableCollectionType)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_ImportManyOnParameterCanOnlyBeAssigned,
Definition.GetPartType().FullName,
definition.ImportingLazyParameter.Value.Name),
@ -370,7 +370,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
{
if (_importValues == null || !ImportValues.ContainsKey(definition))
{
throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture,
throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
SR.InvalidOperation_GetExportedValueBeforePrereqImportSet,
definition.ToElement().DisplayName));
}
@ -429,7 +429,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
if (exception != null)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_PartConstructorThrewException,
Definition.GetPartType().FullName),
Definition.ToElement(),
@ -544,7 +544,7 @@ namespace System.ComponentModel.Composition.ReflectionModel
catch (Exception exception)
{
throw new ComposablePartException(
String.Format(CultureInfo.CurrentCulture,
string.Format(CultureInfo.CurrentCulture,
SR.ReflectionModel_PartOnImportsSatisfiedThrewException,
Definition.GetPartType().FullName),
Definition.ToElement(),

Просмотреть файл

@ -11,7 +11,7 @@ namespace System.ComponentModel
public class AsyncCompletedEventArgs : EventArgs
{
public AsyncCompletedEventArgs(Exception error, bool cancelled, Object userState)
public AsyncCompletedEventArgs(Exception error, bool cancelled, object userState)
{
_cancelled = cancelled;
_error = error;
@ -32,7 +32,7 @@ namespace System.ComponentModel
public bool Cancelled { get { return _cancelled; } }
public Exception Error { get { return _error; } }
public Object UserState { get { return _state; } }
public object UserState { get { return _state; } }
private readonly bool _cancelled;
private readonly Exception _error;

Просмотреть файл

@ -28,7 +28,7 @@ namespace System.ComponentModel
private bool _localized;
private object _locker = new Object();
private object _locker = new object();
/// <summary>
/// <para>

Просмотреть файл

@ -33,7 +33,7 @@ namespace System.ComponentModel
/// <para>Adds the specified <see cref='System.ComponentModel.IComponent'/> to the <see cref='System.ComponentModel.IContainer'/>
/// at the end of the list, and assigns a name to the component.</para>
/// </summary>
void Add(IComponent component, String name);
void Add(IComponent component, string name);
// The components in the container.
/// <summary>

Просмотреть файл

@ -48,6 +48,6 @@ namespace System.ComponentModel
/// <para>When implemented by a class, gets or sets the name of
/// the component associated with the <see cref='System.ComponentModel.ISite'/>.</para>
/// </summary>
String Name { get; set; }
string Name { get; set; }
}
}

Просмотреть файл

@ -2129,9 +2129,9 @@ namespace System.ComponentModel
Debug.Assert(!IsLiteralPosition(charDex), "Setting char in literal position.");
if (Char.IsLetter(input))
if (char.IsLetter(input))
{
if (Char.IsUpper(input))
if (char.IsUpper(input))
{
if (charDescriptor.CaseConversion == CaseConversion.ToLower)
{
@ -2308,7 +2308,7 @@ namespace System.ComponentModel
switch (Mask[charDex.MaskPosition])
{
case '#': // digit or plus/minus sign optional.
if (!Char.IsDigit(input) && (input != '-') && (input != '+') && input != SPACE_CHAR)
if (!char.IsDigit(input) && (input != '-') && (input != '+') && input != SPACE_CHAR)
{
resultHint = MaskedTextResultHint.DigitExpected;
return false;
@ -2316,7 +2316,7 @@ namespace System.ComponentModel
break;
case '0': // digit required.
if (!Char.IsDigit(input))
if (!char.IsDigit(input))
{
resultHint = MaskedTextResultHint.DigitExpected;
return false;
@ -2324,7 +2324,7 @@ namespace System.ComponentModel
break;
case '9': // digit optional.
if (!Char.IsDigit(input) && input != SPACE_CHAR)
if (!char.IsDigit(input) && input != SPACE_CHAR)
{
resultHint = MaskedTextResultHint.DigitExpected;
return false;
@ -2332,7 +2332,7 @@ namespace System.ComponentModel
break;
case 'L': // letter required.
if (!Char.IsLetter(input))
if (!char.IsLetter(input))
{
resultHint = MaskedTextResultHint.LetterExpected;
return false;
@ -2345,7 +2345,7 @@ namespace System.ComponentModel
break;
case '?': // letter optional.
if (!Char.IsLetter(input) && input != SPACE_CHAR)
if (!char.IsLetter(input) && input != SPACE_CHAR)
{
resultHint = MaskedTextResultHint.LetterExpected;
return false;

Просмотреть файл

@ -106,7 +106,7 @@ namespace System.ComponentModel
//
[typeof(bool)] = typeof(BooleanConverter),
[typeof(byte)] = typeof(ByteConverter),
[typeof(SByte)] = typeof(SByteConverter),
[typeof(sbyte)] = typeof(SByteConverter),
[typeof(char)] = typeof(CharConverter),
[typeof(double)] = typeof(DoubleConverter),
[typeof(string)] = typeof(StringConverter),
@ -114,15 +114,15 @@ namespace System.ComponentModel
[typeof(short)] = typeof(Int16Converter),
[typeof(long)] = typeof(Int64Converter),
[typeof(float)] = typeof(SingleConverter),
[typeof(UInt16)] = typeof(UInt16Converter),
[typeof(UInt32)] = typeof(UInt32Converter),
[typeof(UInt64)] = typeof(UInt64Converter),
[typeof(ushort)] = typeof(UInt16Converter),
[typeof(uint)] = typeof(UInt32Converter),
[typeof(ulong)] = typeof(UInt64Converter),
[typeof(object)] = typeof(TypeConverter),
[typeof(void)] = typeof(TypeConverter),
[typeof(CultureInfo)] = typeof(CultureInfoConverter),
[typeof(DateTime)] = typeof(DateTimeConverter),
[typeof(DateTimeOffset)] = typeof(DateTimeOffsetConverter),
[typeof(Decimal)] = typeof(DecimalConverter),
[typeof(decimal)] = typeof(DecimalConverter),
[typeof(TimeSpan)] = typeof(TimeSpanConverter),
[typeof(Guid)] = typeof(GuidConverter),
[typeof(Uri)] = typeof(UriTypeConverter),
@ -588,7 +588,7 @@ namespace System.ComponentModel
//CanExtend is expensive. We will remember results of CanExtend for the first 64 extenders and using "long canExtend" as a bit vector.
// we want to avoid memory allocation as well so we don't use some more sophisticated data structure like an array of booleans
UInt64 canExtend = 0;
ulong canExtend = 0;
int maxCanExtendResults = 64;
// currentExtenders is what we intend to return. If the caller passed us
// the return value from IExtenderListService, components will already be
@ -620,7 +620,7 @@ namespace System.ComponentModel
extenderCount++;
// Performance:We would like to call CanExtend as little as possible therefore we remember its result
if (curIdx < maxCanExtendResults)
canExtend |= (UInt64)1 << curIdx;
canExtend |= (ulong)1 << curIdx;
if (!newExtenders && (idx >= existingExtenders.Length || currentExtenders[curIdx] != existingExtenders[idx++]))
{
newExtenders = true;
@ -637,7 +637,7 @@ namespace System.ComponentModel
{
extenderCount++;
if (curIdx < maxCanExtendResults)
canExtend |= (UInt64)1 << curIdx;
canExtend |= (ulong)1 << curIdx;
if (!newExtenders && (idx >= existingExtenders.Length || prov != existingExtenders[idx++]))
{
newExtenders = true;
@ -663,7 +663,7 @@ namespace System.ComponentModel
{
while (curIdx < currentExtenders.Length)
{
if ((curIdx < maxCanExtendResults && (canExtend & ((UInt64)1 << curIdx)) != 0) ||
if ((curIdx < maxCanExtendResults && (canExtend & ((ulong)1 << curIdx)) != 0) ||
(curIdx >= maxCanExtendResults && currentExtenders[curIdx].CanExtend(instance)))
{
Debug.Assert(idx < extenderCount, "There are more extenders than we expect");
@ -679,7 +679,7 @@ namespace System.ComponentModel
{
IExtenderProvider p = component as IExtenderProvider;
if (p != null && ((curIdx < maxCanExtendResults && (canExtend & ((UInt64)1 << curIdx)) != 0) ||
if (p != null && ((curIdx < maxCanExtendResults && (canExtend & ((ulong)1 << curIdx)) != 0) ||
(curIdx >= maxCanExtendResults && p.CanExtend(instance))))
{
Debug.Assert(idx < extenderCount, "There are more extenders than we expect");

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -106,22 +106,22 @@ namespace System.Configuration
return new ConfigXmlText(_filename, LineNumber, text, this);
}
public override XmlCDataSection CreateCDataSection(String data)
public override XmlCDataSection CreateCDataSection(string data)
{
return new ConfigXmlCDataSection(_filename, LineNumber, data, this);
}
public override XmlComment CreateComment(String data)
public override XmlComment CreateComment(string data)
{
return new ConfigXmlComment(_filename, LineNumber, data, this);
}
public override XmlSignificantWhitespace CreateSignificantWhitespace(String data)
public override XmlSignificantWhitespace CreateSignificantWhitespace(string data)
{
return new ConfigXmlSignificantWhitespace(_filename, LineNumber, data, this);
}
public override XmlWhitespace CreateWhitespace(String data)
public override XmlWhitespace CreateWhitespace(string data)
{
return new ConfigXmlWhitespace(_filename, LineNumber, data, this);
}

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -23,7 +23,7 @@ namespace System.Configuration
/// and some input from the config system, return a
/// further partially composed config object
/// </summary>
public virtual object Create(Object parent, Object context, XmlNode section)
public virtual object Create(object parent, object context, XmlNode section)
{
Hashtable res;

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -52,15 +52,15 @@ namespace System.Configuration
// handle <set>, <remove>, <clear> tags
if (child.Name == "add")
{
String key = HandlerBase.RemoveRequiredAttribute(child, keyAttriuteName);
String value = HandlerBase.RemoveRequiredAttribute(child, valueAttributeName, true/*allowEmptyString*/);
string key = HandlerBase.RemoveRequiredAttribute(child, keyAttriuteName);
string value = HandlerBase.RemoveRequiredAttribute(child, valueAttributeName, true/*allowEmptyString*/);
HandlerBase.CheckForUnrecognizedAttributes(child);
result[key] = value;
}
else if (child.Name == "remove")
{
String key = HandlerBase.RemoveRequiredAttribute(child, keyAttriuteName);
string key = HandlerBase.RemoveRequiredAttribute(child, keyAttriuteName);
HandlerBase.CheckForUnrecognizedAttributes(child);
result.Remove(key);

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -10,12 +10,12 @@ namespace System.Configuration
[System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class SettingsPropertyIsReadOnlyException : Exception
{
public SettingsPropertyIsReadOnlyException(String message)
public SettingsPropertyIsReadOnlyException(string message)
: base(message)
{
}
public SettingsPropertyIsReadOnlyException(String message, Exception innerException)
public SettingsPropertyIsReadOnlyException(string message, Exception innerException)
: base(message, innerException)
{
}

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -10,12 +10,12 @@ namespace System.Configuration
[System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class SettingsPropertyNotFoundException : Exception
{
public SettingsPropertyNotFoundException(String message)
public SettingsPropertyNotFoundException(string message)
: base(message)
{
}
public SettingsPropertyNotFoundException(String message, Exception innerException)
public SettingsPropertyNotFoundException(string message, Exception innerException)
: base(message, innerException)
{
}

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -10,12 +10,12 @@ namespace System.Configuration
[System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class SettingsPropertyWrongTypeException : Exception
{
public SettingsPropertyWrongTypeException(String message)
public SettingsPropertyWrongTypeException(string message)
: base(message)
{
}
public SettingsPropertyWrongTypeException(String message, Exception innerException)
public SettingsPropertyWrongTypeException(string message, Exception innerException)
: base(message, innerException)
{
}

Просмотреть файл

@ -449,7 +449,7 @@ namespace System
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static String ReadLine()
public static string ReadLine()
{
return In.ReadLine();
}
@ -529,37 +529,37 @@ namespace System
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void WriteLine(Object value)
public static void WriteLine(object value)
{
Out.WriteLine(value);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void WriteLine(String value)
public static void WriteLine(string value)
{
Out.WriteLine(value);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void WriteLine(String format, Object arg0)
public static void WriteLine(string format, object arg0)
{
Out.WriteLine(format, arg0);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void WriteLine(String format, Object arg0, Object arg1)
public static void WriteLine(string format, object arg0, object arg1)
{
Out.WriteLine(format, arg0, arg1);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void WriteLine(String format, Object arg0, Object arg1, Object arg2)
public static void WriteLine(string format, object arg0, object arg1, object arg2)
{
Out.WriteLine(format, arg0, arg1, arg2);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void WriteLine(String format, params Object[] arg)
public static void WriteLine(string format, params object[] arg)
{
if (arg == null) // avoid ArgumentNullException from String.Format
Out.WriteLine(format, null, null); // faster than Out.WriteLine(format, (Object)arg);
@ -568,25 +568,25 @@ namespace System
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void Write(String format, Object arg0)
public static void Write(string format, object arg0)
{
Out.Write(format, arg0);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void Write(String format, Object arg0, Object arg1)
public static void Write(string format, object arg0, object arg1)
{
Out.Write(format, arg0, arg1);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void Write(String format, Object arg0, Object arg1, Object arg2)
public static void Write(string format, object arg0, object arg1, object arg2)
{
Out.Write(format, arg0, arg1, arg2);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void Write(String format, params Object[] arg)
public static void Write(string format, params object[] arg)
{
if (arg == null) // avoid ArgumentNullException from String.Format
Out.Write(format, null, null); // faster than Out.Write(format, (Object)arg);
@ -663,13 +663,13 @@ namespace System
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void Write(Object value)
public static void Write(object value)
{
Out.Write(value);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static void Write(String value)
public static void Write(string value)
{
Out.Write(value);
}

Просмотреть файл

@ -5,7 +5,7 @@
namespace System
{
public delegate void ConsoleCancelEventHandler(Object sender, ConsoleCancelEventArgs e);
public delegate void ConsoleCancelEventHandler(object sender, ConsoleCancelEventArgs e);
public sealed class ConsoleCancelEventArgs : EventArgs
{

Просмотреть файл

@ -47,7 +47,7 @@ namespace System
get { return _mods; }
}
public override bool Equals(Object value)
public override bool Equals(object value)
{
return value is ConsoleKeyInfo && Equals((ConsoleKeyInfo)value);
}

Просмотреть файл

@ -185,7 +185,7 @@ namespace System
// Use this for blocking in Console.ReadKey, which needs to protect itself in case multiple threads call it simultaneously.
// Use a ReadKey-specific lock though, to allow other fields to be initialized on this type.
private static readonly Object s_readKeySyncObject = new object();
private static readonly object s_readKeySyncObject = new object();
// ReadLine & Read can't use this because they need to use ReadFile
// to be able to handle redirected input. We have to accept that

Просмотреть файл

@ -70,7 +70,7 @@ namespace System.IO
}
}
public override String ReadLine()
public override string ReadLine()
{
lock (this)
{
@ -78,7 +78,7 @@ namespace System.IO
}
}
public override String ReadToEnd()
public override string ReadToEnd()
{
lock (this)
{
@ -91,12 +91,12 @@ namespace System.IO
// No explicit locking is needed, as they all just delegate
//
public override Task<String> ReadLineAsync()
public override Task<string> ReadLineAsync()
{
return Task.FromResult(ReadLine());
}
public override Task<String> ReadToEndAsync()
public override Task<string> ReadToEndAsync()
{
return Task.FromResult(ReadToEnd());
}

Просмотреть файл

@ -40,7 +40,7 @@ namespace System.IO
get { return _out.FormatProvider; }
}
public override String NewLine
public override string NewLine
{
get { lock (this) { return _out.NewLine; } }
set { lock (this) { _out.NewLine = value; } }
@ -145,7 +145,7 @@ namespace System.IO
}
}
public override void Write(Decimal value)
public override void Write(decimal value)
{
lock (this)
{
@ -153,7 +153,7 @@ namespace System.IO
}
}
public override void Write(String value)
public override void Write(string value)
{
lock (this)
{
@ -161,7 +161,7 @@ namespace System.IO
}
}
public override void Write(Object value)
public override void Write(object value)
{
lock (this)
{
@ -169,7 +169,7 @@ namespace System.IO
}
}
public override void Write(String format, Object[] arg)
public override void Write(string format, object[] arg)
{
lock (this)
{
@ -273,7 +273,7 @@ namespace System.IO
}
}
public override void WriteLine(String value)
public override void WriteLine(string value)
{
lock (this)
{
@ -281,7 +281,7 @@ namespace System.IO
}
}
public override void WriteLine(Object value)
public override void WriteLine(object value)
{
lock (this)
{
@ -289,7 +289,7 @@ namespace System.IO
}
}
public override void WriteLine(String format, Object[] arg)
public override void WriteLine(string format, object[] arg)
{
lock (this)
{
@ -307,7 +307,7 @@ namespace System.IO
return Task.CompletedTask;
}
public override Task WriteAsync(String value)
public override Task WriteAsync(string value)
{
Write(value);
return Task.CompletedTask;
@ -325,7 +325,7 @@ namespace System.IO
return Task.CompletedTask;
}
public override Task WriteLineAsync(String value)
public override Task WriteLineAsync(string value)
{
WriteLine(value);
return Task.CompletedTask;

Просмотреть файл

@ -129,7 +129,7 @@ namespace System
_readAs32Bit =
magic == MagicLegacyNumber ? false :
magic == Magic32BitNumber ? true :
throw new InvalidOperationException(SR.Format(SR.IO_TermInfoInvalidMagicNumber, String.Concat("O" + Convert.ToString(magic, 8)))); // magic number was not recognized. Printing the magic number in octal.
throw new InvalidOperationException(SR.Format(SR.IO_TermInfoInvalidMagicNumber, string.Concat("O" + Convert.ToString(magic, 8)))); // magic number was not recognized. Printing the magic number in octal.
_sizeOfInt = (_readAs32Bit) ? 4 : 2;
_nameSectionNumBytes = ReadInt16(data, 2);
@ -854,7 +854,7 @@ namespace System
/// <summary>Converts an Int32 to a Boolean, with 0 meaning false and all non-zero values meaning true.</summary>
/// <param name="i">The integer value to convert.</param>
/// <returns>true if the integer was non-zero; otherwise, false.</returns>
private static bool AsBool(Int32 i) { return i != 0; }
private static bool AsBool(int i) { return i != 0; }
/// <summary>Converts a Boolean to an Int32, with true meaning 1 and false meaning 0.</summary>
/// <param name="b">The Boolean value to convert.</param>
@ -867,7 +867,7 @@ namespace System
/// <returns>The formatted string.</returns>
private static unsafe string FormatPrintF(string format, object arg)
{
Debug.Assert(arg is string || arg is Int32);
Debug.Assert(arg is string || arg is int);
// Determine how much space is needed to store the formatted string.
string stringArg = arg as string;
@ -934,16 +934,16 @@ namespace System
/// <summary>Initializes the parameter with an integer value.</summary>
/// <param name="value">The value to be stored in the parameter.</param>
public FormatParam(Int32 value) : this(value, null) { }
public FormatParam(int value) : this(value, null) { }
/// <summary>Initializes the parameter with a string value.</summary>
/// <param name="value">The value to be stored in the parameter.</param>
public FormatParam(String value) : this(0, value ?? string.Empty) { }
public FormatParam(string value) : this(0, value ?? string.Empty) { }
/// <summary>Initializes the parameter.</summary>
/// <param name="intValue">The integer value.</param>
/// <param name="stringValue">The string value.</param>
private FormatParam(Int32 intValue, String stringValue)
private FormatParam(int intValue, string stringValue)
{
_int32 = intValue;
_string = stringValue;

Просмотреть файл

@ -51,7 +51,7 @@ namespace System.Data.SqlTypes
private byte[] _rgbWorkBuf; // A 1-byte work buffer.
// The max data length that we support at this time.
private const long x_lMaxLen = System.Int32.MaxValue;
private const long x_lMaxLen = int.MaxValue;
private const long x_lNull = -1L;

Просмотреть файл

@ -43,7 +43,7 @@ namespace System.Data.SqlTypes
private char[] _rgchWorkBuf; // A 1-char work buffer.
// The max data length that we support at this time.
private const long x_lMaxLen = System.Int32.MaxValue;
private const long x_lMaxLen = int.MaxValue;
private const long x_lNull = -1L;

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -571,7 +571,7 @@ namespace System.Data.Common
internal const int DefaultCommandTimeout = 30;
// security issue, don't rely upon static public readonly values - AS/URT 109635
internal static readonly String StrEmpty = ""; // String.Empty
internal static readonly string StrEmpty = ""; // String.Empty
internal static readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero
internal static readonly int PtrSize = IntPtr.Size;
@ -663,7 +663,7 @@ namespace System.Data.Common
}
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
internal static IntPtr IntPtrOffset(IntPtr pbase, Int32 offset)
internal static IntPtr IntPtrOffset(IntPtr pbase, int offset)
{
if (4 == ADP.PtrSize)
{

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -510,7 +510,7 @@ namespace System.Data.Common
}
if (count != restrictions.Length)
{
string[] tmp = new String[count];
string[] tmp = new string[count];
count = 0;
for (int i = 0; i < restrictions.Length; ++i)
{

Просмотреть файл

@ -151,7 +151,7 @@ namespace System.Data.Common
if (useOdbcRules)
{
if ((0 < keyValue.Length) &&
(('{' == keyValue[0]) || (0 <= keyValue.IndexOf(';')) || (0 == String.Compare(DbConnectionStringKeywords.Driver, keyName, StringComparison.OrdinalIgnoreCase))) &&
(('{' == keyValue[0]) || (0 <= keyValue.IndexOf(';')) || (0 == string.Compare(DbConnectionStringKeywords.Driver, keyName, StringComparison.OrdinalIgnoreCase))) &&
!s_connectionStringQuoteOdbcValueRegex.IsMatch(keyValue))
{
// always quote Driver value (required for ODBC Version 2.65 and earlier)
@ -235,7 +235,7 @@ namespace System.Data.Common
{
try
{
return System.Int32.Parse(stringValue, System.Globalization.NumberStyles.Integer, CultureInfo.InvariantCulture);
return int.Parse(stringValue, System.Globalization.NumberStyles.Integer, CultureInfo.InvariantCulture);
}
catch (FormatException e)
{

Просмотреть файл

@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.
@ -272,7 +272,7 @@ namespace System.Data.Common
for (int i = 0; i < valuetree.Length; ++i)
{
NameValuePermission permitValue = valuetree[i];
if (String.Equals(keyInQuestion, permitValue._value, StringComparison.OrdinalIgnoreCase))
if (string.Equals(keyInQuestion, permitValue._value, StringComparison.OrdinalIgnoreCase))
{
return permitValue;
}

Просмотреть файл

@ -83,7 +83,7 @@ namespace System.Data.ProviderBase
return value;
}
internal String PtrToStringUni(int offset, int length)
internal string PtrToStringUni(int offset, int length)
{
offset += BaseOffset;
Validate(offset, 2 * length);
@ -168,7 +168,7 @@ namespace System.Data.ProviderBase
return destination;
}
internal Char ReadChar(int offset)
internal char ReadChar(int offset)
{
short value = ReadInt16(offset);
return unchecked((char)value);
@ -201,13 +201,13 @@ namespace System.Data.ProviderBase
return destination;
}
internal Double ReadDouble(int offset)
internal double ReadDouble(int offset)
{
Int64 value = ReadInt64(offset);
long value = ReadInt64(offset);
return BitConverter.Int64BitsToDouble(value);
}
internal Int16 ReadInt16(int offset)
internal short ReadInt16(int offset)
{
offset += BaseOffset;
ValidateCheck(offset, 2);
@ -259,7 +259,7 @@ namespace System.Data.ProviderBase
}
}
internal Int32 ReadInt32(int offset)
internal int ReadInt32(int offset)
{
offset += BaseOffset;
ValidateCheck(offset, 4);
@ -311,7 +311,7 @@ namespace System.Data.ProviderBase
}
}
internal Int64 ReadInt64(int offset)
internal long ReadInt64(int offset)
{
offset += BaseOffset;
ValidateCheck(offset, 8);
@ -363,10 +363,10 @@ namespace System.Data.ProviderBase
return value;
}
internal unsafe Single ReadSingle(int offset)
internal unsafe float ReadSingle(int offset)
{
Int32 value = ReadInt32(offset);
return *(Single*)&value;
int value = ReadInt32(offset);
return *(float*)&value;
}
protected override bool ReleaseHandle()
@ -482,7 +482,7 @@ namespace System.Data.ProviderBase
}
}
internal void WriteDouble(int offset, Double value)
internal void WriteDouble(int offset, double value)
{
WriteInt64(offset, BitConverter.DoubleToInt64Bits(value));
}
@ -635,9 +635,9 @@ namespace System.Data.ProviderBase
}
}
internal unsafe void WriteSingle(int offset, Single value)
internal unsafe void WriteSingle(int offset, float value)
{
WriteInt32(offset, *(Int32*)&value);
WriteInt32(offset, *(int*)&value);
}
internal void ZeroMemory()
@ -740,7 +740,7 @@ namespace System.Data.ProviderBase
WriteInt32(offset + 12, ticks);
}
internal Decimal ReadNumeric(int offset)
internal decimal ReadNumeric(int offset)
{
byte[] bits = new byte[20];
ReadBytes(offset, bits, 1, 19);
@ -758,17 +758,17 @@ namespace System.Data.ProviderBase
{
throw ADP.NumericToDecimalOverflow();
}
return new Decimal(buffer);
return new decimal(buffer);
}
internal void WriteNumeric(int offset, Decimal value, byte precision)
internal void WriteNumeric(int offset, decimal value, byte precision)
{
int[] tmp = Decimal.GetBits(value);
int[] tmp = decimal.GetBits(value);
byte[] buffer = new byte[20];
buffer[1] = precision;
Buffer.BlockCopy(tmp, 14, buffer, 2, 2); // copy sign and scale
buffer[3] = (Byte)((0 == buffer[3]) ? 1 : 0); // flip sign for native
buffer[3] = (byte)((0 == buffer[3]) ? 1 : 0); // flip sign for native
Buffer.BlockCopy(tmp, 0, buffer, 4, 12);
buffer[16] = 0;
buffer[17] = 0;

Просмотреть файл

@ -267,7 +267,7 @@ namespace System.Data.ProviderBase
get { return (null != _identity && DbConnectionPoolIdentity.NoIdentity != _identity); }
}
private void CleanupCallback(Object state)
private void CleanupCallback(object state)
{
// Called when the cleanup-timer ticks over.
@ -572,7 +572,7 @@ namespace System.Data.ProviderBase
obj.Dispose();
}
private void ErrorCallback(Object state)
private void ErrorCallback(object state)
{
_errorOccurred = false;
_waitHandles.ErrorEvent.Reset();

Просмотреть файл

@ -6,7 +6,7 @@ namespace System.Data.ProviderBase
{
internal sealed partial class DbConnectionPoolIdentity
{
public static readonly DbConnectionPoolIdentity NoIdentity = new DbConnectionPoolIdentity(String.Empty, false, true);
public static readonly DbConnectionPoolIdentity NoIdentity = new DbConnectionPoolIdentity(string.Empty, false, true);
private readonly string _sidString;
private readonly bool _isRestricted;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше