<Rule Id="SA1203" Action="None" /> <!-- Constants should appear before fields -->
<Rule Id="SA1204" Action="None" /> <!-- Static elements should appear before instance elements -->
<Rule Id="SA1205" Action="None" /> <!-- Partial elements should declare an access modifier -->
- <Rule Id="SA1206" Action="None" /> <!-- Modifer ordering -->
<Rule Id="SA1208" Action="None" /> <!-- Using directive ordering -->
<Rule Id="SA1209" Action="None" /> <!-- Using alias directives should be placed after all using namespace directives -->
<Rule Id="SA1210" Action="None" /> <!-- Using directives should be ordered alphabetically by the namespaces -->
<Rule Id="SA1211" Action="None" /> <!-- Using alias directive ordering -->
- <Rule Id="SA1212" Action="None" /> <!-- A get accessor appears after a set accessor within a property or indexer -->
<Rule Id="SA1214" Action="None" /> <!-- Readonly fields should appear before non-readonly fields -->
<Rule Id="SA1216" Action="None" /> <!-- Using static directives should be placed at the correct location -->
<Rule Id="SA1300" Action="None" /> <!-- Element should begin with an uppercase letter -->
<Rule Id="SA1614" Action="None" /> <!-- Element parameter documentation should have text -->
<Rule Id="SA1615" Action="None" /> <!-- Element return value should be documented -->
<Rule Id="SA1616" Action="None" /> <!-- Element return value documentation should have text -->
- <Rule Id="SA1617" Action="None" /> <!-- Void return value should not be documented -->
<Rule Id="SA1618" Action="None" /> <!-- The documentation for type parameter is missing -->
<Rule Id="SA1619" Action="None" /> <!-- The documentation for type parameter is missing -->
<Rule Id="SA1622" Action="None" /> <!-- Generic type parameter documentation should have text -->
}
[StructLayoutAttribute(LayoutKind.Sequential)]
- public unsafe readonly struct TcpGlobalStatistics
+ public readonly unsafe struct TcpGlobalStatistics
{
public readonly ulong ConnectionsAccepted;
public readonly ulong ConnectionsInitiated;
public static extern unsafe int GetTcpGlobalStatistics(out TcpGlobalStatistics statistics);
[StructLayoutAttribute(LayoutKind.Sequential)]
- public unsafe readonly struct IPv4GlobalStatistics
+ public readonly unsafe struct IPv4GlobalStatistics
{
public readonly ulong OutboundPackets;
public readonly ulong OutputPacketsNoRoute;
public static extern unsafe int GetIPv4GlobalStatistics(out IPv4GlobalStatistics statistics);
[StructLayoutAttribute(LayoutKind.Sequential)]
- public unsafe readonly struct UdpGlobalStatistics
+ public readonly unsafe struct UdpGlobalStatistics
{
public readonly ulong DatagramsReceived;
public readonly ulong DatagramsSent;
public static extern unsafe int GetUdpGlobalStatistics(out UdpGlobalStatistics statistics);
[StructLayoutAttribute(LayoutKind.Sequential)]
- public unsafe readonly struct Icmpv4GlobalStatistics
+ public readonly unsafe struct Icmpv4GlobalStatistics
{
public readonly ulong AddressMaskRepliesReceived;
public readonly ulong AddressMaskRepliesSent;
public static extern unsafe int GetIcmpv4GlobalStatistics(out Icmpv4GlobalStatistics statistics);
[StructLayoutAttribute(LayoutKind.Sequential)]
- public unsafe readonly struct Icmpv6GlobalStatistics
+ public readonly unsafe struct Icmpv6GlobalStatistics
{
public readonly ulong DestinationUnreachableMessagesReceived;
public readonly ulong DestinationUnreachableMessagesSent;
{
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_Sysctl", SetLastError = true)]
- private extern static unsafe int Sysctl(int* name, int namelen, void* value, size_t* len);
+ private static extern unsafe int Sysctl(int* name, int namelen, void* value, size_t* len);
// This is 'raw' sysctl call, only wrapped to allocate memory if needed
// caller always needs to free returned buffer using Marshal.FreeHGlobal()
/// Returns a valid ProcessInfo struct for valid processes that the caller
/// has permission to access; otherwise, returns null
/// </returns>
- static public unsafe ProcessInfo GetProcessInfoById(int pid)
+ public static unsafe ProcessInfo GetProcessInfoById(int pid)
{
kinfo_proc* kinfo = null;
int count;
/// <param name="ptr">The CFType object to retain. This value must not be NULL</param>
/// <returns>The input value</returns>
[DllImport(Interop.Libraries.CoreFoundationLibrary)]
- internal extern static IntPtr CFRetain(IntPtr ptr);
+ internal static extern IntPtr CFRetain(IntPtr ptr);
/// <summary>
/// Decrements the reference count on the specified object and, if the ref count hits 0, cleans up the object.
/// </summary>
/// <param name="ptr">The pointer on which to decrement the reference count.</param>
[DllImport(Interop.Libraries.CoreFoundationLibrary)]
- internal extern static void CFRelease(IntPtr ptr);
+ internal static extern void CFRelease(IntPtr ptr);
}
}
#else
[DllImport(Interop.Libraries.CoreFoundationLibrary)]
#endif
- internal extern static void CFRunLoopRun();
+ internal static extern void CFRunLoopRun();
/// <summary>
/// Runs the current thread’s CFRunLoop object in a particular mode.
/// </summary>
[DllImport(Interop.Libraries.CoreFoundationLibrary)]
- internal extern static int CFRunLoopRunInMode(CFStringRef mode, double seconds, int returnAfterSourceHandled);
+ internal static extern int CFRunLoopRunInMode(CFStringRef mode, double seconds, int returnAfterSourceHandled);
/// <summary>
/// Notifies a RunLoop to stop and return control to the execution context that called CFRunLoopRun
/// </summary>
/// <param name="rl">The RunLoop to notify to stop</param>
[DllImport(Interop.Libraries.CoreFoundationLibrary)]
- internal extern static void CFRunLoopStop(CFRunLoopRef rl);
+ internal static extern void CFRunLoopStop(CFRunLoopRef rl);
/// <summary>
/// Retrieves the RunLoop associated with the current thread; all threads automatically have a RunLoop.
internal static extern int SslGetProtocolVersion(SafeSslHandle sslHandle, out SslProtocols protocol);
[DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslSetEnabledCipherSuites")]
- unsafe internal static extern int SslSetEnabledCipherSuites(SafeSslHandle sslHandle, uint* cipherSuites, int numCipherSuites);
+ internal static extern unsafe int SslSetEnabledCipherSuites(SafeSslHandle sslHandle, uint* cipherSuites, int numCipherSuites);
internal static void SslSetAcceptClientCert(SafeSslHandle sslHandle)
{
internal static partial class Crypto
{
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpMdCtxCreate")]
- internal extern static SafeEvpMdCtxHandle EvpMdCtxCreate(IntPtr type);
+ internal static extern SafeEvpMdCtxHandle EvpMdCtxCreate(IntPtr type);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpMdCtxDestroy")]
- internal extern static void EvpMdCtxDestroy(IntPtr ctx);
+ internal static extern void EvpMdCtxDestroy(IntPtr ctx);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpDigestReset")]
- internal extern static int EvpDigestReset(SafeEvpMdCtxHandle ctx, IntPtr type);
+ internal static extern int EvpDigestReset(SafeEvpMdCtxHandle ctx, IntPtr type);
internal static int EvpDigestUpdate(SafeEvpMdCtxHandle ctx, ReadOnlySpan<byte> d, int cnt) =>
EvpDigestUpdate(ctx, ref MemoryMarshal.GetReference(d), cnt);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpDigestUpdate")]
- private extern static int EvpDigestUpdate(SafeEvpMdCtxHandle ctx, ref byte d, int cnt);
+ private static extern int EvpDigestUpdate(SafeEvpMdCtxHandle ctx, ref byte d, int cnt);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpDigestFinalEx")]
- internal extern static int EvpDigestFinalEx(SafeEvpMdCtxHandle ctx, ref byte md, ref uint s);
+ internal static extern int EvpDigestFinalEx(SafeEvpMdCtxHandle ctx, ref byte md, ref uint s);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpMdSize")]
- internal extern static int EvpMdSize(IntPtr md);
+ internal static extern int EvpMdSize(IntPtr md);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpMd5")]
- internal extern static IntPtr EvpMd5();
+ internal static extern IntPtr EvpMd5();
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpSha1")]
- internal extern static IntPtr EvpSha1();
+ internal static extern IntPtr EvpSha1();
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpSha256")]
- internal extern static IntPtr EvpSha256();
+ internal static extern IntPtr EvpSha256();
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpSha384")]
- internal extern static IntPtr EvpSha384();
+ internal static extern IntPtr EvpSha384();
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EvpSha512")]
- internal extern static IntPtr EvpSha512();
+ internal static extern IntPtr EvpSha512();
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_GetMaxMdSize")]
- private extern static int GetMaxMdSize();
+ private static extern int GetMaxMdSize();
internal static readonly int EVP_MAX_MD_SIZE = GetMaxMdSize();
}
internal static partial class Crypto
{
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacCreate")]
- internal extern static SafeHmacCtxHandle HmacCreate(ref byte key, int keyLen, IntPtr md);
+ internal static extern SafeHmacCtxHandle HmacCreate(ref byte key, int keyLen, IntPtr md);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacDestroy")]
- internal extern static void HmacDestroy(IntPtr ctx);
+ internal static extern void HmacDestroy(IntPtr ctx);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacReset")]
- internal extern static int HmacReset(SafeHmacCtxHandle ctx);
+ internal static extern int HmacReset(SafeHmacCtxHandle ctx);
internal static int HmacUpdate(SafeHmacCtxHandle ctx, ReadOnlySpan<byte> data, int len) =>
HmacUpdate(ctx, ref MemoryMarshal.GetReference(data), len);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacUpdate")]
- private extern static int HmacUpdate(SafeHmacCtxHandle ctx, ref byte data, int len);
+ private static extern int HmacUpdate(SafeHmacCtxHandle ctx, ref byte data, int len);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_HmacFinal")]
- internal extern static int HmacFinal(SafeHmacCtxHandle ctx, ref byte data, ref int len);
+ internal static extern int HmacFinal(SafeHmacCtxHandle ctx, ref byte data, ref int len);
}
}
internal static partial class OpenSsl
{
private static readonly Ssl.SslCtxSetVerifyCallback s_verifyClientCertificate = VerifyClientCertificate;
- private static unsafe readonly Ssl.SslCtxSetAlpnCallback s_alpnServerCallback = AlpnServerSelectCallback;
+ private static readonly unsafe Ssl.SslCtxSetAlpnCallback s_alpnServerCallback = AlpnServerSelectCallback;
private static readonly IdnMapping s_idnMapping = new IdnMapping();
#region internal methods
RsaPublicEncrypt(flen, ref MemoryMarshal.GetReference(from), ref MemoryMarshal.GetReference(to), rsa, padding);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_RsaPublicEncrypt")]
- private extern static int RsaPublicEncrypt(
+ private static extern int RsaPublicEncrypt(
int flen,
ref byte from,
ref byte to,
RsaPrivateDecrypt(flen, ref MemoryMarshal.GetReference(from), ref MemoryMarshal.GetReference(to), rsa, padding);
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_RsaPrivateDecrypt")]
- private extern static int RsaPrivateDecrypt(
+ private static extern int RsaPrivateDecrypt(
int flen,
ref byte from,
ref byte to,
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static bool CloseServiceHandle(IntPtr handle);
+ internal static extern bool CloseServiceHandle(IntPtr handle);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static unsafe bool ControlService(SafeServiceHandle serviceHandle, int control, SERVICE_STATUS* pStatus);
+ internal static extern unsafe bool ControlService(SafeServiceHandle serviceHandle, int control, SERVICE_STATUS* pStatus);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- public extern static IntPtr CreateService(SafeServiceHandle databaseHandle, string serviceName, string displayName, int access, int serviceType,
+ public static extern IntPtr CreateService(SafeServiceHandle databaseHandle, string serviceName, string displayName, int access, int serviceType,
int startType, int errorControl, string binaryPath, string loadOrderGroup, IntPtr pTagId, string dependencies,
string servicesStartName, string password);
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- public extern static bool DeleteService(SafeServiceHandle serviceHandle);
+ public static extern bool DeleteService(SafeServiceHandle serviceHandle);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, EntryPoint = "EnumDependentServicesW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static bool EnumDependentServices(
+ internal static extern bool EnumDependentServices(
SafeServiceHandle serviceHandle,
int serviceState,
IntPtr bufferOfENUM_SERVICE_STATUS,
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, EntryPoint = "EnumServicesStatusExW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static bool EnumServicesStatusEx(
+ internal static extern bool EnumServicesStatusEx(
SafeServiceHandle databaseHandle,
int infolevel,
int serviceType,
internal partial class Advapi32
{
[DllImport(Interop.Libraries.Advapi32, CharSet = CharSet.Unicode, EntryPoint = "LookupAccountSidW", SetLastError = true)]
- public extern static unsafe int LookupAccountSid(
+ public static extern unsafe int LookupAccountSid(
string lpSystemName,
byte[] Sid,
char* Name,
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, EntryPoint = "OpenSCManagerW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static IntPtr OpenSCManager(string machineName, string databaseName, int access);
+ internal static extern IntPtr OpenSCManager(string machineName, string databaseName, int access);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, EntryPoint = "OpenServiceW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static IntPtr OpenService(SafeServiceHandle databaseHandle, string serviceName, int access);
+ internal static extern IntPtr OpenService(SafeServiceHandle databaseHandle, string serviceName, int access);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, EntryPoint = "QueryServiceConfigW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static bool QueryServiceConfig(SafeServiceHandle serviceHandle, IntPtr queryServiceConfigPtr, int bufferSize, out int bytesNeeded);
+ internal static extern bool QueryServiceConfig(SafeServiceHandle serviceHandle, IntPtr queryServiceConfigPtr, int bufferSize, out int bytesNeeded);
}
}
public delegate int ServiceControlCallbackEx(int control, int eventType, IntPtr eventData, IntPtr eventContext);
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- public extern static IntPtr RegisterServiceCtrlHandlerEx(string serviceName, ServiceControlCallbackEx callback, IntPtr userData);
+ public static extern IntPtr RegisterServiceCtrlHandlerEx(string serviceName, ServiceControlCallbackEx callback, IntPtr userData);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- public extern static unsafe bool SetServiceStatus(IntPtr serviceStatusHandle, SERVICE_STATUS* status);
+ public static extern unsafe bool SetServiceStatus(IntPtr serviceStatusHandle, SERVICE_STATUS* status);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, EntryPoint = "StartServiceW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static bool StartService(SafeServiceHandle serviceHandle, int argNum, IntPtr argPtrs);
+ internal static extern bool StartService(SafeServiceHandle serviceHandle, int argNum, IntPtr argPtrs);
}
}
internal partial class Advapi32
{
[DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- public extern static bool StartServiceCtrlDispatcher(IntPtr entry);
+ public static extern bool StartServiceCtrlDispatcher(IntPtr entry);
}
}
internal const uint CERT_STORE_ADD_ALWAYS = 4;
[DllImport(Interop.Libraries.Crypt32, CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static bool CertAddCertificateLinkToStore(SafeCertStoreHandle hCertStore, SafeCertContextHandle pCertContext, uint dwAddDisposition, [In, Out] SafeCertContextHandle ppStoreContext);
+ internal static extern bool CertAddCertificateLinkToStore(SafeCertStoreHandle hCertStore, SafeCertContextHandle pCertContext, uint dwAddDisposition, [In, Out] SafeCertContextHandle ppStoreContext);
}
}
internal static partial class IpHlpApi
{
[DllImport(Interop.Libraries.IpHlpApi, ExactSpelling = true)]
- internal extern static uint GetNetworkParams(SafeLocalAllocHandle pFixedInfo, ref uint pOutBufLen);
+ internal static extern uint GetNetworkParams(SafeLocalAllocHandle pFixedInfo, ref uint pOutBufLen);
}
}
}
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
- internal extern static SafeCloseIcmpHandle IcmpCreateFile();
+ internal static extern SafeCloseIcmpHandle IcmpCreateFile();
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
- internal extern static SafeCloseIcmpHandle Icmp6CreateFile();
+ internal static extern SafeCloseIcmpHandle Icmp6CreateFile();
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
- internal extern static bool IcmpCloseHandle(IntPtr handle);
+ internal static extern bool IcmpCloseHandle(IntPtr handle);
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
- internal extern static uint IcmpSendEcho2(SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext,
+ internal static extern uint IcmpSendEcho2(SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext,
uint ipAddress, [In] SafeLocalAllocHandle data, ushort dataSize, ref IPOptions options, SafeLocalAllocHandle replyBuffer, uint replySize, uint timeout);
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
- internal extern static uint Icmp6SendEcho2(SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext,
+ internal static extern uint Icmp6SendEcho2(SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext,
byte[] sourceSocketAddress, byte[] destSocketAddress, [In] SafeLocalAllocHandle data, ushort dataSize, ref IPOptions options, SafeLocalAllocHandle replyBuffer, uint replySize, uint timeout);
}
}
internal delegate void StableUnicastIpAddressTableDelegate(IntPtr context, IntPtr table);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetAdaptersAddresses(
+ internal static extern uint GetAdaptersAddresses(
AddressFamily family,
uint flags,
IntPtr pReserved,
ref uint outBufLen);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetBestInterfaceEx(byte[] ipAddress, out int index);
+ internal static extern uint GetBestInterfaceEx(byte[] ipAddress, out int index);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetIfEntry2(ref MibIfRow2 pIfRow);
+ internal static extern uint GetIfEntry2(ref MibIfRow2 pIfRow);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetIpStatisticsEx(out MibIpStats statistics, AddressFamily family);
+ internal static extern uint GetIpStatisticsEx(out MibIpStats statistics, AddressFamily family);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetTcpStatisticsEx(out MibTcpStats statistics, AddressFamily family);
+ internal static extern uint GetTcpStatisticsEx(out MibTcpStats statistics, AddressFamily family);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetUdpStatisticsEx(out MibUdpStats statistics, AddressFamily family);
+ internal static extern uint GetUdpStatisticsEx(out MibUdpStats statistics, AddressFamily family);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetIcmpStatistics(out MibIcmpInfo statistics);
+ internal static extern uint GetIcmpStatistics(out MibIcmpInfo statistics);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetIcmpStatisticsEx(out MibIcmpInfoEx statistics, AddressFamily family);
+ internal static extern uint GetIcmpStatisticsEx(out MibIcmpInfoEx statistics, AddressFamily family);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetTcpTable(SafeLocalAllocHandle pTcpTable, ref uint dwOutBufLen, bool order);
+ internal static extern uint GetTcpTable(SafeLocalAllocHandle pTcpTable, ref uint dwOutBufLen, bool order);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetExtendedTcpTable(SafeLocalAllocHandle pTcpTable, ref uint dwOutBufLen, bool order,
+ internal static extern uint GetExtendedTcpTable(SafeLocalAllocHandle pTcpTable, ref uint dwOutBufLen, bool order,
uint IPVersion, TcpTableClass tableClass, uint reserved);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetUdpTable(SafeLocalAllocHandle pUdpTable, ref uint dwOutBufLen, bool order);
+ internal static extern uint GetUdpTable(SafeLocalAllocHandle pUdpTable, ref uint dwOutBufLen, bool order);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetExtendedUdpTable(SafeLocalAllocHandle pUdpTable, ref uint dwOutBufLen, bool order,
+ internal static extern uint GetExtendedUdpTable(SafeLocalAllocHandle pUdpTable, ref uint dwOutBufLen, bool order,
uint IPVersion, UdpTableClass tableClass, uint reserved);
[DllImport(Interop.Libraries.IpHlpApi)]
- internal extern static uint GetPerAdapterInfo(uint IfIndex, SafeLocalAllocHandle pPerAdapterInfo, ref uint pOutBufLen);
+ internal static extern uint GetPerAdapterInfo(uint IfIndex, SafeLocalAllocHandle pPerAdapterInfo, ref uint pOutBufLen);
[DllImport(Interop.Libraries.IpHlpApi)]
internal static extern void FreeMibTable(IntPtr handle);
[Out] out SafeCancelMibChangeNotify notificationHandle);
[DllImport(Interop.Libraries.IpHlpApi, ExactSpelling = true)]
- internal extern static uint GetNetworkParams(SafeLocalAllocHandle pFixedInfo, ref uint pOutBufLen);
+ internal static extern uint GetNetworkParams(SafeLocalAllocHandle pFixedInfo, ref uint pOutBufLen);
}
}
{
#if !uap
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
- internal extern static uint if_nametoindex(string name);
+ internal static extern uint if_nametoindex(string name);
#else
internal static uint if_nametoindex(string name) => 0;
#endif
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static bool FlushViewOfFile(IntPtr lpBaseAddress, UIntPtr dwNumberOfBytesToFlush);
+ internal static extern bool FlushViewOfFile(IntPtr lpBaseAddress, UIntPtr dwNumberOfBytesToFlush);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, EntryPoint = "GetCPInfoExW")]
- private extern static unsafe Interop.BOOL GetCPInfoExW(uint CodePage, uint dwFlags, CPINFOEXW* lpCPInfoEx);
+ private static extern unsafe Interop.BOOL GetCPInfoExW(uint CodePage, uint dwFlags, CPINFOEXW* lpCPInfoEx);
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
private unsafe struct CPINFOEXW
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32)]
- internal extern static uint GetConsoleCP();
+ internal static extern uint GetConsoleCP();
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static bool GetConsoleMode(IntPtr handle, out int mode);
+ internal static extern bool GetConsoleMode(IntPtr handle, out int mode);
internal static bool IsGetConsoleModeCallSuccessful(IntPtr handle)
{
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32)]
- internal extern static uint GetConsoleOutputCP();
+ internal static extern uint GetConsoleOutputCP();
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32)]
- internal extern static uint GetCurrentProcessId();
+ internal static extern uint GetCurrentProcessId();
}
}
internal static partial class Kernel32
{
[DllImport(Interop.Libraries.Kernel32)]
- internal extern static IntPtr GetCurrentThread();
+ internal static extern IntPtr GetCurrentThread();
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static uint GetFileType(IntPtr hFile);
+ internal static extern uint GetFileType(IntPtr hFile);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32)]
- internal extern static void GetNativeSystemInfo(out SYSTEM_INFO lpSystemInfo);
+ internal static extern void GetNativeSystemInfo(out SYSTEM_INFO lpSystemInfo);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError=true, CharSet=CharSet.Auto)]
- unsafe internal static extern bool GetOverlappedResult(
+ internal static extern unsafe bool GetOverlappedResult(
SafeFileHandle hFile,
NativeOverlapped* lpOverlapped,
ref int lpNumberOfBytesTransferred,
bool bWait);
}
-}
\ No newline at end of file
+}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32)]
- internal extern static int GlobalMemoryStatusEx(out MEMORYSTATUSEX lpBuffer);
+ internal static extern int GlobalMemoryStatusEx(out MEMORYSTATUSEX lpBuffer);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static bool SetConsoleCP(int codePage);
+ internal static extern bool SetConsoleCP(int codePage);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static bool SetConsoleOutputCP(int codePage);
+ internal static extern bool SetConsoleOutputCP(int codePage);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static int SetConsoleTextAttribute(IntPtr hConsoleOutput, short wAttributes);
+ internal static extern int SetConsoleTextAttribute(IntPtr hConsoleOutput, short wAttributes);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError = true)]
- internal extern static bool UnmapViewOfFile(IntPtr lpBaseAddress);
+ internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, EntryPoint = "VirtualAlloc", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static IntPtr VirtualAlloc(SafeHandle lpAddress, UIntPtr dwSize, int flAllocationType, int flProtect);
+ internal static extern IntPtr VirtualAlloc(SafeHandle lpAddress, UIntPtr dwSize, int flAllocationType, int flProtect);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, EntryPoint = "VirtualQuery", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static UIntPtr VirtualQuery(SafeMemoryMappedViewHandle lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, UIntPtr dwLength);
+ internal static extern UIntPtr VirtualQuery(SafeMemoryMappedViewHandle lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, UIntPtr dwLength);
}
}
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, SetLastError=true, CharSet=CharSet.Auto)]
- unsafe internal static extern bool WaitCommEvent(
+ internal static extern unsafe bool WaitCommEvent(
SafeFileHandle hFile,
int* lpEvtMask,
NativeOverlapped* lpOverlapped);
}
-}
\ No newline at end of file
+}
internal partial class mincore
{
[DllImport(Libraries.CoreComm_L1_1_2, SetLastError = true)]
- unsafe private static extern int GetCommPorts(
+ private static extern unsafe int GetCommPorts(
uint* lpPortNumbers,
uint uPortNumbersCount,
out uint puPortNumbersFound);
- unsafe internal static int GetCommPorts(
+ internal static unsafe int GetCommPorts(
Span<uint> portNumbers,
out uint portNumbersFound)
{
internal partial class mincore
{
[DllImport(Libraries.Memory_L1_3, CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static IntPtr VirtualAllocFromApp(
+ internal static extern IntPtr VirtualAllocFromApp(
SafeHandle BaseAddress,
UIntPtr Size,
int AllocationType,
internal partial class Version
{
[DllImport(Libraries.Version, CharSet = CharSet.Unicode, EntryPoint = "GetFileVersionInfoExW")]
- internal extern static bool GetFileVersionInfoEx(
+ internal static extern bool GetFileVersionInfoEx(
uint dwFlags,
string lpwstrFilename,
uint dwHandle,
internal partial class Version
{
[DllImport(Libraries.Version, CharSet = CharSet.Unicode, EntryPoint = "GetFileVersionInfoSizeExW")]
- internal extern static uint GetFileVersionInfoSizeEx(uint dwFlags, string lpwstrFilename, out uint lpdwHandle);
+ internal static extern uint GetFileVersionInfoSizeEx(uint dwFlags, string lpwstrFilename, out uint lpdwHandle);
}
}
internal partial class Version
{
[DllImport(Libraries.Version, CharSet = CharSet.Unicode, EntryPoint = "VerQueryValueW")]
- internal extern static bool VerQueryValue(IntPtr pBlock, string lpSubBlock, out IntPtr lplpBuffer, out uint puLen);
+ internal static extern bool VerQueryValue(IntPtr pBlock, string lpSubBlock, out IntPtr lplpBuffer, out uint puLen);
}
}
{
internal sealed class NameValuePair
{
- readonly private string _name;
- readonly private string _value;
- readonly private int _length;
+ private readonly string _name;
+ private readonly string _value;
+ private readonly int _length;
private NameValuePair _next;
internal NameValuePair(string name, string value, int length)
}
}
- public async static Task CreateClientAndServerAsync(Func<Uri, Task> clientFunc, Func<Http2LoopbackServer, Task> serverFunc, int timeout = 60_000)
+ public static async Task CreateClientAndServerAsync(Func<Uri, Task> clientFunc, Func<Http2LoopbackServer, Task> serverFunc, int timeout = 60_000)
{
using (var server = Http2LoopbackServer.CreateServer())
{
/// Everything else cannot be represented as literals
/// <param name="ilGenerator"></param>
/// <param name="value"></param>
- /// <returns></returns>
public static void LoadValue(this ILGenerator ilGenerator, object value)
{
Debug.Assert(ilGenerator != null);
/// <param name="dictionary"></param>
/// <param name="key"></param>
/// <param name="value"></param>
- /// <returns></returns>
public static void AddItemToLocalDictionary(this ILGenerator ilGenerator, LocalBuilder dictionary, object key, object value)
{
Debug.Assert(ilGenerator != null);
/// <param name="dictionary"></param>
/// <param name="key"></param>
/// <param name="value"></param>
- /// <returns></returns>
public static void AddLocalToLocalDictionary(this ILGenerator ilGenerator, LocalBuilder dictionary, object key, LocalBuilder value)
{
Debug.Assert(ilGenerator != null);
/// <param name="ilGenerator"></param>
/// <param name="exception"></param>
/// <param name="dataStore"></param>
- /// <returns></returns>
public static void GetExceptionDataAndStoreInLocal(this ILGenerator ilGenerator, LocalBuilder exception, LocalBuilder dataStore)
{
Debug.Assert(ilGenerator != null);
/// </summary>
public abstract class ComposablePartDefinition
{
- static internal readonly IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> _EmptyExports = Enumerable.Empty<Tuple<ComposablePartDefinition, ExportDefinition>>();
+ internal static readonly IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> _EmptyExports = Enumerable.Empty<Tuple<ComposablePartDefinition, ExportDefinition>>();
+
/// <summary>
/// Initializes a new instance of the <see cref="ComposablePartDefinition"/> class.
/// </summary>
[Export]
public class Derived : Base
{
- new public string Prop { get; set; } = "Derived";
+ public new string Prop { get; set; } = "Derived";
}
public class Base
{
internal static class ConfigurationManagerInternalFactory
{
- static private volatile IConfigurationManagerInternal s_instance;
+ private static volatile IConfigurationManagerInternal s_instance;
- static internal IConfigurationManagerInternal Instance
+ internal static IConfigurationManagerInternal Instance
{
get
{
base.Add(provider);
}
- new public SettingsProvider this[string name]
+ public new SettingsProvider this[string name]
{
get
{
set { base["World"] = value; }
}
- new public bool IsModified
+ public new bool IsModified
{
get { return base.IsModified(); }
}
get { return (MyElement)this["test"]; }
}
- new public bool IsModified
+ public new bool IsModified
{
get { return base.IsModified(); }
}
get { return "System.Configuration.Internal.InternalConfigHost, " + s_assemblyName; }
}
- static internal IInternalConfigConfigurationFactory ConfigurationFactory
+ internal static IInternalConfigConfigurationFactory ConfigurationFactory
{
get
{
}
[DllImport("kernel32.dll")]
- public extern static uint GetConsoleCP();
+ public static extern uint GetConsoleCP();
[DllImport("kernel32.dll")]
- public extern static uint GetConsoleOutputCP();
+ public static extern uint GetConsoleOutputCP();
}
return TraceExceptionAsReturnValue(new NotSupportedException(message));
}
- static internal ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value)
+ internal static ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value)
{
return ArgumentOutOfRange(SR.Format(SR.DataSetLinq_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
}
- static internal ArgumentOutOfRangeException InvalidDataRowState(DataRowState value)
+ internal static ArgumentOutOfRangeException InvalidDataRowState(DataRowState value)
{
#if DEBUG
switch (value)
return InvalidEnumerationValue(typeof(DataRowState), (int)value);
}
- static internal ArgumentOutOfRangeException InvalidLoadOption(LoadOption value)
+ internal static ArgumentOutOfRangeException InvalidLoadOption(LoadOption value)
{
#if DEBUG
switch (value)
private static readonly Type s_accessViolationType = typeof(AccessViolationException);
private static readonly Type s_securityType = typeof(System.Security.SecurityException);
- static internal bool IsCatchableExceptionType(Exception e)
+ internal static bool IsCatchableExceptionType(Exception e)
{
// a 'catchable' exception is defined by what it is not.
Type type = e.GetType();
/// DataTable.LoadDataRow threw an exception, i.e. wrong # of columns in source row
/// Unrecoverable errors include:
/// exceptions from IEnumerator, DataTable.BeginLoadData or DataTable.EndLoadData</param>
- /// <returns>DataTable containing copies of the source DataRows.</returns>
/// <exception cref="ArgumentNullException">if source is null</exception>
/// <exception cref="ArgumentNullException">if table is null</exception>
/// <exception cref="InvalidOperationException">if source DataRow is in Deleted or Detached state</exception>
/// </summary>
/// <param name="root"></param>
/// <param name="type">non-special type to resolve</param>
- /// <returns>type.AssemblyQualifiedName or targeted to a different version</returns>
/// <exception cref="DataException">if multipleTargetConverter throws or returns an empty result</exception>
private void SetMSDataAttribute(XmlElement root, Type type)
{
}
// IDataParameter.SourceVersion
- static internal ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value)
+ internal static ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value)
{
#if DEBUG
switch (value)
private static readonly TypeMap s_date = new TypeMap(OdbcType.Date, DbType.Date, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_DATE, ODBC32.SQL_C.TYPE_DATE, ODBC32.SQL_C.TYPE_DATE, 6, 10, false);
private static readonly TypeMap s_time = new TypeMap(OdbcType.Time, DbType.Time, typeof(TimeSpan), ODBC32.SQL_TYPE.TYPE_TIME, ODBC32.SQL_C.TYPE_TIME, ODBC32.SQL_C.TYPE_TIME, 6, 12, false);
private static readonly TypeMap s_decimal = new TypeMap(OdbcType.Decimal, DbType.Decimal, typeof(decimal), ODBC32.SQL_TYPE.DECIMAL, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false);
- // static private readonly TypeMap _Currency = new TypeMap(OdbcType.Decimal, DbType.Currency, typeof(Decimal), ODBC32.SQL_TYPE.DECIMAL, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false);
+ // private static readonly TypeMap _Currency = new TypeMap(OdbcType.Decimal, DbType.Currency, typeof(Decimal), ODBC32.SQL_TYPE.DECIMAL, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false);
private static readonly TypeMap s_double = new TypeMap(OdbcType.Double, DbType.Double, typeof(double), ODBC32.SQL_TYPE.DOUBLE, ODBC32.SQL_C.DOUBLE, ODBC32.SQL_C.DOUBLE, 8, 15, false);
internal static readonly TypeMap _Image = new TypeMap(OdbcType.Image, DbType.Binary, typeof(byte[]), ODBC32.SQL_TYPE.LONGVARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false);
private static readonly TypeMap s_int = new TypeMap(OdbcType.Int, DbType.Int32, typeof(int), ODBC32.SQL_TYPE.INTEGER, ODBC32.SQL_C.SLONG, ODBC32.SQL_C.SLONG, 4, 10, true);
{
internal static class AdapterSwitches
{
- static private TraceSwitch _dataSchema;
+ private static TraceSwitch _dataSchema;
- static internal TraceSwitch DataSchema
+ internal static TraceSwitch DataSchema
{
get
{
return ((null != value) ? value : defaultValue);
}
- static private bool CompareInsensitiveInvariant(string strvalue, string strconst)
+ private static bool CompareInsensitiveInvariant(string strvalue, string strconst)
{
return (0 == StringComparer.OrdinalIgnoreCase.Compare(strvalue, strconst));
}
}
}
- static private string GetKeyName(StringBuilder buffer)
+ private static string GetKeyName(StringBuilder buffer)
{
int count = buffer.Length;
while ((0 < count) && char.IsWhiteSpace(buffer[count - 1]))
return buffer.ToString(0, count).ToLower(CultureInfo.InvariantCulture);
}
- static private string GetKeyValue(StringBuilder buffer, bool trimWhitespace)
+ private static string GetKeyValue(StringBuilder buffer, bool trimWhitespace)
{
int count = buffer.Length;
int index = 0;
NullTermination,
};
- static internal int GetKeyValuePair(string connectionString, int currentPosition, StringBuilder buffer, bool useOdbcRules, out string keyname, out string keyvalue)
+ internal static int GetKeyValuePair(string connectionString, int currentPosition, StringBuilder buffer, bool useOdbcRules, out string keyname, out string keyvalue)
{
int startposition = currentPosition;
return currentPosition;
}
- static private bool IsValueValidInternal(string keyvalue)
+ private static bool IsValueValidInternal(string keyvalue)
{
if (null != keyvalue)
{
return true;
}
- static private bool IsKeyNameValid(string keyname)
+ private static bool IsKeyNameValid(string keyname)
{
if (null != keyname)
{
}
}
- static internal DBPropSet CreateProperty(Guid propertySet, int propertyId, bool required, object value)
+ internal static DBPropSet CreateProperty(Guid propertySet, int propertyId, bool required, object value)
{
tagDBPROP dbprop = new tagDBPROP(propertyId, required, value);
DBPropSet propertyset = new DBPropSet(1);
}
[DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
- static internal extern IntPtr MapViewOfFile(IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, IntPtr dwNumberOfBytesToMap);
+ internal static extern IntPtr MapViewOfFile(IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, IntPtr dwNumberOfBytesToMap);
// OpenFileMappingA contains a security venerability, in the unicode->ansi conversion
// Its possible to spoof the directory and construct ../ sequeences, See FxCop Warrning
// Specify marshaling for pinvoke string arguments
[DllImport(Interop.Libraries.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)]
// [DllImport(Interop.Libraries.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Ansi)]
- static internal extern IntPtr OpenFileMappingA(int dwDesiredAccess, bool bInheritHandle, [MarshalAs(UnmanagedType.LPStr)] string lpName);
+ internal static extern IntPtr OpenFileMappingA(int dwDesiredAccess, bool bInheritHandle, [MarshalAs(UnmanagedType.LPStr)] string lpName);
// CreateFileMappingA contains a security venerability, in the unicode->ansi conversion
// Its possible to spoof the directory and construct ../ sequeences, See FxCop Warrning
// Specify marshaling for pinvoke string arguments
[DllImport(Interop.Libraries.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)]
// [DllImport(Interop.Libraries.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Ansi)]
- static internal extern IntPtr CreateFileMappingA(IntPtr hFile, IntPtr pAttr, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, [MarshalAs(UnmanagedType.LPStr)] string lpName);
+ internal static extern IntPtr CreateFileMappingA(IntPtr hFile, IntPtr pAttr, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, [MarshalAs(UnmanagedType.LPStr)] string lpName);
[DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
- static internal extern bool UnmapViewOfFile(IntPtr lpBaseAddress);
+ internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress);
[DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool CloseHandle(IntPtr handle);
+ internal static extern bool CloseHandle(IntPtr handle);
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool AllocateAndInitializeSid(
+ internal static extern bool AllocateAndInitializeSid(
IntPtr pIdentifierAuthority, // authority
byte nSubAuthorityCount, // count of subauthorities
int dwSubAuthority0, // subauthority 0
ref IntPtr pSid); // SID
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern int GetLengthSid(
+ internal static extern int GetLengthSid(
IntPtr pSid); // SID to query
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool InitializeAcl(
+ internal static extern bool InitializeAcl(
IntPtr pAcl, // ACL
int nAclLength, // size of ACL
int dwAclRevision); // revision level of ACL
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool AddAccessDeniedAce(
+ internal static extern bool AddAccessDeniedAce(
IntPtr pAcl, // access control list
int dwAceRevision, // ACL revision level
int AccessMask, // access mask
IntPtr pSid); // security identifier
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool AddAccessAllowedAce(
+ internal static extern bool AddAccessAllowedAce(
IntPtr pAcl, // access control list
int dwAceRevision, // ACL revision level
uint AccessMask, // access mask
IntPtr pSid); // security identifier
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool InitializeSecurityDescriptor(
+ internal static extern bool InitializeSecurityDescriptor(
IntPtr pSecurityDescriptor, // SD
int dwRevision); // revision level
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern bool SetSecurityDescriptorDacl(
+ internal static extern bool SetSecurityDescriptorDacl(
IntPtr pSecurityDescriptor, // SD
bool bDaclPresent, // DACL presence
IntPtr pDacl, // DACL
bool bDaclDefaulted); // default DACL
[DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)]
- static internal extern IntPtr FreeSid(
+ internal static extern IntPtr FreeSid(
IntPtr pSid); // SID to free
}
}
}
[DefaultValue(null)]
- new public OleDbConnection Connection
+ public new OleDbConnection Connection
{
get
{
[
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
- new public OleDbParameterCollection Parameters
+ public new OleDbParameterCollection Parameters
{
get
{
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
- new public OleDbTransaction Transaction
+ public new OleDbTransaction Transaction
{
get
{
}
}
- new public OleDbParameter CreateParameter()
+ public new OleDbParameter CreateParameter()
{
return new OleDbParameter();
}
base.Dispose(disposing); // notify base classes
}
- new public OleDbDataReader ExecuteReader()
+ public new OleDbDataReader ExecuteReader()
{
return ExecuteReader(CommandBehavior.Default);
}
return ExecuteReader(CommandBehavior.Default);
}
- new public OleDbDataReader ExecuteReader(CommandBehavior behavior)
+ public new OleDbDataReader ExecuteReader(CommandBehavior behavior)
{
_executeQuery = true;
return ExecuteReaderInternal(behavior, ADP.ExecuteReader);
}
[DefaultValue(null)]
- new public OleDbDataAdapter DataAdapter
+ public new OleDbDataAdapter DataAdapter
{
get
{
RowUpdatingHandler(ruevent);
}
- new public OleDbCommand GetInsertCommand()
+ public new OleDbCommand GetInsertCommand()
{
return (OleDbCommand)base.GetInsertCommand();
}
- new public OleDbCommand GetInsertCommand(bool useColumnsForParameterNames)
+ public new OleDbCommand GetInsertCommand(bool useColumnsForParameterNames)
{
return (OleDbCommand)base.GetInsertCommand(useColumnsForParameterNames);
}
- new public OleDbCommand GetUpdateCommand()
+ public new OleDbCommand GetUpdateCommand()
{
return (OleDbCommand)base.GetUpdateCommand();
}
- new public OleDbCommand GetUpdateCommand(bool useColumnsForParameterNames)
+ public new OleDbCommand GetUpdateCommand(bool useColumnsForParameterNames)
{
return (OleDbCommand)base.GetUpdateCommand(useColumnsForParameterNames);
}
- new public OleDbCommand GetDeleteCommand()
+ public new OleDbCommand GetDeleteCommand()
{
return (OleDbCommand)base.GetDeleteCommand();
}
- new public OleDbCommand GetDeleteCommand(bool useColumnsForParameterNames)
+ public new OleDbCommand GetDeleteCommand(bool useColumnsForParameterNames)
{
return (OleDbCommand)base.GetDeleteCommand(useColumnsForParameterNames);
}
}
}
- static public void DeriveParameters(OleDbCommand command)
+ public static void DeriveParameters(OleDbCommand command)
{
if (null == command)
{
// known difference: when getting the parameters for a sproc, the
// return value gets marked as a return value but for a sql stmt
// the return value gets marked as an output parameter.
- static private OleDbParameter[] DeriveParametersFromStoredProcedure(OleDbConnection connection, OleDbCommand command)
+ private static OleDbParameter[] DeriveParametersFromStoredProcedure(OleDbConnection connection, OleDbCommand command)
{
OleDbParameter[] plist = Array.Empty<OleDbParameter>();
return plist;
}
- static private ParameterDirection ConvertToParameterDirection(int value)
+ private static ParameterDirection ConvertToParameterDirection(int value)
{
switch (value)
{
[DefaultEvent("InfoMessage")]
public sealed partial class OleDbConnection : DbConnection, ICloneable, IDbConnection
{
- static private readonly object EventInfoMessage = new object();
+ private static readonly object EventInfoMessage = new object();
public OleDbConnection(string connectionString) : this()
{
internal bool ForceNewConnection { get { return false; } set {; } }
- new public OleDbTransaction BeginTransaction()
+ public new OleDbTransaction BeginTransaction()
{
return BeginTransaction(IsolationLevel.Unspecified);
}
- new public OleDbTransaction BeginTransaction(IsolationLevel isolationLevel)
+ public new OleDbTransaction BeginTransaction(IsolationLevel isolationLevel)
{
return (OleDbTransaction)InnerConnection.BeginTransaction(isolationLevel);
}
// does not require GC.KeepAlive(this) because of OnStateChange
}
- new public OleDbCommand CreateCommand()
+ public new OleDbCommand CreateCommand()
{
return new OleDbCommand("", this);
}
return GetOpenConnection().ValidateTransaction(transaction, method);
}
- static internal Exception ProcessResults(OleDbHResult hresult, OleDbConnection connection, object src)
+ internal static Exception ProcessResults(OleDbHResult hresult, OleDbConnection connection, object src)
{
if ((0 <= (int)hresult) && ((null == connection) || (null == connection.Events[EventInfoMessage])))
{
}
// @devnote: should be multithread safe
- static public void ReleaseObjectPool()
+ public static void ReleaseObjectPool()
{
OleDbConnectionString.ReleaseObjectPool();
OleDbConnectionInternal.ReleaseObjectPool();
OleDbConnectionFactory.SingletonInstance.ClearAllPools();
}
- static private void ResetState(OleDbConnection connection)
+ private static void ResetState(OleDbConnection connection)
{
if (null != connection)
{
internal sealed class OleDbConnectionInternal : DbConnectionInternal, IDisposable
{
- static private volatile OleDbServicesWrapper idataInitialize;
- static private object dataInitializeLock = new object();
+ private static volatile OleDbServicesWrapper idataInitialize;
+ private static object dataInitializeLock = new object();
internal readonly OleDbConnectionString ConnectionString; // parsed connection string attributes
return false;
}
- static private object CreateInstanceDataLinks()
+ private static object CreateInstanceDataLinks()
{
Type datalink = Type.GetTypeFromCLSID(ODB.CLSID_DataLinks, true);
return Activator.CreateInstance(datalink, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
// @devnote: should be multithread safe access to OleDbConnection.idataInitialize,
// though last one wins for setting variable. It may be different objects, but
// OLE DB will ensure I'll work with just the single pool
- static private OleDbServicesWrapper GetObjectPool()
+ private static OleDbServicesWrapper GetObjectPool()
{
OleDbServicesWrapper wrapper = OleDbConnectionInternal.idataInitialize;
if (null == wrapper)
return wrapper;
}
- static private void VersionCheck()
+ private static void VersionCheck()
{
// $REVIEW: do we still need this?
// if ApartmentUnknown, then CoInitialize may not have been called yet
}
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
- static private void SetMTAApartmentState()
+ private static void SetMTAApartmentState()
{
// we are defaulting to a multithread apartment state
Thread.CurrentThread.SetApartmentState(ApartmentState.MTA);
}
// @devnote: should be multithread safe
- static public void ReleaseObjectPool()
+ public static void ReleaseObjectPool()
{
OleDbConnectionInternal.idataInitialize = null;
}
internal const string Location = "SOFTWARE\\Microsoft\\DataAccess\\Udl Pooling";
internal const string Pooling = "Cache Size";
- static internal volatile bool _PoolSizeInit;
- static internal int _PoolSize;
+ internal static volatile bool _PoolSizeInit;
+ internal static int _PoolSize;
- static internal volatile Dictionary<string, string> _Pool;
- static internal object _PoolLock = new object();
+ internal static volatile Dictionary<string, string> _Pool;
+ internal static object _PoolLock = new object();
}
private static class VALUES
return supportMultipleResults;
}
- static private int UdlPoolSize
+ private static int UdlPoolSize
{
// SxS: UdpPoolSize reads registry value to get the pool size
get
}
}
- static private string LoadStringFromStorage(string udlfilename)
+ private static string LoadStringFromStorage(string udlfilename)
{
string udlConnectionString = null;
Dictionary<string, string> udlcache = UDL._Pool;
return udlConnectionString;
}
- static private string LoadStringFromFileStorage(string udlfilename)
+ private static string LoadStringFromFileStorage(string udlfilename)
{
// Microsoft Data Link File Format
// The first two lines of a .udl file must have exactly the following contents in order to work properly:
return (("msdasql" == progid) || progid.StartsWith("msdasql.", StringComparison.Ordinal) || ("microsoft ole db provider for odbc drivers" == progid));
}
- static private void ValidateProvider(string progid)
+ private static void ValidateProvider(string progid)
{
if (ADP.IsEmpty(progid))
{
}
}
- static internal void ReleaseObjectPool()
+ internal static void ReleaseObjectPool()
{
UDL._PoolSizeInit = false;
UDL._Pool = null;
{
public sealed class OleDbDataAdapter : DbDataAdapter, IDbDataAdapter, ICloneable
{
- static private readonly object EventRowUpdated = new object();
- static private readonly object EventRowUpdating = new object();
+ private static readonly object EventRowUpdated = new object();
+ private static readonly object EventRowUpdating = new object();
private OleDbCommand _deleteCommand, _insertCommand, _selectCommand, _updateCommand;
[
DefaultValue(null),
]
- new public OleDbCommand DeleteCommand
+ public new OleDbCommand DeleteCommand
{
get { return _deleteCommand; }
set { _deleteCommand = value; }
[
DefaultValue(null)
]
- new public OleDbCommand InsertCommand
+ public new OleDbCommand InsertCommand
{
get { return _insertCommand; }
set { _insertCommand = value; }
[
DefaultValue(null)
]
- new public OleDbCommand SelectCommand
+ public new OleDbCommand SelectCommand
{
get { return _selectCommand; }
set { _selectCommand = value; }
[
DefaultValue(null)
]
- new public OleDbCommand UpdateCommand
+ public new OleDbCommand UpdateCommand
{
get { return _updateCommand; }
set { _updateCommand = value; }
base.OnRowUpdating(value);
}
- static private string GetSourceTableName(string srcTable, int index)
+ private static string GetSourceTableName(string srcTable, int index)
{
//if ((null != srcTable) && (0 <= index) && (index < srcTable.Length)) {
if (0 == index)
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
- new public OleDbDataReader GetData(int ordinal)
+ public new OleDbDataReader GetData(int ordinal)
{
ColumnBinding binding = GetColumnBinding(ordinal);
return binding.ValueChapter();
{ throw e; }
}
- static private IntPtr AddRecordsAffected(IntPtr recordsAffected, IntPtr affected)
+ private static IntPtr AddRecordsAffected(IntPtr recordsAffected, IntPtr affected)
{
#if WIN32
if (0 <= (int)affected) {
_isRead = false;
}
- static internal OleDbException NextResults(UnsafeNativeMethods.IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command, out IntPtr recordsAffected)
+ internal static OleDbException NextResults(UnsafeNativeMethods.IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command, out IntPtr recordsAffected)
{
recordsAffected = ADP.RecordsUnaffected;
List<OleDbException> exceptions = null;
return null;
}
- static private void NextResultsInfinite()
+ private static void NextResultsInfinite()
{
// edtriou's suggestion is that we debug assert so that users will learn of MSOLAP's misbehavior and not call ExecuteNonQuery
Debug.Assert(false, "<oledb.OleDbDataReader.NextResultsInfinite|INFO> System.Data.OleDb.OleDbDataReader: 2000 IMultipleResult.GetResult(NULL, DBRESULTFLAG_DEFAULT, IID_NULL, NULL, NULL) iterations with 0 records affected. Stopping suspect infinite loop. To work-around try using ExecuteReader() and iterating through results with NextResult().\n");
_metadata = metainfo.ToArray();
}
- static internal void GenerateSchemaTable(OleDbDataReader dataReader, object handle, CommandBehavior behavior)
+ internal static void GenerateSchemaTable(OleDbDataReader dataReader, object handle, CommandBehavior behavior)
{
if (0 != (CommandBehavior.KeyInfo & behavior))
{
}
}
- static private bool DoColumnDropFilter(int flags)
+ private static bool DoColumnDropFilter(int flags)
{
return (0 != (ODB.DBCOLUMNFLAGS_ISBOOKMARK & flags));
}
- static private bool IsLong(int flags)
+ private static bool IsLong(int flags)
{
return (0 != (ODB.DBCOLUMNFLAGS_ISLONG & flags));
}
- static private bool IsFixed(int flags)
+ private static bool IsFixed(int flags)
{
return (0 != (ODB.DBCOLUMNFLAGS_ISFIXEDLENGTH & flags));
}
- static private bool IsRowVersion(int flags)
+ private static bool IsRowVersion(int flags)
{
return (0 != (ODB.DBCOLUMNFLAGS_ISROWID_DBCOLUMNFLAGS_ISROWVER & flags));
}
- static private bool AllowDBNull(int flags)
+ private static bool AllowDBNull(int flags)
{
return (0 != (ODB.DBCOLUMNFLAGS_ISNULLABLE & flags));
}
- static private bool AllowDBNullMaybeNull(int flags)
+ private static bool AllowDBNullMaybeNull(int flags)
{
return (0 != (ODB.DBCOLUMNFLAGS_ISNULLABLE_DBCOLUMNFLAGS_MAYBENULL & flags));
}
- static private bool IsReadOnly(int flags)
+ private static bool IsReadOnly(int flags)
{
return (0 == (ODB.DBCOLUMNFLAGS_WRITE_DBCOLUMNFLAGS_WRITEUNKNOWN & flags));
}
return dataTable;
}
- static public OleDbDataReader GetEnumerator(Type type)
+ public static OleDbDataReader GetEnumerator(Type type)
{
return GetEnumeratorFromType(type);
}
- static internal OleDbDataReader GetEnumeratorFromType(Type type)
+ internal static OleDbDataReader GetEnumeratorFromType(Type type)
{
object value = Activator.CreateInstance(type, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
return GetEnumeratorReader(value);
}
- static private OleDbDataReader GetEnumeratorReader(object value)
+ private static OleDbDataReader GetEnumeratorReader(object value)
{
NativeMethods.ISourcesRowset srcrowset = null;
return dataReader;
}
- static public OleDbDataReader GetRootEnumerator()
+ public static OleDbDataReader GetRootEnumerator()
{
//readonly Guid CLSID_MSDAENUM = new Guid(0xc8b522d0,0x5cf3,0x11ce,0xad,0xe5,0x00,0xaa,0x00,0x44,0x77,0x3d);
//Type msdaenum = Type.GetTypeFromCLSID(CLSID_MSDAENUM, true);
{
public sealed class OleDbError
{
- readonly private string message;
- readonly private string source;
- readonly private string sqlState;
- readonly private int nativeError;
+ private readonly string message;
+ private readonly string source;
+ private readonly string sqlState;
+ private readonly int nativeError;
internal OleDbError(UnsafeNativeMethods.IErrorRecords errorRecords, int index)
{
[Serializable, ListBindable(false)]
public sealed class OleDbErrorCollection : System.Collections.ICollection
{
- readonly private ArrayList items;
+ private readonly ArrayList items;
internal OleDbErrorCollection(UnsafeNativeMethods.IErrorInfo errorInfo)
{
}
}
- static internal OleDbException CreateException(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult errorCode, Exception inner)
+ internal static OleDbException CreateException(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult errorCode, Exception inner)
{
OleDbErrorCollection errors = new OleDbErrorCollection(errorInfo);
string message = null;
return new OleDbException(message, inner, source, errorCode, errors);
}
- static internal OleDbException CombineExceptions(List<OleDbException> exceptions)
+ internal static OleDbException CombineExceptions(List<OleDbException> exceptions)
{
Debug.Assert(0 < exceptions.Count, "missing exceptions");
if (1 < exceptions.Count)
{
public sealed class OleDbInfoMessageEventArgs : System.EventArgs
{
- readonly private OleDbException exception;
+ private readonly OleDbException exception;
internal OleDbInfoMessageEventArgs(OleDbException exception)
{
return ValueSizeCore(value);
}
- static private int GetBindDirection(ParameterDirection direction)
+ private static int GetBindDirection(ParameterDirection direction)
{
return (ODB.ParameterDirectionFlag & (int)direction);
/*switch(Direction) {
}*/
}
- static private int GetBindFlags(ParameterDirection direction)
+ private static int GetBindFlags(ParameterDirection direction)
{
return (ODB.ParameterDirectionFlag & (int)direction);
/*switch(Direction) {
{
}
- static internal readonly Guid Column = new Guid(0xc8b522b9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid DataSource = new Guid(0xc8b522ba, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid DataSourceInfo = new Guid(0xc8b522bb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid DBInit = new Guid(0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid Index = new Guid(0xc8b522bd, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid PropertiesInError = new Guid(0xc8b522d4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid Rowset = new Guid(0xc8b522be, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid Session = new Guid(0xc8b522c6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid Stream = new Guid(0xc8b522fd, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid Table = new Guid(0xc8b522bf, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid Trustee = new Guid(0xc8b522e1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid View = new Guid(0xc8b522df, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Column = new Guid(0xc8b522b9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid DataSource = new Guid(0xc8b522ba, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid DataSourceInfo = new Guid(0xc8b522bb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid DBInit = new Guid(0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Index = new Guid(0xc8b522bd, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid PropertiesInError = new Guid(0xc8b522d4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Rowset = new Guid(0xc8b522be, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Session = new Guid(0xc8b522c6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Stream = new Guid(0xc8b522fd, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Table = new Guid(0xc8b522bf, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid Trustee = new Guid(0xc8b522e1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid View = new Guid(0xc8b522df, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid DataSourceAll = new Guid(0xc8b522c0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid DataSourceInfoAll = new Guid(0xc8b522c1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid DBInitAll = new Guid(0xc8b522ca, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid ColumnAll = new Guid(0xc8b522f0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid ConstraintAll = new Guid(0xc8b522fa, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid IndexAll = new Guid(0xc8b522f1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid RowsetAll = new Guid(0xc8b522c2, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid SessionAll = new Guid(0xc8b522c7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid StreamAll = new Guid(0xc8b522fe, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid TableAll = new Guid(0xc8b522f2, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid TrusteeAll = new Guid(0xc8b522f3, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal readonly Guid ViewAll = new Guid(0xc8b522fc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid DataSourceAll = new Guid(0xc8b522c0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid DataSourceInfoAll = new Guid(0xc8b522c1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid DBInitAll = new Guid(0xc8b522ca, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid ColumnAll = new Guid(0xc8b522f0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid ConstraintAll = new Guid(0xc8b522fa, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid IndexAll = new Guid(0xc8b522f1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid RowsetAll = new Guid(0xc8b522c2, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid SessionAll = new Guid(0xc8b522c7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid StreamAll = new Guid(0xc8b522fe, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid TableAll = new Guid(0xc8b522f2, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid TrusteeAll = new Guid(0xc8b522f3, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static readonly Guid ViewAll = new Guid(0xc8b522fc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
/*
- static internal string GetTextFromValue(Guid guid) {
+ internal static string GetTextFromValue(Guid guid) {
string value = ConvertToString(guid);
if (null == value) {
value = "{" + guid.ToString("D", CultureInfo.InvariantCulture) + "}";
return value;
}
- static internal string ConvertToString(Guid guid) {
+ internal static string ConvertToString(Guid guid) {
if (guid == OleDbPropertySetGuid.DBInit) { return "DBInit"; }
if (guid == OleDbPropertySetGuid.Rowset) { return "Rowset"; }
if (guid == OleDbPropertySetGuid.DataSource) { return "DataSource"; }
{
}
- new public OleDbCommand Command
+ public new OleDbCommand Command
{
get
{
{
}
- new public OleDbCommand Command
+ public new OleDbCommand Command
{
get { return (base.Command as OleDbCommand); }
set { base.Command = value; }
// MDAC 2.0
- static public readonly Guid Tables_Info = new Guid(0xc8b522e0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Tables_Info = new Guid(0xc8b522e0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
// MDAC 2.1
- static public readonly Guid Trustee = new Guid(0xc8b522ef, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Trustee = new Guid(0xc8b522ef, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Assertions = new Guid(0xc8b52210, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Assertions = new Guid(0xc8b52210, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Catalogs = new Guid(0xc8b52211, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Catalogs = new Guid(0xc8b52211, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Character_Sets = new Guid(0xc8b52212, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Character_Sets = new Guid(0xc8b52212, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Collations = new Guid(0xc8b52213, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Collations = new Guid(0xc8b52213, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Columns = new Guid(0xc8b52214, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Columns = new Guid(0xc8b52214, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Check_Constraints = new Guid(0xc8b52215, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Check_Constraints = new Guid(0xc8b52215, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Constraint_Column_Usage = new Guid(0xc8b52216, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Constraint_Column_Usage = new Guid(0xc8b52216, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Constraint_Table_Usage = new Guid(0xc8b52217, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Constraint_Table_Usage = new Guid(0xc8b52217, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Key_Column_Usage = new Guid(0xc8b52218, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Key_Column_Usage = new Guid(0xc8b52218, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Referential_Constraints = new Guid(0xc8b52219, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Referential_Constraints = new Guid(0xc8b52219, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Table_Constraints = new Guid(0xc8b5221a, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Table_Constraints = new Guid(0xc8b5221a, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Column_Domain_Usage = new Guid(0xc8b5221b, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Column_Domain_Usage = new Guid(0xc8b5221b, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Indexes = new Guid(0xc8b5221e, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Indexes = new Guid(0xc8b5221e, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Column_Privileges = new Guid(0xc8b52221, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Column_Privileges = new Guid(0xc8b52221, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Table_Privileges = new Guid(0xc8b52222, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Table_Privileges = new Guid(0xc8b52222, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Usage_Privileges = new Guid(0xc8b52223, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Usage_Privileges = new Guid(0xc8b52223, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Procedures = new Guid(0xc8b52224, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Procedures = new Guid(0xc8b52224, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Schemata = new Guid(0xc8b52225, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Schemata = new Guid(0xc8b52225, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Sql_Languages = new Guid(0xc8b52226, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Sql_Languages = new Guid(0xc8b52226, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Statistics = new Guid(0xc8b52227, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Statistics = new Guid(0xc8b52227, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Tables = new Guid(0xc8b52229, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Tables = new Guid(0xc8b52229, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Translations = new Guid(0xc8b5222a, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Translations = new Guid(0xc8b5222a, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Provider_Types = new Guid(0xc8b5222c, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Provider_Types = new Guid(0xc8b5222c, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Views = new Guid(0xc8b5222d, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Views = new Guid(0xc8b5222d, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid View_Column_Usage = new Guid(0xc8b5222e, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid View_Column_Usage = new Guid(0xc8b5222e, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid View_Table_Usage = new Guid(0xc8b5222f, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid View_Table_Usage = new Guid(0xc8b5222f, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Procedure_Parameters = new Guid(0xc8b522b8, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Procedure_Parameters = new Guid(0xc8b522b8, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Foreign_Keys = new Guid(0xc8b522c4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Foreign_Keys = new Guid(0xc8b522c4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Primary_Keys = new Guid(0xc8b522c5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Primary_Keys = new Guid(0xc8b522c5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Procedure_Columns = new Guid(0xc8b522c9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Procedure_Columns = new Guid(0xc8b522c9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
// MDAC 2.6
- static public readonly Guid Table_Statistics = new Guid(0xc8b522ff, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Table_Statistics = new Guid(0xc8b522ff, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid Check_Constraints_By_Table = new Guid(0xc8b52301, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ public static readonly Guid Check_Constraints_By_Table = new Guid(0xc8b52301, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static public readonly Guid SchemaGuids = new Guid(0xf3264c9b, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd);
+ public static readonly Guid SchemaGuids = new Guid(0xf3264c9b, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd);
- static public readonly Guid DbInfoKeywords = new Guid(0xf3264c9c, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd);
+ public static readonly Guid DbInfoKeywords = new Guid(0xf3264c9c, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd);
- static public readonly Guid DbInfoLiterals = new Guid(0xf3264c9d, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd);
+ public static readonly Guid DbInfoLiterals = new Guid(0xf3264c9d, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd);
- static internal string GetTextFromValue(Guid guid)
+ internal static string GetTextFromValue(Guid guid)
{
// it is correct that SchemaGuids, DbInfoKeywords, DbInfoLiterals don't appear below
// those are manufactured guids for calling methods other than IDBSchemaRowset.GetRowset
_isolationLevel = isolevel;
}
- new public OleDbConnection Connection
+ public new OleDbConnection Connection
{
get
{
return hr;
}
- static internal OleDbTransaction TransactionLast(OleDbTransaction head)
+ internal static OleDbTransaction TransactionLast(OleDbTransaction head)
{
if (null != head._nestedTransaction)
{
return head;
}
- static internal OleDbTransaction TransactionUpdate(OleDbTransaction transaction)
+ internal static OleDbTransaction TransactionUpdate(OleDbTransaction transaction)
{
if ((null != transaction) && (null == transaction._transaction))
{
private const string S_WLONGVARCHAR = "DBTYPE_WLONGVARCHAR"; // DBTYPE_WSTR
private const string S_XML = "DBTYPE_XML";
- static private readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false, OleDbType.Binary, NativeDBType.BYTES, S_BINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 0
- static private readonly NativeDBType D_Boolean = new NativeDBType(0xff, 2, true, false, OleDbType.Boolean, NativeDBType.BOOL, S_BOOL, typeof(bool), NativeDBType.BOOL, DbType.Boolean); // 1 - integer2 (variant_bool)
- static private readonly NativeDBType D_BSTR = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.BSTR, NativeDBType.BSTR, S_BSTR, typeof(string), NativeDBType.BSTR, DbType.String); // 2 - integer4 (pointer)
- static private readonly NativeDBType D_Char = new NativeDBType(0xff, -1, true, false, OleDbType.Char, NativeDBType.STR, S_CHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiStringFixedLength); // 3 - (ansi pointer)
- static private readonly NativeDBType D_Currency = new NativeDBType(19, 8, true, false, OleDbType.Currency, NativeDBType.CY, S_CY, typeof(decimal), NativeDBType.CY, DbType.Currency); // 4 - integer8
- static private readonly NativeDBType D_Date = new NativeDBType(0xff, 8, true, false, OleDbType.Date, NativeDBType.DATE, S_DATE, typeof(System.DateTime), NativeDBType.DATE, DbType.DateTime); // 5 - double
- static private readonly NativeDBType D_DBDate = new NativeDBType(0xff, 6, true, false, OleDbType.DBDate, NativeDBType.DBDATE, S_DBDATE, typeof(System.DateTime), NativeDBType.DBDATE, DbType.Date); // 6 - (tagDBDate)
- static private readonly NativeDBType D_DBTime = new NativeDBType(0xff, 6, true, false, OleDbType.DBTime, NativeDBType.DBTIME, S_DBTIME, typeof(System.TimeSpan), NativeDBType.DBTIME, DbType.Time); // 7 - (tagDBTime)
- static private readonly NativeDBType D_DBTimeStamp = new NativeDBType(0xff, 16, true, false, OleDbType.DBTimeStamp, NativeDBType.DBTIMESTAMP, S_DBTIMESTAMP, typeof(System.DateTime), NativeDBType.DBTIMESTAMP, DbType.DateTime); // 8 - (tagDBTIMESTAMP)
- static private readonly NativeDBType D_Decimal = new NativeDBType(28, 16, true, false, OleDbType.Decimal, NativeDBType.DECIMAL, S_DECIMAL, typeof(decimal), NativeDBType.DECIMAL, DbType.Decimal); // 9 - (tagDec)
- static private readonly NativeDBType D_Error = new NativeDBType(0xff, 4, true, false, OleDbType.Error, NativeDBType.ERROR, S_ERROR, typeof(int), NativeDBType.ERROR, DbType.Int32); // 10 - integer4
- static private readonly NativeDBType D_Filetime = new NativeDBType(0xff, 8, true, false, OleDbType.Filetime, NativeDBType.FILETIME, S_FILETIME, typeof(System.DateTime), NativeDBType.FILETIME, DbType.DateTime); // 11 - integer8
- static private readonly NativeDBType D_Guid = new NativeDBType(0xff, 16, true, false, OleDbType.Guid, NativeDBType.GUID, S_GUID, typeof(System.Guid), NativeDBType.GUID, DbType.Guid); // 12 - ubyte[16]
- static private readonly NativeDBType D_TinyInt = new NativeDBType(3, 1, true, false, OleDbType.TinyInt, NativeDBType.I1, S_I1, typeof(short), NativeDBType.I1, DbType.SByte); // 13 - integer1
- static private readonly NativeDBType D_SmallInt = new NativeDBType(5, 2, true, false, OleDbType.SmallInt, NativeDBType.I2, S_I2, typeof(short), NativeDBType.I2, DbType.Int16); // 14 - integer2
- static private readonly NativeDBType D_Integer = new NativeDBType(10, 4, true, false, OleDbType.Integer, NativeDBType.I4, S_I4, typeof(int), NativeDBType.I4, DbType.Int32); // 15 - integer4
- static private readonly NativeDBType D_BigInt = new NativeDBType(19, 8, true, false, OleDbType.BigInt, NativeDBType.I8, S_I8, typeof(long), NativeDBType.I8, DbType.Int64); // 16 - integer8
- static private readonly NativeDBType D_IDispatch = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IDispatch, NativeDBType.IDISPATCH, S_IDISPATCH, typeof(object), NativeDBType.IDISPATCH, DbType.Object); // 17 - integer4 (pointer)
- static private readonly NativeDBType D_IUnknown = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IUnknown, NativeDBType.IUNKNOWN, S_IUNKNOWN, typeof(object), NativeDBType.IUNKNOWN, DbType.Object); // 18 - integer4 (pointer)
- static private readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 19
- static private readonly NativeDBType D_LongVarChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarChar, NativeDBType.STR, S_LONGVARCHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 20 - (ansi pointer)
- static private readonly NativeDBType D_Numeric = new NativeDBType(28, 19, true, false, OleDbType.Numeric, NativeDBType.NUMERIC, S_NUMERIC, typeof(decimal), NativeDBType.NUMERIC, DbType.Decimal); // 21 - (tagDB_Numeric)
- static unsafe private readonly NativeDBType D_PropVariant = new NativeDBType(0xff, sizeof(PROPVARIANT),
+ private static readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false, OleDbType.Binary, NativeDBType.BYTES, S_BINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 0
+ private static readonly NativeDBType D_Boolean = new NativeDBType(0xff, 2, true, false, OleDbType.Boolean, NativeDBType.BOOL, S_BOOL, typeof(bool), NativeDBType.BOOL, DbType.Boolean); // 1 - integer2 (variant_bool)
+ private static readonly NativeDBType D_BSTR = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.BSTR, NativeDBType.BSTR, S_BSTR, typeof(string), NativeDBType.BSTR, DbType.String); // 2 - integer4 (pointer)
+ private static readonly NativeDBType D_Char = new NativeDBType(0xff, -1, true, false, OleDbType.Char, NativeDBType.STR, S_CHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiStringFixedLength); // 3 - (ansi pointer)
+ private static readonly NativeDBType D_Currency = new NativeDBType(19, 8, true, false, OleDbType.Currency, NativeDBType.CY, S_CY, typeof(decimal), NativeDBType.CY, DbType.Currency); // 4 - integer8
+ private static readonly NativeDBType D_Date = new NativeDBType(0xff, 8, true, false, OleDbType.Date, NativeDBType.DATE, S_DATE, typeof(System.DateTime), NativeDBType.DATE, DbType.DateTime); // 5 - double
+ private static readonly NativeDBType D_DBDate = new NativeDBType(0xff, 6, true, false, OleDbType.DBDate, NativeDBType.DBDATE, S_DBDATE, typeof(System.DateTime), NativeDBType.DBDATE, DbType.Date); // 6 - (tagDBDate)
+ private static readonly NativeDBType D_DBTime = new NativeDBType(0xff, 6, true, false, OleDbType.DBTime, NativeDBType.DBTIME, S_DBTIME, typeof(System.TimeSpan), NativeDBType.DBTIME, DbType.Time); // 7 - (tagDBTime)
+ private static readonly NativeDBType D_DBTimeStamp = new NativeDBType(0xff, 16, true, false, OleDbType.DBTimeStamp, NativeDBType.DBTIMESTAMP, S_DBTIMESTAMP, typeof(System.DateTime), NativeDBType.DBTIMESTAMP, DbType.DateTime); // 8 - (tagDBTIMESTAMP)
+ private static readonly NativeDBType D_Decimal = new NativeDBType(28, 16, true, false, OleDbType.Decimal, NativeDBType.DECIMAL, S_DECIMAL, typeof(decimal), NativeDBType.DECIMAL, DbType.Decimal); // 9 - (tagDec)
+ private static readonly NativeDBType D_Error = new NativeDBType(0xff, 4, true, false, OleDbType.Error, NativeDBType.ERROR, S_ERROR, typeof(int), NativeDBType.ERROR, DbType.Int32); // 10 - integer4
+ private static readonly NativeDBType D_Filetime = new NativeDBType(0xff, 8, true, false, OleDbType.Filetime, NativeDBType.FILETIME, S_FILETIME, typeof(System.DateTime), NativeDBType.FILETIME, DbType.DateTime); // 11 - integer8
+ private static readonly NativeDBType D_Guid = new NativeDBType(0xff, 16, true, false, OleDbType.Guid, NativeDBType.GUID, S_GUID, typeof(System.Guid), NativeDBType.GUID, DbType.Guid); // 12 - ubyte[16]
+ private static readonly NativeDBType D_TinyInt = new NativeDBType(3, 1, true, false, OleDbType.TinyInt, NativeDBType.I1, S_I1, typeof(short), NativeDBType.I1, DbType.SByte); // 13 - integer1
+ private static readonly NativeDBType D_SmallInt = new NativeDBType(5, 2, true, false, OleDbType.SmallInt, NativeDBType.I2, S_I2, typeof(short), NativeDBType.I2, DbType.Int16); // 14 - integer2
+ private static readonly NativeDBType D_Integer = new NativeDBType(10, 4, true, false, OleDbType.Integer, NativeDBType.I4, S_I4, typeof(int), NativeDBType.I4, DbType.Int32); // 15 - integer4
+ private static readonly NativeDBType D_BigInt = new NativeDBType(19, 8, true, false, OleDbType.BigInt, NativeDBType.I8, S_I8, typeof(long), NativeDBType.I8, DbType.Int64); // 16 - integer8
+ private static readonly NativeDBType D_IDispatch = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IDispatch, NativeDBType.IDISPATCH, S_IDISPATCH, typeof(object), NativeDBType.IDISPATCH, DbType.Object); // 17 - integer4 (pointer)
+ private static readonly NativeDBType D_IUnknown = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IUnknown, NativeDBType.IUNKNOWN, S_IUNKNOWN, typeof(object), NativeDBType.IUNKNOWN, DbType.Object); // 18 - integer4 (pointer)
+ private static readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 19
+ private static readonly NativeDBType D_LongVarChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarChar, NativeDBType.STR, S_LONGVARCHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 20 - (ansi pointer)
+ private static readonly NativeDBType D_Numeric = new NativeDBType(28, 19, true, false, OleDbType.Numeric, NativeDBType.NUMERIC, S_NUMERIC, typeof(decimal), NativeDBType.NUMERIC, DbType.Decimal); // 21 - (tagDB_Numeric)
+ private static readonly unsafe NativeDBType D_PropVariant = new NativeDBType(0xff, sizeof(PROPVARIANT),
true, false, OleDbType.PropVariant, NativeDBType.PROPVARIANT, S_PROPVARIANT, typeof(object), NativeDBType.VARIANT, DbType.Object); // 22
- static private readonly NativeDBType D_Single = new NativeDBType(7, 4, true, false, OleDbType.Single, NativeDBType.R4, S_R4, typeof(float), NativeDBType.R4, DbType.Single); // 23 - single
- static private readonly NativeDBType D_Double = new NativeDBType(15, 8, true, false, OleDbType.Double, NativeDBType.R8, S_R8, typeof(double), NativeDBType.R8, DbType.Double); // 24 - double
- static private readonly NativeDBType D_UnsignedTinyInt = new NativeDBType(3, 1, true, false, OleDbType.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(byte), NativeDBType.UI1, DbType.Byte); // 25 - byte7
- static private readonly NativeDBType D_UnsignedSmallInt = new NativeDBType(5, 2, true, false, OleDbType.UnsignedSmallInt, NativeDBType.UI2, S_UI2, typeof(int), NativeDBType.UI2, DbType.UInt16); // 26 - unsigned integer2
- static private readonly NativeDBType D_UnsignedInt = new NativeDBType(10, 4, true, false, OleDbType.UnsignedInt, NativeDBType.UI4, S_UI4, typeof(long), NativeDBType.UI4, DbType.UInt32); // 27 - unsigned integer4
- static private readonly NativeDBType D_UnsignedBigInt = new NativeDBType(20, 8, true, false, OleDbType.UnsignedBigInt, NativeDBType.UI8, S_UI8, typeof(decimal), NativeDBType.UI8, DbType.UInt64); // 28 - unsigned integer8
- static private readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 29
- static private readonly NativeDBType D_VarChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarChar, NativeDBType.STR, S_VARCHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 30 - (ansi pointer)
- static private readonly NativeDBType D_Variant = new NativeDBType(0xff, ODB.SizeOf_Variant, true, false, OleDbType.Variant, NativeDBType.VARIANT, S_VARIANT, typeof(object), NativeDBType.VARIANT, DbType.Object); // 31 - ubyte[16] (variant)
- static private readonly NativeDBType D_VarNumeric = new NativeDBType(255, 16, true, false, OleDbType.VarNumeric, NativeDBType.VARNUMERIC, S_VARNUMERIC, typeof(decimal), NativeDBType.DECIMAL, DbType.VarNumeric); // 32 - (unicode pointer)
- static private readonly NativeDBType D_WChar = new NativeDBType(0xff, -1, true, false, OleDbType.WChar, NativeDBType.WSTR, S_WCHAR, typeof(string), NativeDBType.WSTR, DbType.StringFixedLength); // 33 - (unicode pointer)
- static private readonly NativeDBType D_VarWChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.WSTR, S_WVARCHAR, typeof(string), NativeDBType.WSTR, DbType.String); // 34 - (unicode pointer)
- static private readonly NativeDBType D_LongVarWChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarWChar, NativeDBType.WSTR, S_WLONGVARCHAR, typeof(string), NativeDBType.WSTR, DbType.String); // 35 - (unicode pointer)
- static private readonly NativeDBType D_Chapter = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.Empty, NativeDBType.HCHAPTER, S_UDT, typeof(IDataReader), NativeDBType.HCHAPTER, DbType.Object); // 36 - (hierarchical chaper)
- static private readonly NativeDBType D_Empty = new NativeDBType(0xff, 0, false, false, OleDbType.Empty, NativeDBType.EMPTY, "", null, NativeDBType.EMPTY, DbType.Object); // 37 - invalid param default
- static private readonly NativeDBType D_Xml = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.XML, S_XML, typeof(string), NativeDBType.WSTR, DbType.String); // 38 - (unicode pointer)
- static private readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.UDT, S_BINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 39 - (unicode pointer)
+ private static readonly NativeDBType D_Single = new NativeDBType(7, 4, true, false, OleDbType.Single, NativeDBType.R4, S_R4, typeof(float), NativeDBType.R4, DbType.Single); // 23 - single
+ private static readonly NativeDBType D_Double = new NativeDBType(15, 8, true, false, OleDbType.Double, NativeDBType.R8, S_R8, typeof(double), NativeDBType.R8, DbType.Double); // 24 - double
+ private static readonly NativeDBType D_UnsignedTinyInt = new NativeDBType(3, 1, true, false, OleDbType.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(byte), NativeDBType.UI1, DbType.Byte); // 25 - byte7
+ private static readonly NativeDBType D_UnsignedSmallInt = new NativeDBType(5, 2, true, false, OleDbType.UnsignedSmallInt, NativeDBType.UI2, S_UI2, typeof(int), NativeDBType.UI2, DbType.UInt16); // 26 - unsigned integer2
+ private static readonly NativeDBType D_UnsignedInt = new NativeDBType(10, 4, true, false, OleDbType.UnsignedInt, NativeDBType.UI4, S_UI4, typeof(long), NativeDBType.UI4, DbType.UInt32); // 27 - unsigned integer4
+ private static readonly NativeDBType D_UnsignedBigInt = new NativeDBType(20, 8, true, false, OleDbType.UnsignedBigInt, NativeDBType.UI8, S_UI8, typeof(decimal), NativeDBType.UI8, DbType.UInt64); // 28 - unsigned integer8
+ private static readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 29
+ private static readonly NativeDBType D_VarChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarChar, NativeDBType.STR, S_VARCHAR, typeof(string), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 30 - (ansi pointer)
+ private static readonly NativeDBType D_Variant = new NativeDBType(0xff, ODB.SizeOf_Variant, true, false, OleDbType.Variant, NativeDBType.VARIANT, S_VARIANT, typeof(object), NativeDBType.VARIANT, DbType.Object); // 31 - ubyte[16] (variant)
+ private static readonly NativeDBType D_VarNumeric = new NativeDBType(255, 16, true, false, OleDbType.VarNumeric, NativeDBType.VARNUMERIC, S_VARNUMERIC, typeof(decimal), NativeDBType.DECIMAL, DbType.VarNumeric); // 32 - (unicode pointer)
+ private static readonly NativeDBType D_WChar = new NativeDBType(0xff, -1, true, false, OleDbType.WChar, NativeDBType.WSTR, S_WCHAR, typeof(string), NativeDBType.WSTR, DbType.StringFixedLength); // 33 - (unicode pointer)
+ private static readonly NativeDBType D_VarWChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.WSTR, S_WVARCHAR, typeof(string), NativeDBType.WSTR, DbType.String); // 34 - (unicode pointer)
+ private static readonly NativeDBType D_LongVarWChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarWChar, NativeDBType.WSTR, S_WLONGVARCHAR, typeof(string), NativeDBType.WSTR, DbType.String); // 35 - (unicode pointer)
+ private static readonly NativeDBType D_Chapter = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.Empty, NativeDBType.HCHAPTER, S_UDT, typeof(IDataReader), NativeDBType.HCHAPTER, DbType.Object); // 36 - (hierarchical chaper)
+ private static readonly NativeDBType D_Empty = new NativeDBType(0xff, 0, false, false, OleDbType.Empty, NativeDBType.EMPTY, "", null, NativeDBType.EMPTY, DbType.Object); // 37 - invalid param default
+ private static readonly NativeDBType D_Xml = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.XML, S_XML, typeof(string), NativeDBType.WSTR, DbType.String); // 38 - (unicode pointer)
+ private static readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.UDT, S_BINARY, typeof(byte[]), NativeDBType.BYTES, DbType.Binary); // 39 - (unicode pointer)
- static internal readonly NativeDBType Default = D_VarWChar;
- static internal readonly byte MaximumDecimalPrecision = D_Decimal.maxpre;
+ internal static readonly NativeDBType Default = D_VarWChar;
+ internal static readonly byte MaximumDecimalPrecision = D_Decimal.maxpre;
private const int FixedDbPart = /*DBPART_VALUE*/0x1 | /*DBPART_STATUS*/0x4;
private const int VarblDbPart = /*DBPART_VALUE*/0x1 | /*DBPART_LENGTH*/0x2 | /*DBPART_STATUS*/0x4;
}
#endif
- static internal NativeDBType FromDataType(OleDbType enumOleDbType)
+ internal static NativeDBType FromDataType(OleDbType enumOleDbType)
{
switch (enumOleDbType)
{ // @perfnote: Enum.IsDefined
}
}
- static internal NativeDBType FromSystemType(object value)
+ internal static NativeDBType FromSystemType(object value)
{
IConvertible ic = (value as IConvertible);
if (null != ic)
//throw ADP.UnknownDataType(value.GetType());
}
- static internal NativeDBType FromDbType(DbType dbType)
+ internal static NativeDBType FromDbType(DbType dbType)
{
switch (dbType)
{
}
}
- static internal NativeDBType FromDBType(short dbType, bool isLong, bool isFixed)
+ internal static NativeDBType FromDBType(short dbType, bool isLong, bool isFixed)
{
switch (dbType)
{
internal static class ODB
{
// OleDbCommand
- static internal void CommandParameterStatus(StringBuilder builder, int index, DBStatus status)
+ internal static void CommandParameterStatus(StringBuilder builder, int index, DBStatus status)
{
switch (status)
{
break;
}
}
- static internal Exception CommandParameterStatus(string value, Exception inner)
+ internal static Exception CommandParameterStatus(string value, Exception inner)
{
if (ADP.IsEmpty(value))
{ return inner; }
return ADP.InvalidOperation(value, inner);
}
- static internal Exception UninitializedParameters(int index, OleDbType dbtype)
+ internal static Exception UninitializedParameters(int index, OleDbType dbtype)
{
return ADP.InvalidOperation(SR.Format(SR.OleDb_UninitializedParameters, index.ToString(CultureInfo.InvariantCulture), dbtype.ToString()));
}
- static internal Exception BadStatus_ParamAcc(int index, DBBindStatus status)
+ internal static Exception BadStatus_ParamAcc(int index, DBBindStatus status)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_BadStatus_ParamAcc, index.ToString(CultureInfo.InvariantCulture), status.ToString()));
}
- static internal Exception NoProviderSupportForParameters(string provider, Exception inner)
+ internal static Exception NoProviderSupportForParameters(string provider, Exception inner)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_NoProviderSupportForParameters, provider), inner);
}
- static internal Exception NoProviderSupportForSProcResetParameters(string provider)
+ internal static Exception NoProviderSupportForSProcResetParameters(string provider)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_NoProviderSupportForSProcResetParameters, provider));
}
// OleDbProperties
- static internal void PropsetSetFailure(StringBuilder builder, string description, OleDbPropertyStatus status)
+ internal static void PropsetSetFailure(StringBuilder builder, string description, OleDbPropertyStatus status)
{
if (OleDbPropertyStatus.Ok == status)
{
break;
}
}
- static internal Exception PropsetSetFailure(string value, Exception inner)
+ internal static Exception PropsetSetFailure(string value, Exception inner)
{
if (ADP.IsEmpty(value))
{ return inner; }
}
// OleDbConnection
- static internal ArgumentException SchemaRowsetsNotSupported(string provider)
+ internal static ArgumentException SchemaRowsetsNotSupported(string provider)
{
return ADP.Argument(SR.Format(SR.OleDb_SchemaRowsetsNotSupported, "IDBSchemaRowset", provider));
}
- static internal OleDbException NoErrorInformation(string provider, OleDbHResult hr, Exception inner)
+ internal static OleDbException NoErrorInformation(string provider, OleDbHResult hr, Exception inner)
{
OleDbException e;
if (!ADP.IsEmpty(provider))
ADP.TraceExceptionAsReturnValue(e);
return e;
}
- static internal InvalidOperationException MDACNotAvailable(Exception inner)
+ internal static InvalidOperationException MDACNotAvailable(Exception inner)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_MDACNotAvailable), inner);
}
- static internal ArgumentException MSDASQLNotSupported()
+ internal static ArgumentException MSDASQLNotSupported()
{
return ADP.Argument(SR.Format(SR.OleDb_MSDASQLNotSupported));
}
- static internal InvalidOperationException CommandTextNotSupported(string provider, Exception inner)
+ internal static InvalidOperationException CommandTextNotSupported(string provider, Exception inner)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_CommandTextNotSupported, provider), inner);
}
- static internal InvalidOperationException PossiblePromptNotUserInteractive()
+ internal static InvalidOperationException PossiblePromptNotUserInteractive()
{
return ADP.DataAdapter(SR.Format(SR.OleDb_PossiblePromptNotUserInteractive));
}
- static internal InvalidOperationException ProviderUnavailable(string provider, Exception inner)
+ internal static InvalidOperationException ProviderUnavailable(string provider, Exception inner)
{
//return new OleDbException(SR.Format(SR.OleDb_ProviderUnavailable, provider), (int)OleDbHResult.CO_E_CLASSSTRING, inner);
return ADP.DataAdapter(SR.Format(SR.OleDb_ProviderUnavailable, provider), inner);
}
- static internal InvalidOperationException TransactionsNotSupported(string provider, Exception inner)
+ internal static InvalidOperationException TransactionsNotSupported(string provider, Exception inner)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_TransactionsNotSupported, provider), inner);
}
- static internal ArgumentException AsynchronousNotSupported()
+ internal static ArgumentException AsynchronousNotSupported()
{
return ADP.Argument(SR.Format(SR.OleDb_AsynchronousNotSupported));
}
- static internal ArgumentException NoProviderSpecified()
+ internal static ArgumentException NoProviderSpecified()
{
return ADP.Argument(SR.Format(SR.OleDb_NoProviderSpecified));
}
- static internal ArgumentException InvalidProviderSpecified()
+ internal static ArgumentException InvalidProviderSpecified()
{
return ADP.Argument(SR.Format(SR.OleDb_InvalidProviderSpecified));
}
- static internal ArgumentException InvalidRestrictionsDbInfoKeywords(string parameter)
+ internal static ArgumentException InvalidRestrictionsDbInfoKeywords(string parameter)
{
return ADP.Argument(SR.Format(SR.OleDb_InvalidRestrictionsDbInfoKeywords), parameter);
}
- static internal ArgumentException InvalidRestrictionsDbInfoLiteral(string parameter)
+ internal static ArgumentException InvalidRestrictionsDbInfoLiteral(string parameter)
{
return ADP.Argument(SR.Format(SR.OleDb_InvalidRestrictionsDbInfoLiteral), parameter);
}
- static internal ArgumentException InvalidRestrictionsSchemaGuids(string parameter)
+ internal static ArgumentException InvalidRestrictionsSchemaGuids(string parameter)
{
return ADP.Argument(SR.Format(SR.OleDb_InvalidRestrictionsSchemaGuids), parameter);
}
- static internal ArgumentException NotSupportedSchemaTable(Guid schema, OleDbConnection connection)
+ internal static ArgumentException NotSupportedSchemaTable(Guid schema, OleDbConnection connection)
{
return ADP.Argument(SR.Format(SR.OleDb_NotSupportedSchemaTable, OleDbSchemaGuid.GetTextFromValue(schema), connection.Provider));
}
// OleDbParameter
- static internal Exception InvalidOleDbType(OleDbType value)
+ internal static Exception InvalidOleDbType(OleDbType value)
{
return ADP.InvalidEnumerationValue(typeof(OleDbType), (int)value);
}
// Getting Data
- static internal InvalidOperationException BadAccessor()
+ internal static InvalidOperationException BadAccessor()
{
return ADP.DataAdapter(SR.Format(SR.OleDb_BadAccessor));
}
- static internal InvalidCastException ConversionRequired()
+ internal static InvalidCastException ConversionRequired()
{
return ADP.InvalidCast();
}
- static internal InvalidCastException CantConvertValue()
+ internal static InvalidCastException CantConvertValue()
{
return ADP.InvalidCast(SR.Format(SR.OleDb_CantConvertValue));
}
- static internal InvalidOperationException SignMismatch(Type type)
+ internal static InvalidOperationException SignMismatch(Type type)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_SignMismatch, type.Name));
}
- static internal InvalidOperationException DataOverflow(Type type)
+ internal static InvalidOperationException DataOverflow(Type type)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_DataOverflow, type.Name));
}
- static internal InvalidOperationException CantCreate(Type type)
+ internal static InvalidOperationException CantCreate(Type type)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_CantCreate, type.Name));
}
- static internal InvalidOperationException Unavailable(Type type)
+ internal static InvalidOperationException Unavailable(Type type)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_Unavailable, type.Name));
}
- static internal InvalidOperationException UnexpectedStatusValue(DBStatus status)
+ internal static InvalidOperationException UnexpectedStatusValue(DBStatus status)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_UnexpectedStatusValue, status.ToString()));
}
- static internal InvalidOperationException GVtUnknown(int wType)
+ internal static InvalidOperationException GVtUnknown(int wType)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_GVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture)));
}
- static internal InvalidOperationException SVtUnknown(int wType)
+ internal static InvalidOperationException SVtUnknown(int wType)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_SVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture)));
}
// OleDbDataReader
- static internal InvalidOperationException BadStatusRowAccessor(int i, DBBindStatus rowStatus)
+ internal static InvalidOperationException BadStatusRowAccessor(int i, DBBindStatus rowStatus)
{
return ADP.DataAdapter(SR.Format(SR.OleDb_BadStatusRowAccessor, i.ToString(CultureInfo.InvariantCulture), rowStatus.ToString()));
}
- static internal InvalidOperationException ThreadApartmentState(Exception innerException)
+ internal static InvalidOperationException ThreadApartmentState(Exception innerException)
{
return ADP.InvalidOperation(SR.Format(SR.OleDb_ThreadApartmentState), innerException);
}
// OleDbDataAdapter
- static internal ArgumentException Fill_NotADODB(string parameter)
+ internal static ArgumentException Fill_NotADODB(string parameter)
{
return ADP.Argument(SR.Format(SR.OleDb_Fill_NotADODB), parameter);
}
- static internal ArgumentException Fill_EmptyRecordSet(string parameter, Exception innerException)
+ internal static ArgumentException Fill_EmptyRecordSet(string parameter, Exception innerException)
{
return ADP.Argument(SR.Format(SR.OleDb_Fill_EmptyRecordSet, "IRowset"), parameter, innerException);
}
- static internal ArgumentException Fill_EmptyRecord(string parameter, Exception innerException)
+ internal static ArgumentException Fill_EmptyRecord(string parameter, Exception innerException)
{
return ADP.Argument(SR.Format(SR.OleDb_Fill_EmptyRecord), parameter, innerException);
}
- static internal string NoErrorMessage(OleDbHResult errorcode)
+ internal static string NoErrorMessage(OleDbHResult errorcode)
{
return SR.Format(SR.OleDb_NoErrorMessage, ODB.ELookup(errorcode));
}
- static internal string FailedGetDescription(OleDbHResult errorcode)
+ internal static string FailedGetDescription(OleDbHResult errorcode)
{
return SR.Format(SR.OleDb_FailedGetDescription, ODB.ELookup(errorcode));
}
- static internal string FailedGetSource(OleDbHResult errorcode)
+ internal static string FailedGetSource(OleDbHResult errorcode)
{
return SR.Format(SR.OleDb_FailedGetSource, ODB.ELookup(errorcode));
}
- static internal InvalidOperationException DBBindingGetVector()
+ internal static InvalidOperationException DBBindingGetVector()
{
return ADP.InvalidOperation(SR.Format(SR.OleDb_DBBindingGetVector));
}
- static internal OleDbHResult GetErrorDescription(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult hresult, out string message)
+ internal static OleDbHResult GetErrorDescription(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult hresult, out string message)
{
OleDbHResult hr = errorInfo.GetDescription(out message);
if (((int)hr < 0) && ADP.IsEmpty(message))
}
// OleDbMetaDataFactory
- static internal InvalidOperationException IDBInfoNotSupported()
+ internal static InvalidOperationException IDBInfoNotSupported()
{
return ADP.InvalidOperation(SR.Format(SR.OleDb_IDBInfoNotSupported));
}
internal const uint DB_ALL_EXCEPT_LIKE = 3;
internal const uint DB_SEARCHABLE = 4;
- static internal readonly IntPtr DB_INVALID_HACCESSOR = ADP.PtrZero;
- static internal readonly IntPtr DB_NULL_HCHAPTER = ADP.PtrZero;
- static internal readonly IntPtr DB_NULL_HROW = ADP.PtrZero;
-
- /*static internal readonly int SizeOf_tagDBPARAMINFO = Marshal.SizeOf(typeof(tagDBPARAMINFO));*/
- static internal readonly int SizeOf_tagDBBINDING = Marshal.SizeOf(typeof(tagDBBINDING));
- static internal readonly int SizeOf_tagDBCOLUMNINFO = Marshal.SizeOf(typeof(tagDBCOLUMNINFO));
- static internal readonly int SizeOf_tagDBLITERALINFO = Marshal.SizeOf(typeof(tagDBLITERALINFO));
- static internal readonly int SizeOf_tagDBPROPSET = Marshal.SizeOf(typeof(tagDBPROPSET));
- static internal readonly int SizeOf_tagDBPROP = Marshal.SizeOf(typeof(tagDBPROP));
- static internal readonly int SizeOf_tagDBPROPINFOSET = Marshal.SizeOf(typeof(tagDBPROPINFOSET));
- static internal readonly int SizeOf_tagDBPROPINFO = Marshal.SizeOf(typeof(tagDBPROPINFO));
- static internal readonly int SizeOf_tagDBPROPIDSET = Marshal.SizeOf(typeof(tagDBPROPIDSET));
- static internal readonly int SizeOf_Guid = Marshal.SizeOf(typeof(Guid));
- static internal readonly int SizeOf_Variant = 8 + (2 * ADP.PtrSize); // 16 on 32bit, 24 on 64bit
-
- static internal readonly int OffsetOf_tagDBPROP_Status = Marshal.OffsetOf(typeof(tagDBPROP), "dwStatus").ToInt32();
- static internal readonly int OffsetOf_tagDBPROP_Value = Marshal.OffsetOf(typeof(tagDBPROP), "vValue").ToInt32();
- static internal readonly int OffsetOf_tagDBPROPSET_Properties = Marshal.OffsetOf(typeof(tagDBPROPSET), "rgProperties").ToInt32();
- static internal readonly int OffsetOf_tagDBPROPINFO_Value = Marshal.OffsetOf(typeof(tagDBPROPINFO), "vValue").ToInt32();
- static internal readonly int OffsetOf_tagDBPROPIDSET_PropertySet = Marshal.OffsetOf(typeof(tagDBPROPIDSET), "guidPropertySet").ToInt32();
- static internal readonly int OffsetOf_tagDBLITERALINFO_it = Marshal.OffsetOf(typeof(tagDBLITERALINFO), "it").ToInt32();
- static internal readonly int OffsetOf_tagDBBINDING_obValue = Marshal.OffsetOf(typeof(tagDBBINDING), "obValue").ToInt32();
- static internal readonly int OffsetOf_tagDBBINDING_wType = Marshal.OffsetOf(typeof(tagDBBINDING), "wType").ToInt32();
-
- static internal Guid IID_NULL = Guid.Empty;
- static internal Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
- static internal Guid IID_IDBInitialize = new Guid(0x0C733A8B, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_IDBCreateSession = new Guid(0x0C733A5D, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_IDBCreateCommand = new Guid(0x0C733A1D, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_ICommandText = new Guid(0x0C733A27, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_IMultipleResults = new Guid(0x0C733A90, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_IRow = new Guid(0x0C733AB4, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_IRowset = new Guid(0x0C733A7C, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
- static internal Guid IID_ISQLErrorInfo = new Guid(0x0C733A74, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
-
- static internal Guid CLSID_DataLinks = new Guid(0x2206CDB2, 0x19C1, 0x11D1, 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29);
-
- static internal Guid DBGUID_DEFAULT = new Guid(0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal Guid DBGUID_ROWSET = new Guid(0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
- static internal Guid DBGUID_ROW = new Guid(0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
-
- static internal Guid DBGUID_ROWDEFAULTSTREAM = new Guid(0x0C733AB7, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
-
- static internal readonly Guid CLSID_MSDASQL = new Guid(0xc8b522cb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
-
- static internal readonly object DBCOL_SPECIALCOL = new Guid(0xc8b52232, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
-
- static internal readonly char[] ErrorTrimCharacters = new char[] { '\r', '\n', '\0' };
+ internal static readonly IntPtr DB_INVALID_HACCESSOR = ADP.PtrZero;
+ internal static readonly IntPtr DB_NULL_HCHAPTER = ADP.PtrZero;
+ internal static readonly IntPtr DB_NULL_HROW = ADP.PtrZero;
+
+ /*internal static readonly int SizeOf_tagDBPARAMINFO = Marshal.SizeOf(typeof(tagDBPARAMINFO));*/
+ internal static readonly int SizeOf_tagDBBINDING = Marshal.SizeOf(typeof(tagDBBINDING));
+ internal static readonly int SizeOf_tagDBCOLUMNINFO = Marshal.SizeOf(typeof(tagDBCOLUMNINFO));
+ internal static readonly int SizeOf_tagDBLITERALINFO = Marshal.SizeOf(typeof(tagDBLITERALINFO));
+ internal static readonly int SizeOf_tagDBPROPSET = Marshal.SizeOf(typeof(tagDBPROPSET));
+ internal static readonly int SizeOf_tagDBPROP = Marshal.SizeOf(typeof(tagDBPROP));
+ internal static readonly int SizeOf_tagDBPROPINFOSET = Marshal.SizeOf(typeof(tagDBPROPINFOSET));
+ internal static readonly int SizeOf_tagDBPROPINFO = Marshal.SizeOf(typeof(tagDBPROPINFO));
+ internal static readonly int SizeOf_tagDBPROPIDSET = Marshal.SizeOf(typeof(tagDBPROPIDSET));
+ internal static readonly int SizeOf_Guid = Marshal.SizeOf(typeof(Guid));
+ internal static readonly int SizeOf_Variant = 8 + (2 * ADP.PtrSize); // 16 on 32bit, 24 on 64bit
+
+ internal static readonly int OffsetOf_tagDBPROP_Status = Marshal.OffsetOf(typeof(tagDBPROP), "dwStatus").ToInt32();
+ internal static readonly int OffsetOf_tagDBPROP_Value = Marshal.OffsetOf(typeof(tagDBPROP), "vValue").ToInt32();
+ internal static readonly int OffsetOf_tagDBPROPSET_Properties = Marshal.OffsetOf(typeof(tagDBPROPSET), "rgProperties").ToInt32();
+ internal static readonly int OffsetOf_tagDBPROPINFO_Value = Marshal.OffsetOf(typeof(tagDBPROPINFO), "vValue").ToInt32();
+ internal static readonly int OffsetOf_tagDBPROPIDSET_PropertySet = Marshal.OffsetOf(typeof(tagDBPROPIDSET), "guidPropertySet").ToInt32();
+ internal static readonly int OffsetOf_tagDBLITERALINFO_it = Marshal.OffsetOf(typeof(tagDBLITERALINFO), "it").ToInt32();
+ internal static readonly int OffsetOf_tagDBBINDING_obValue = Marshal.OffsetOf(typeof(tagDBBINDING), "obValue").ToInt32();
+ internal static readonly int OffsetOf_tagDBBINDING_wType = Marshal.OffsetOf(typeof(tagDBBINDING), "wType").ToInt32();
+
+ internal static Guid IID_NULL = Guid.Empty;
+ internal static Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
+ internal static Guid IID_IDBInitialize = new Guid(0x0C733A8B, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_IDBCreateSession = new Guid(0x0C733A5D, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_IDBCreateCommand = new Guid(0x0C733A1D, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_ICommandText = new Guid(0x0C733A27, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_IMultipleResults = new Guid(0x0C733A90, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_IRow = new Guid(0x0C733AB4, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_IRowset = new Guid(0x0C733A7C, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+ internal static Guid IID_ISQLErrorInfo = new Guid(0x0C733A74, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+
+ internal static Guid CLSID_DataLinks = new Guid(0x2206CDB2, 0x19C1, 0x11D1, 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29);
+
+ internal static Guid DBGUID_DEFAULT = new Guid(0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static Guid DBGUID_ROWSET = new Guid(0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+ internal static Guid DBGUID_ROW = new Guid(0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+
+ internal static Guid DBGUID_ROWDEFAULTSTREAM = new Guid(0x0C733AB7, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D);
+
+ internal static readonly Guid CLSID_MSDASQL = new Guid(0xc8b522cb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+
+ internal static readonly object DBCOL_SPECIALCOL = new Guid(0xc8b52232, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
+
+ internal static readonly char[] ErrorTrimCharacters = new char[] { '\r', '\n', '\0' };
// used by ConnectionString hashtable, must be all lowercase
internal const string Asynchronous_Processing = "asynchronous processing";
internal const string Keyword = "Keyword";
// Debug error string writeline
- static internal string ELookup(OleDbHResult hr)
+ internal static string ELookup(OleDbHResult hr)
{
StringBuilder builder = new StringBuilder();
builder.Append(hr.ToString());
}
#if DEBUG
- static readonly private Hashtable g_wlookpup = new Hashtable();
- static internal string WLookup(short id)
+ private static readonly Hashtable g_wlookpup = new Hashtable();
+ internal static string WLookup(short id)
{
string value = (string)g_wlookpup[id];
if (null == value)
{
internal sealed class PropertyIDSet : DbBuffer
{
- static private readonly int PropertyIDSetAndValueSize = ODB.SizeOf_tagDBPROPIDSET + ADP.PtrSize; // sizeof(tagDBPROPIDSET) + sizeof(int)
- static private readonly int PropertyIDSetSize = ODB.SizeOf_tagDBPROPIDSET;
+ private static readonly int PropertyIDSetAndValueSize = ODB.SizeOf_tagDBPROPIDSET + ADP.PtrSize; // sizeof(tagDBPROPIDSET) + sizeof(int)
+ private static readonly int PropertyIDSetSize = ODB.SizeOf_tagDBPROPIDSET;
private int _count;
return columns;
}
- static internal int AlignDataSize(int value)
+ internal static int AlignDataSize(int value)
{
// buffer data to start on 8-byte boundary
return Math.Max(8, (value + 7) & ~0x7);
_haveData = false;
}
- static private void FreeChapter(IntPtr buffer, int valueOffset, object iaccessor)
+ private static void FreeChapter(IntPtr buffer, int valueOffset, object iaccessor)
{
Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
}
}
- static private void FreeBstr(IntPtr buffer, int valueOffset)
+ private static void FreeBstr(IntPtr buffer, int valueOffset)
{
Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
}
}
- static private void FreeCoTaskMem(IntPtr buffer, int valueOffset)
+ private static void FreeCoTaskMem(IntPtr buffer, int valueOffset)
{
Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
}
}
- static private void FreeVariant(IntPtr buffer, int valueOffset)
+ private static void FreeVariant(IntPtr buffer, int valueOffset)
{
// two contigous VARIANT structures that need to be freed
// the second should only be freed if different from the first
}
}
- static unsafe private void FreePropVariant(IntPtr buffer, int valueOffset)
+ private static unsafe void FreePropVariant(IntPtr buffer, int valueOffset)
{
// two contigous PROPVARIANT structures that need to be freed
// the second should only be freed if different from the first
[Guid("0c733a93-2a1c-11ce-ade5-00aa0044773d")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
- unsafe internal interface ITransactionLocal : ITransaction
+ internal unsafe interface ITransactionLocal : ITransaction
{
[PreserveSig]
new int Commit
internal static class SafeNativeMethods
{
[DllImport(Interop.Libraries.Ole32, SetLastError = false)]
- static internal extern IntPtr CoTaskMemAlloc(IntPtr cb);
+ internal static extern IntPtr CoTaskMemAlloc(IntPtr cb);
[DllImport(Interop.Libraries.Ole32, SetLastError = false)]
- static internal extern void CoTaskMemFree(IntPtr handle);
+ internal static extern void CoTaskMemFree(IntPtr handle);
[DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Unicode, PreserveSig = true)]
- static internal extern int GetUserDefaultLCID();
+ internal static extern int GetUserDefaultLCID();
internal static void ZeroMemory(IntPtr ptr, int length)
{
Marshal.Copy(zeroes, 0, ptr, length);
}
- static internal unsafe IntPtr InterlockedExchangePointer(
+ internal static unsafe IntPtr InterlockedExchangePointer(
IntPtr lpAddress,
IntPtr lpValue)
{
}
[DllImport(Interop.Libraries.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
- static internal extern int GetCurrentProcessId();
+ internal static extern int GetCurrentProcessId();
[DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
- static internal extern IntPtr LocalAlloc(int flags, IntPtr countOfBytes);
+ internal static extern IntPtr LocalAlloc(int flags, IntPtr countOfBytes);
[DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
- static internal extern IntPtr LocalFree(IntPtr handle);
+ internal static extern IntPtr LocalFree(IntPtr handle);
[DllImport(Interop.Libraries.OleAut32, CharSet = CharSet.Unicode)]
internal static extern IntPtr SysAllocStringLen(string src, int len); // BSTR
// only using this to clear existing error info with null
[DllImport(Interop.Libraries.OleAut32, CharSet = CharSet.Unicode, PreserveSig = false)]
// TLS values are preserved between threads, need to check that we use this API to clear the error state only.
- static private extern void SetErrorInfo(int dwReserved, IntPtr pIErrorInfo);
+ private static extern void SetErrorInfo(int dwReserved, IntPtr pIErrorInfo);
[DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
- static internal extern int ReleaseSemaphore(IntPtr handle, int releaseCount, IntPtr previousCount);
+ internal static extern int ReleaseSemaphore(IntPtr handle, int releaseCount, IntPtr previousCount);
[DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
- static internal extern int WaitForMultipleObjectsEx(uint nCount, IntPtr lpHandles, bool bWaitAll, uint dwMilliseconds, bool bAlertable);
+ internal static extern int WaitForMultipleObjectsEx(uint nCount, IntPtr lpHandles, bool bWaitAll, uint dwMilliseconds, bool bAlertable);
[DllImport(Interop.Libraries.Kernel32/*, SetLastError=true*/)]
- static internal extern int WaitForSingleObjectEx(IntPtr lpHandles, uint dwMilliseconds, bool bAlertable);
+ internal static extern int WaitForSingleObjectEx(IntPtr lpHandles, uint dwMilliseconds, bool bAlertable);
[DllImport(Interop.Libraries.Ole32, PreserveSig = false)]
- static internal extern void PropVariantClear(IntPtr pObject);
+ internal static extern void PropVariantClear(IntPtr pObject);
[DllImport(Interop.Libraries.OleAut32, PreserveSig = false)]
- static internal extern void VariantClear(IntPtr pObject);
+ internal static extern void VariantClear(IntPtr pObject);
internal sealed class Wrapper
{
private Wrapper() { }
// SxS: clearing error information is considered safe
- static internal void ClearErrorInfo()
+ internal static void ClearErrorInfo()
{
SafeNativeMethods.SetErrorInfo(0, ADP.PtrZero);
}
{
internal static class ADP
{
- static internal Exception ExceptionWithStackTrace(Exception e)
+ internal static Exception ExceptionWithStackTrace(Exception e)
{
try
{
}
}
- static internal void TraceExceptionAsReturnValue(Exception e)
+ internal static void TraceExceptionAsReturnValue(Exception e)
{
TraceException("<comm.ADP.TraceException|ERR|THROW> '%ls'\n", e);
}
- static internal void TraceExceptionForCapture(Exception e)
+ internal static void TraceExceptionForCapture(Exception e)
{
Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!");
TraceException("<comm.ADP.TraceException|ERR|CATCH> '%ls'\n", e);
}
- static internal void TraceExceptionWithoutRethrow(Exception e)
+ internal static void TraceExceptionWithoutRethrow(Exception e)
{
Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!");
TraceException("<comm.ADP.TraceException|ERR|CATCH> '%ls'\n", e);
//
// COM+ exceptions
//
- static internal ArgumentException Argument(string error)
+ internal static ArgumentException Argument(string error)
{
ArgumentException e = new ArgumentException(error);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentException Argument(string error, Exception inner)
+ internal static ArgumentException Argument(string error, Exception inner)
{
ArgumentException e = new ArgumentException(error, inner);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentException Argument(string error, string parameter)
+ internal static ArgumentException Argument(string error, string parameter)
{
ArgumentException e = new ArgumentException(error, parameter);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentException Argument(string error, string parameter, Exception inner)
+ internal static ArgumentException Argument(string error, string parameter, Exception inner)
{
ArgumentException e = new ArgumentException(error, parameter, inner);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentNullException ArgumentNull(string parameter)
+ internal static ArgumentNullException ArgumentNull(string parameter)
{
ArgumentNullException e = new ArgumentNullException(parameter);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentNullException ArgumentNull(string parameter, string error)
+ internal static ArgumentNullException ArgumentNull(string parameter, string error)
{
ArgumentNullException e = new ArgumentNullException(parameter, error);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentOutOfRangeException ArgumentOutOfRange(string message, string parameterName)
+ internal static ArgumentOutOfRangeException ArgumentOutOfRange(string message, string parameterName)
{
ArgumentOutOfRangeException e = new ArgumentOutOfRangeException(parameterName, message);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ConfigurationException Configuration(string message)
+ internal static ConfigurationException Configuration(string message)
{
ConfigurationException e = new ConfigurationErrorsException(message);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal IndexOutOfRangeException IndexOutOfRange(string error)
+ internal static IndexOutOfRangeException IndexOutOfRange(string error)
{
IndexOutOfRangeException e = new IndexOutOfRangeException(error);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal InvalidCastException InvalidCast(string error)
+ internal static InvalidCastException InvalidCast(string error)
{
return InvalidCast(error, null);
}
- static internal InvalidCastException InvalidCast(string error, Exception inner)
+ internal static InvalidCastException InvalidCast(string error, Exception inner)
{
InvalidCastException e = new InvalidCastException(error, inner);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal InvalidOperationException InvalidOperation(string error)
+ internal static InvalidOperationException InvalidOperation(string error)
{
InvalidOperationException e = new InvalidOperationException(error);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal TimeoutException TimeoutException(string error)
+ internal static TimeoutException TimeoutException(string error)
{
TimeoutException e = new TimeoutException(error);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal InvalidOperationException InvalidOperation(string error, Exception inner)
+ internal static InvalidOperationException InvalidOperation(string error, Exception inner)
{
InvalidOperationException e = new InvalidOperationException(error, inner);
TraceExceptionAsReturnValue(e);
return e;
}
- static internal NotSupportedException NotSupported()
+ internal static NotSupportedException NotSupported()
{
NotSupportedException e = new NotSupportedException();
TraceExceptionAsReturnValue(e);
return e;
}
- static internal InvalidCastException InvalidCast()
+ internal static InvalidCastException InvalidCast()
{
InvalidCastException e = new InvalidCastException();
TraceExceptionAsReturnValue(e);
return e;
}
- static internal InvalidOperationException DataAdapter(string error)
+ internal static InvalidOperationException DataAdapter(string error)
{
return InvalidOperation(error);
}
- static internal InvalidOperationException DataAdapter(string error, Exception inner)
+ internal static InvalidOperationException DataAdapter(string error, Exception inner)
{
return InvalidOperation(error, inner);
}
- static private InvalidOperationException Provider(string error)
+ private static InvalidOperationException Provider(string error)
{
return InvalidOperation(error);
}
- static internal ArgumentException InvalidMultipartName(string property, string value)
+ internal static ArgumentException InvalidMultipartName(string property, string value)
{
ArgumentException e = new ArgumentException(SR.GetString(SR.ADP_InvalidMultipartName, SR.GetString(property), value));
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value)
+ internal static ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value)
{
ArgumentException e = new ArgumentException(SR.GetString(SR.ADP_InvalidMultipartNameQuoteUsage, SR.GetString(property), value));
TraceExceptionAsReturnValue(e);
return e;
}
- static internal ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit)
+ internal static ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit)
{
ArgumentException e = new ArgumentException(SR.GetString(SR.ADP_InvalidMultipartNameToManyParts, SR.GetString(property), value, limit));
TraceExceptionAsReturnValue(e);
//
// Helper Functions
//
- static internal void CheckArgumentLength(string value, string parameterName)
+ internal static void CheckArgumentLength(string value, string parameterName)
{
CheckArgumentNull(value, parameterName);
if (0 == value.Length)
}
}
- static internal void CheckArgumentNull(object value, string parameterName)
+ internal static void CheckArgumentNull(object value, string parameterName)
{
if (null == value)
{
}
// only StackOverflowException & ThreadAbortException are sealed classes
- static private readonly Type StackOverflowType = typeof(StackOverflowException);
- static private readonly Type OutOfMemoryType = typeof(OutOfMemoryException);
- static private readonly Type ThreadAbortType = typeof(ThreadAbortException);
- static private readonly Type NullReferenceType = typeof(NullReferenceException);
- static private readonly Type AccessViolationType = typeof(AccessViolationException);
- static private readonly Type SecurityType = typeof(SecurityException);
+ private static readonly Type StackOverflowType = typeof(StackOverflowException);
+ private static readonly Type OutOfMemoryType = typeof(OutOfMemoryException);
+ private static readonly Type ThreadAbortType = typeof(ThreadAbortException);
+ private static readonly Type NullReferenceType = typeof(NullReferenceException);
+ private static readonly Type AccessViolationType = typeof(AccessViolationException);
+ private static readonly Type SecurityType = typeof(SecurityException);
- static internal bool IsCatchableExceptionType(Exception e)
+ internal static bool IsCatchableExceptionType(Exception e)
{
// a 'catchable' exception is defined by what it is not.
Debug.Assert(e != null, "Unexpected null exception!");
!SecurityType.IsAssignableFrom(type));
}
- static internal bool IsCatchableOrSecurityExceptionType(Exception e)
+ internal static bool IsCatchableOrSecurityExceptionType(Exception e)
{
// a 'catchable' exception is defined by what it is not.
// since IsCatchableExceptionType defined SecurityException as not 'catchable'
// Invalid Enumeration
- static internal ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value)
+ internal static ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value)
{
return ADP.ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name);
}
// IDbCommand.CommandType
- static internal ArgumentOutOfRangeException InvalidCommandType(CommandType value)
+ internal static ArgumentOutOfRangeException InvalidCommandType(CommandType value)
{
#if DEBUG
switch(value) {
}
// IDataParameter.SourceVersion
- static internal ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value)
+ internal static ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value)
{
#if DEBUG
switch(value) {
}
// IDbConnection.BeginTransaction, OleDbTransaction.Begin
- static internal ArgumentOutOfRangeException InvalidIsolationLevel(IsolationLevel value)
+ internal static ArgumentOutOfRangeException InvalidIsolationLevel(IsolationLevel value)
{
#if DEBUG
switch(value) {
}
// IDataParameter.Direction
- static internal ArgumentOutOfRangeException InvalidParameterDirection(ParameterDirection value)
+ internal static ArgumentOutOfRangeException InvalidParameterDirection(ParameterDirection value)
{
#if DEBUG
switch(value) {
}
// IDbCommand.UpdateRowSource
- static internal ArgumentOutOfRangeException InvalidUpdateRowSource(UpdateRowSource value)
+ internal static ArgumentOutOfRangeException InvalidUpdateRowSource(UpdateRowSource value)
{
#if DEBUG
switch(value) {
//
// DbConnectionOptions, DataAccess
//
- static internal ArgumentException ConnectionStringSyntax(int index)
+ internal static ArgumentException ConnectionStringSyntax(int index)
{
return Argument(SR.GetString(SR.ADP_ConnectionStringSyntax, index));
}
- static internal ArgumentException KeywordNotSupported(string keyword)
+ internal static ArgumentException KeywordNotSupported(string keyword)
{
return Argument(SR.GetString(SR.ADP_KeywordNotSupported, keyword));
}
- static internal ArgumentException UdlFileError(Exception inner)
+ internal static ArgumentException UdlFileError(Exception inner)
{
return Argument(SR.GetString(SR.ADP_UdlFileError), inner);
}
- static internal ArgumentException InvalidUDL()
+ internal static ArgumentException InvalidUDL()
{
return Argument(SR.GetString(SR.ADP_InvalidUDL));
}
- static internal InvalidOperationException InvalidDataDirectory()
+ internal static InvalidOperationException InvalidDataDirectory()
{
return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidDataDirectory));
}
- static internal ArgumentException InvalidKeyname(string parameterName)
+ internal static ArgumentException InvalidKeyname(string parameterName)
{
return Argument(SR.GetString(SR.ADP_InvalidKey), parameterName);
}
- static internal ArgumentException InvalidValue(string parameterName)
+ internal static ArgumentException InvalidValue(string parameterName)
{
return Argument(SR.GetString(SR.ADP_InvalidValue), parameterName);
}
- static internal ArgumentException ConvertFailed(Type fromType, Type toType, Exception innerException)
+ internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception innerException)
{
return ADP.Argument(SR.GetString(SR.SqlConvert_ConvertFailed, fromType.FullName, toType.FullName), innerException);
}
//
// DbConnection
//
- static internal InvalidOperationException NoConnectionString()
+ internal static InvalidOperationException NoConnectionString()
{
return InvalidOperation(SR.GetString(SR.ADP_NoConnectionString));
}
- static private string ConnectionStateMsg(ConnectionState state)
+ private static string ConnectionStateMsg(ConnectionState state)
{
switch (state)
{
}
}
- static internal ConfigurationException ConfigUnableToLoadXmlMetaDataFile(string settingName)
+ internal static ConfigurationException ConfigUnableToLoadXmlMetaDataFile(string settingName)
{
return Configuration(SR.GetString(SR.OleDb_ConfigUnableToLoadXmlMetaDataFile, settingName));
}
- static internal ConfigurationException ConfigWrongNumberOfValues(string settingName)
+ internal static ConfigurationException ConfigWrongNumberOfValues(string settingName)
{
return Configuration(SR.GetString(SR.OleDb_ConfigWrongNumberOfValues, settingName));
}
//
// : DbConnectionOptions, DataAccess, SqlClient
//
- static internal Exception InvalidConnectionOptionValue(string key)
+ internal static Exception InvalidConnectionOptionValue(string key)
{
return InvalidConnectionOptionValue(key, null);
}
- static internal Exception InvalidConnectionOptionValue(string key, Exception inner)
+ internal static Exception InvalidConnectionOptionValue(string key, Exception inner)
{
return Argument(SR.GetString(SR.ADP_InvalidConnectionOptionValue, key), inner);
}
//
// DbConnectionPool and related
//
- static internal Exception PooledOpenTimeout()
+ internal static Exception PooledOpenTimeout()
{
return ADP.InvalidOperation(SR.GetString(SR.ADP_PooledOpenTimeout));
}
- static internal Exception NonPooledOpenTimeout()
+ internal static Exception NonPooledOpenTimeout()
{
return ADP.TimeoutException(SR.GetString(SR.ADP_NonPooledOpenTimeout));
}
//
// Generic Data Provider Collection
//
- static internal ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection)
+ internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection)
{
return Argument(SR.GetString(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name));
}
- static internal ArgumentNullException CollectionNullValue(string parameter, Type collection, Type itemType)
+ internal static ArgumentNullException CollectionNullValue(string parameter, Type collection, Type itemType)
{
return ArgumentNull(parameter, SR.GetString(SR.ADP_CollectionNullValue, collection.Name, itemType.Name));
}
- static internal IndexOutOfRangeException CollectionIndexInt32(int index, Type collection, int count)
+ internal static IndexOutOfRangeException CollectionIndexInt32(int index, Type collection, int count)
{
return IndexOutOfRange(SR.GetString(SR.ADP_CollectionIndexInt32, index.ToString(CultureInfo.InvariantCulture), collection.Name, count.ToString(CultureInfo.InvariantCulture)));
}
- static internal IndexOutOfRangeException CollectionIndexString(Type itemType, string propertyName, string propertyValue, Type collection)
+ internal static IndexOutOfRangeException CollectionIndexString(Type itemType, string propertyName, string propertyValue, Type collection)
{
return IndexOutOfRange(SR.GetString(SR.ADP_CollectionIndexString, itemType.Name, propertyName, propertyValue, collection.Name));
}
- static internal InvalidCastException CollectionInvalidType(Type collection, Type itemType, object invalidValue)
+ internal static InvalidCastException CollectionInvalidType(Type collection, Type itemType, object invalidValue)
{
return InvalidCast(SR.GetString(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name));
}
- static internal ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection)
+ internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection)
{
return Argument(SR.GetString(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
}
- static internal ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
+ internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
{
return Argument(SR.GetString(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
}
//
// DbProviderException
//
- static internal InvalidOperationException TransactionConnectionMismatch()
+ internal static InvalidOperationException TransactionConnectionMismatch()
{
return Provider(SR.GetString(SR.ADP_TransactionConnectionMismatch));
}
- static internal InvalidOperationException TransactionRequired(string method)
+ internal static InvalidOperationException TransactionRequired(string method)
{
return Provider(SR.GetString(SR.ADP_TransactionRequired, method));
}
- static internal Exception CommandTextRequired(string method)
+ internal static Exception CommandTextRequired(string method)
{
return InvalidOperation(SR.GetString(SR.ADP_CommandTextRequired, method));
}
- static internal InvalidOperationException ConnectionRequired(string method)
+ internal static InvalidOperationException ConnectionRequired(string method)
{
return InvalidOperation(SR.GetString(SR.ADP_ConnectionRequired, method));
}
- static internal InvalidOperationException OpenConnectionRequired(string method, ConnectionState state)
+ internal static InvalidOperationException OpenConnectionRequired(string method, ConnectionState state)
{
return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionRequired, method, ADP.ConnectionStateMsg(state)));
}
- static internal Exception NoStoredProcedureExists(string sproc)
+ internal static Exception NoStoredProcedureExists(string sproc)
{
return InvalidOperation(SR.GetString(SR.ADP_NoStoredProcedureExists, sproc));
}
- static internal Exception OpenReaderExists()
+ internal static Exception OpenReaderExists()
{
return OpenReaderExists(null);
}
- static internal Exception OpenReaderExists(Exception e)
+ internal static Exception OpenReaderExists(Exception e)
{
return InvalidOperation(SR.GetString(SR.ADP_OpenReaderExists), e);
}
- static internal Exception TransactionCompleted()
+ internal static Exception TransactionCompleted()
{
return DataAdapter(SR.GetString(SR.ADP_TransactionCompleted));
}
//
// DbDataReader
//
- static internal Exception NonSeqByteAccess(long badIndex, long currIndex, string method)
+ internal static Exception NonSeqByteAccess(long badIndex, long currIndex, string method)
{
return InvalidOperation(SR.GetString(SR.ADP_NonSeqByteAccess, badIndex.ToString(CultureInfo.InvariantCulture), currIndex.ToString(CultureInfo.InvariantCulture), method));
}
- static internal Exception NumericToDecimalOverflow()
+ internal static Exception NumericToDecimalOverflow()
{
return InvalidCast(SR.GetString(SR.ADP_NumericToDecimalOverflow));
}
- static internal InvalidOperationException NonSequentialColumnAccess(int badCol, int currCol)
+ internal static InvalidOperationException NonSequentialColumnAccess(int badCol, int currCol)
{
return InvalidOperation(SR.GetString(SR.ADP_NonSequentialColumnAccess, badCol.ToString(CultureInfo.InvariantCulture), currCol.ToString(CultureInfo.InvariantCulture)));
}
- static internal Exception FillRequiresSourceTableName(string parameter)
+ internal static Exception FillRequiresSourceTableName(string parameter)
{
return Argument(SR.GetString(SR.ADP_FillRequiresSourceTableName), parameter);
}
//
// : IDbCommand
//
- static internal Exception InvalidCommandTimeout(int value)
+ internal static Exception InvalidCommandTimeout(int value)
{
return Argument(SR.GetString(SR.ADP_InvalidCommandTimeout, value.ToString(CultureInfo.InvariantCulture)), ADP.CommandTimeout);
}
- static internal Exception DeriveParametersNotSupported(IDbCommand value)
+ internal static Exception DeriveParametersNotSupported(IDbCommand value)
{
return DataAdapter(SR.GetString(SR.ADP_DeriveParametersNotSupported, value.GetType().Name, value.CommandType.ToString()));
}
- static internal Exception UninitializedParameterSize(int index, Type dataType)
+ internal static Exception UninitializedParameterSize(int index, Type dataType)
{
return InvalidOperation(SR.GetString(SR.ADP_UninitializedParameterSize, index.ToString(CultureInfo.InvariantCulture), dataType.Name));
}
- static internal Exception PrepareParameterType(IDbCommand cmd)
+ internal static Exception PrepareParameterType(IDbCommand cmd)
{
return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterType, cmd.GetType().Name));
}
- static internal Exception PrepareParameterSize(IDbCommand cmd)
+ internal static Exception PrepareParameterSize(IDbCommand cmd)
{
return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterSize, cmd.GetType().Name));
}
- static internal Exception PrepareParameterScale(IDbCommand cmd, string type)
+ internal static Exception PrepareParameterScale(IDbCommand cmd, string type)
{
return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterScale, cmd.GetType().Name, type));
}
// : ConnectionUtil
//
- static internal Exception ClosedConnectionError()
+ internal static Exception ClosedConnectionError()
{
return InvalidOperation(SR.GetString(SR.ADP_ClosedConnectionError));
}
- static internal Exception ConnectionAlreadyOpen(ConnectionState state)
+ internal static Exception ConnectionAlreadyOpen(ConnectionState state)
{
return InvalidOperation(SR.GetString(SR.ADP_ConnectionAlreadyOpen, ADP.ConnectionStateMsg(state)));
}
- static internal Exception TransactionPresent()
+ internal static Exception TransactionPresent()
{
return InvalidOperation(SR.GetString(SR.ADP_TransactionPresent));
}
- static internal Exception LocalTransactionPresent()
+ internal static Exception LocalTransactionPresent()
{
return InvalidOperation(SR.GetString(SR.ADP_LocalTransactionPresent));
}
- static internal Exception OpenConnectionPropertySet(string property, ConnectionState state)
+ internal static Exception OpenConnectionPropertySet(string property, ConnectionState state)
{
return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionPropertySet, property, ADP.ConnectionStateMsg(state)));
}
- static internal Exception EmptyDatabaseName()
+ internal static Exception EmptyDatabaseName()
{
return Argument(SR.GetString(SR.ADP_EmptyDatabaseName));
}
ConnectionOptionsMissing,
CouldNotSwitchToClosedPreviouslyOpenedState,
}
- static internal Exception InternalConnectionError(ConnectionError internalError)
+ internal static Exception InternalConnectionError(ConnectionError internalError)
{
return InvalidOperation(SR.GetString(SR.ADP_InternalConnectionError, (int)internalError));
}
UnknownTransactionFailure = 60,
}
- static internal Exception InternalError(InternalErrorCode internalError)
+ internal static Exception InternalError(InternalErrorCode internalError)
{
return InvalidOperation(SR.GetString(SR.ADP_InternalProviderError, (int)internalError));
}
- static internal Exception InternalError(InternalErrorCode internalError, Exception innerException)
+ internal static Exception InternalError(InternalErrorCode internalError, Exception innerException)
{
return InvalidOperation(SR.GetString(SR.ADP_InternalProviderError, (int)internalError), innerException);
}
- static internal Exception InvalidConnectTimeoutValue()
+ internal static Exception InvalidConnectTimeoutValue()
{
return Argument(SR.GetString(SR.ADP_InvalidConnectTimeoutValue));
}
//
// : DbDataReader
//
- static internal Exception DataReaderNoData()
+ internal static Exception DataReaderNoData()
{
return InvalidOperation(SR.GetString(SR.ADP_DataReaderNoData));
}
- static internal Exception DataReaderClosed(string method)
+ internal static Exception DataReaderClosed(string method)
{
return InvalidOperation(SR.GetString(SR.ADP_DataReaderClosed, method));
}
- static internal ArgumentOutOfRangeException InvalidSourceBufferIndex(int maxLen, long srcOffset, string parameterName)
+ internal static ArgumentOutOfRangeException InvalidSourceBufferIndex(int maxLen, long srcOffset, string parameterName)
{
return ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidSourceBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), srcOffset.ToString(CultureInfo.InvariantCulture)), parameterName);
}
- static internal ArgumentOutOfRangeException InvalidDestinationBufferIndex(int maxLen, int dstOffset, string parameterName)
+ internal static ArgumentOutOfRangeException InvalidDestinationBufferIndex(int maxLen, int dstOffset, string parameterName)
{
return ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidDestinationBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), dstOffset.ToString(CultureInfo.InvariantCulture)), parameterName);
}
- static internal Exception InvalidDataLength(long length)
+ internal static Exception InvalidDataLength(long length)
{
return IndexOutOfRange(SR.GetString(SR.SQL_InvalidDataLength, length.ToString(CultureInfo.InvariantCulture)));
}
//
// : IDataParameter
//
- static internal ArgumentException InvalidDataType(TypeCode typecode)
+ internal static ArgumentException InvalidDataType(TypeCode typecode)
{
return Argument(SR.GetString(SR.ADP_InvalidDataType, typecode.ToString()));
}
- static internal ArgumentException DbTypeNotSupported(System.Data.DbType type, Type enumtype)
+ internal static ArgumentException DbTypeNotSupported(System.Data.DbType type, Type enumtype)
{
return Argument(SR.GetString(SR.ADP_DbTypeNotSupported, type.ToString(), enumtype.Name));
}
- static internal ArgumentException UnknownDataTypeCode(Type dataType, TypeCode typeCode)
+ internal static ArgumentException UnknownDataTypeCode(Type dataType, TypeCode typeCode)
{
return Argument(SR.GetString(SR.ADP_UnknownDataTypeCode, ((int)typeCode).ToString(CultureInfo.InvariantCulture), dataType.FullName));
}
- static internal ArgumentException InvalidOffsetValue(int value)
+ internal static ArgumentException InvalidOffsetValue(int value)
{
return Argument(SR.GetString(SR.ADP_InvalidOffsetValue, value.ToString(CultureInfo.InvariantCulture)));
}
- static internal ArgumentException InvalidSizeValue(int value)
+ internal static ArgumentException InvalidSizeValue(int value)
{
return Argument(SR.GetString(SR.ADP_InvalidSizeValue, value.ToString(CultureInfo.InvariantCulture)));
}
- static internal Exception ParameterConversionFailed(object value, Type destType, Exception inner)
+ internal static Exception ParameterConversionFailed(object value, Type destType, Exception inner)
{
Debug.Assert(null != value, "null value on conversion failure");
Debug.Assert(null != inner, "null inner on conversion failure");
//
// : IDataParameterCollection
//
- static internal Exception ParametersMappingIndex(int index, IDataParameterCollection collection)
+ internal static Exception ParametersMappingIndex(int index, IDataParameterCollection collection)
{
return CollectionIndexInt32(index, collection.GetType(), collection.Count);
}
- static internal Exception ParametersSourceIndex(string parameterName, IDataParameterCollection collection, Type parameterType)
+ internal static Exception ParametersSourceIndex(string parameterName, IDataParameterCollection collection, Type parameterType)
{
return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType());
}
- static internal Exception ParameterNull(string parameter, IDataParameterCollection collection, Type parameterType)
+ internal static Exception ParameterNull(string parameter, IDataParameterCollection collection, Type parameterType)
{
return CollectionNullValue(parameter, collection.GetType(), parameterType);
}
- static internal Exception InvalidParameterType(IDataParameterCollection collection, Type parameterType, object invalidValue)
+ internal static Exception InvalidParameterType(IDataParameterCollection collection, Type parameterType, object invalidValue)
{
return CollectionInvalidType(collection.GetType(), parameterType, invalidValue);
}
//
// : IDbTransaction
//
- static internal Exception ParallelTransactionsNotSupported(IDbConnection obj)
+ internal static Exception ParallelTransactionsNotSupported(IDbConnection obj)
{
return InvalidOperation(SR.GetString(SR.ADP_ParallelTransactionsNotSupported, obj.GetType().Name));
}
- static internal Exception TransactionZombied(IDbTransaction obj)
+ internal static Exception TransactionZombied(IDbTransaction obj)
{
return InvalidOperation(SR.GetString(SR.ADP_TransactionZombied, obj.GetType().Name));
}
// : DbMetaDataFactory
//
- static internal Exception AmbigousCollectionName(string collectionName)
+ internal static Exception AmbigousCollectionName(string collectionName)
{
return Argument(SR.GetString(SR.MDF_AmbigousCollectionName, collectionName));
}
- static internal Exception CollectionNameIsNotUnique(string collectionName)
+ internal static Exception CollectionNameIsNotUnique(string collectionName)
{
return Argument(SR.GetString(SR.MDF_CollectionNameISNotUnique, collectionName));
}
- static internal Exception DataTableDoesNotExist(string collectionName)
+ internal static Exception DataTableDoesNotExist(string collectionName)
{
return Argument(SR.GetString(SR.MDF_DataTableDoesNotExist, collectionName));
}
- static internal Exception IncorrectNumberOfDataSourceInformationRows()
+ internal static Exception IncorrectNumberOfDataSourceInformationRows()
{
return Argument(SR.GetString(SR.MDF_IncorrectNumberOfDataSourceInformationRows));
}
- static internal ArgumentException InvalidRestrictionValue(string collectionName, string restrictionName, string restrictionValue)
+ internal static ArgumentException InvalidRestrictionValue(string collectionName, string restrictionName, string restrictionValue)
{
return ADP.Argument(SR.GetString(SR.MDF_InvalidRestrictionValue, collectionName, restrictionName, restrictionValue));
}
- static internal Exception InvalidXml()
+ internal static Exception InvalidXml()
{
return Argument(SR.GetString(SR.MDF_InvalidXml));
}
- static internal Exception InvalidXmlMissingColumn(string collectionName, string columnName)
+ internal static Exception InvalidXmlMissingColumn(string collectionName, string columnName)
{
return Argument(SR.GetString(SR.MDF_InvalidXmlMissingColumn, collectionName, columnName));
}
- static internal Exception InvalidXmlInvalidValue(string collectionName, string columnName)
+ internal static Exception InvalidXmlInvalidValue(string collectionName, string columnName)
{
return Argument(SR.GetString(SR.MDF_InvalidXmlInvalidValue, collectionName, columnName));
}
- static internal Exception MissingDataSourceInformationColumn()
+ internal static Exception MissingDataSourceInformationColumn()
{
return Argument(SR.GetString(SR.MDF_MissingDataSourceInformationColumn));
}
- static internal Exception MissingRestrictionColumn()
+ internal static Exception MissingRestrictionColumn()
{
return Argument(SR.GetString(SR.MDF_MissingRestrictionColumn));
}
- static internal Exception MissingRestrictionRow()
+ internal static Exception MissingRestrictionRow()
{
return Argument(SR.GetString(SR.MDF_MissingRestrictionRow));
}
- static internal Exception NoColumns()
+ internal static Exception NoColumns()
{
return Argument(SR.GetString(SR.MDF_NoColumns));
}
- static internal Exception QueryFailed(string collectionName, Exception e)
+ internal static Exception QueryFailed(string collectionName, Exception e)
{
return InvalidOperation(SR.GetString(SR.MDF_QueryFailed, collectionName), e);
}
- static internal Exception TooManyRestrictions(string collectionName)
+ internal static Exception TooManyRestrictions(string collectionName)
{
return Argument(SR.GetString(SR.MDF_TooManyRestrictions, collectionName));
}
- static internal Exception UnableToBuildCollection(string collectionName)
+ internal static Exception UnableToBuildCollection(string collectionName)
{
return Argument(SR.GetString(SR.MDF_UnableToBuildCollection, collectionName));
}
- static internal Exception UndefinedCollection(string collectionName)
+ internal static Exception UndefinedCollection(string collectionName)
{
return Argument(SR.GetString(SR.MDF_UndefinedCollection, collectionName));
}
- static internal Exception UndefinedPopulationMechanism(string populationMechanism)
+ internal static Exception UndefinedPopulationMechanism(string populationMechanism)
{
return Argument(SR.GetString(SR.MDF_UndefinedPopulationMechanism, populationMechanism));
}
- static internal Exception UnsupportedVersion(string collectionName)
+ internal static Exception UnsupportedVersion(string collectionName)
{
return Argument(SR.GetString(SR.MDF_UnsupportedVersion, collectionName));
}
//
// : CommandBuilder
//
- static internal InvalidOperationException QuotePrefixNotSet(string method)
+ internal static InvalidOperationException QuotePrefixNotSet(string method)
{
return InvalidOperation(SR.GetString(SR.ADP_QuotePrefixNotSet, method));
}
internal const int DefaultCommandTimeout = 30;
internal const int DefaultConnectionTimeout = DbConnectionStringDefaults.ConnectTimeout;
- static internal readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero
- static internal readonly int PtrSize = IntPtr.Size;
- static internal readonly IntPtr RecordsUnaffected = new IntPtr(-1);
+ internal static readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero
+ internal static readonly int PtrSize = IntPtr.Size;
+ internal static readonly IntPtr RecordsUnaffected = new IntPtr(-1);
internal const int CharSize = System.Text.UnicodeEncoding.CharSize;
- static internal bool CompareInsensitiveInvariant(string strvalue, string strconst)
+ internal static bool CompareInsensitiveInvariant(string strvalue, string strconst)
{
return (0 == CultureInfo.InvariantCulture.CompareInfo.Compare(strvalue, strconst, CompareOptions.IgnoreCase));
}
- static internal Delegate FindBuilder(MulticastDelegate mcd)
+ internal static Delegate FindBuilder(MulticastDelegate mcd)
{ // V1.2.3300
if (null != mcd)
{
return null;
}
- static internal readonly bool IsWindowsNT = (PlatformID.Win32NT == Environment.OSVersion.Platform);
- static internal readonly bool IsPlatformNT5 = (ADP.IsWindowsNT && (Environment.OSVersion.Version.Major >= 5));
+ internal static readonly bool IsWindowsNT = (PlatformID.Win32NT == Environment.OSVersion.Platform);
+ internal static readonly bool IsPlatformNT5 = (ADP.IsWindowsNT && (Environment.OSVersion.Version.Major >= 5));
- static internal SysTx.Transaction GetCurrentTransaction()
+ internal static SysTx.Transaction GetCurrentTransaction()
{
SysTx.Transaction transaction = SysTx.Transaction.Current;
return transaction;
}
- static internal void SetCurrentTransaction(SysTx.Transaction transaction)
+ internal static void SetCurrentTransaction(SysTx.Transaction transaction)
{
SysTx.Transaction.Current = transaction;
}
- static internal SysTx.IDtcTransaction GetOletxTransaction(SysTx.Transaction transaction)
+ internal static SysTx.IDtcTransaction GetOletxTransaction(SysTx.Transaction transaction)
{
SysTx.IDtcTransaction oleTxTransaction = null;
return false;
}
- static internal long TimerCurrent()
+ internal static long TimerCurrent()
{
return DateTime.UtcNow.ToFileTimeUtc();
}
- static internal long TimerFromSeconds(int seconds)
+ internal static long TimerFromSeconds(int seconds)
{
long result = checked((long)seconds * TimeSpan.TicksPerSecond);
return result;
}
- static internal long TimerRemaining(long timerExpire)
+ internal static long TimerRemaining(long timerExpire)
{
long timerNow = TimerCurrent();
long result = checked(timerExpire - timerNow);
return result;
}
- static internal long TimerRemainingMilliseconds(long timerExpire)
+ internal static long TimerRemainingMilliseconds(long timerExpire)
{
long result = TimerToMilliseconds(TimerRemaining(timerExpire));
return result;
}
- static internal long TimerToMilliseconds(long timerValue)
+ internal static long TimerToMilliseconds(long timerValue)
{
long result = timerValue / TimeSpan.TicksPerMillisecond;
return result;
}
- static internal string BuildQuotedString(string quotePrefix, string quoteSuffix, string unQuotedString)
+ internal static string BuildQuotedString(string quotePrefix, string quoteSuffix, string unQuotedString)
{
StringBuilder resultString = new StringBuilder();
if (ADP.IsEmpty(quotePrefix) == false)
return resultString.ToString();
}
- static internal void EscapeSpecialCharacters(string unescapedString, StringBuilder escapedString)
+ internal static void EscapeSpecialCharacters(string unescapedString, StringBuilder escapedString)
{
// note special characters list is from character escapes
// in the MSDN regular expression language elements documentation
return;
}
- static internal string GetFullPath(string filename)
+ internal static string GetFullPath(string filename)
{
return Path.GetFullPath(filename);
}
// SxS: the file is opened in FileShare.Read mode allowing several threads/apps to read it simultaneously
- static internal Stream GetFileStream(string filename)
+ internal static Stream GetFileStream(string filename)
{
return new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
}
- static internal FileVersionInfo GetVersionInfo(string filename)
+ internal static FileVersionInfo GetVersionInfo(string filename)
{
return FileVersionInfo.GetVersionInfo(filename);
}
- static internal Stream GetXmlStreamFromValues(string[] values, string errorString)
+ internal static Stream GetXmlStreamFromValues(string[] values, string errorString)
{
if (values.Length != 1)
{
// metadata files are opened from <.NetRuntimeFolder>\CONFIG\<metadatafilename.xml>
// this operation is safe in SxS because the file is opened in read-only mode and each NDP runtime accesses its own copy of the metadata
// under the runtime folder.
- static internal Stream GetXmlStream(string value, string errorString)
+ internal static Stream GetXmlStream(string value, string errorString)
{
Stream XmlStream;
const string config = "config\\";
}
- static internal object ClassesRootRegistryValue(string subkey, string queryvalue)
+ internal static object ClassesRootRegistryValue(string subkey, string queryvalue)
{
try
{
}
}
- static internal object LocalMachineRegistryValue(string subkey, string queryvalue)
+ internal static object LocalMachineRegistryValue(string subkey, string queryvalue)
{
try
{
}
// SxS: although this method uses registry, it does not expose anything out
- static internal void CheckVersionMDAC(bool ifodbcelseoledb)
+ internal static void CheckVersionMDAC(bool ifodbcelseoledb)
{
int major, minor, build;
string version;
// the return value is true if the string was quoted and false if it was not
// this allows the caller to determine if it is an error or not for the quotedString to not be quoted
- static internal bool RemoveStringQuotes(string quotePrefix, string quoteSuffix, string quotedString, out string unquotedString)
+ internal static bool RemoveStringQuotes(string quotePrefix, string quoteSuffix, string quotedString, out string unquotedString)
{
int prefixLength;
if (quotePrefix == null)
return true;
}
- static internal IntPtr IntPtrOffset(IntPtr pbase, int offset)
+ internal static IntPtr IntPtrOffset(IntPtr pbase, int offset)
{
if (4 == ADP.PtrSize)
{
return (IntPtr)checked(pbase.ToInt64() + offset);
}
- static internal int IntPtrToInt32(IntPtr value)
+ internal static int IntPtrToInt32(IntPtr value)
{
if (4 == ADP.PtrSize)
{
}
// TODO: are those names appropriate for common code?
- static internal int SrcCompare(string strA, string strB)
+ internal static int SrcCompare(string strA, string strB)
{ // this is null safe
return ((strA == strB) ? 0 : 1);
}
- static internal int DstCompare(string strA, string strB)
+ internal static int DstCompare(string strA, string strB)
{ // this is null safe
return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.compareOptions);
}
- static internal bool IsDirection(IDataParameter value, ParameterDirection condition)
+ internal static bool IsDirection(IDataParameter value, ParameterDirection condition)
{
#if DEBUG
IsDirectionValid(condition);
return (condition == (condition & value.Direction));
}
#if DEBUG
- static private void IsDirectionValid(ParameterDirection value) {
+ private static void IsDirectionValid(ParameterDirection value) {
switch (value) { // @perfnote: Enum.IsDefined
case ParameterDirection.Input:
case ParameterDirection.Output:
}
#endif
- static internal bool IsEmpty(string str)
+ internal static bool IsEmpty(string str)
{
return ((null == str) || (0 == str.Length));
}
- static internal bool IsEmptyArray(string[] array)
+ internal static bool IsEmptyArray(string[] array)
{
return ((null == array) || (0 == array.Length));
}
- static internal bool IsNull(object value)
+ internal static bool IsNull(object value)
{
if ((null == value) || (DBNull.Value == value))
{
{
internal sealed class NameValuePair
{
- readonly private string _name;
- readonly private string _value;
- readonly private int _length;
+ private readonly string _name;
+ private readonly string _value;
+ private readonly int _length;
private NameValuePair _next;
internal NameValuePair(string name, string value, int length)
// This class is a way to stash our cloned Tx key for later disposal when it's no longer needed.
// We can't get at the key in the dictionary without enumerating entries, so we stash an extra
// copy as part of the value.
- sealed private class TransactedConnectionList : List<DbConnectionInternal>
+ private sealed class TransactedConnectionList : List<DbConnectionInternal>
{
private SysTx.Transaction _transaction;
internal TransactedConnectionList(int initialAllocation, SysTx.Transaction tx) : base(initialAllocation)
public DbConnectionOptions UserOptions { get; private set; }
}
- sealed private class TransactedConnectionPool
+ private sealed class TransactedConnectionPool
{
Dictionary<SysTx.Transaction, TransactedConnectionList> _transactedCxns;
{
private static class CreationData
{
- static internal readonly CounterCreationData HardConnectsPerSecond = new CounterCreationData(
+ internal static readonly CounterCreationData HardConnectsPerSecond = new CounterCreationData(
"HardConnectsPerSecond",
"The number of actual connections per second that are being made to servers",
PerformanceCounterType.RateOfCountsPerSecond32);
- static internal readonly CounterCreationData HardDisconnectsPerSecond = new CounterCreationData(
+ internal static readonly CounterCreationData HardDisconnectsPerSecond = new CounterCreationData(
"HardDisconnectsPerSecond",
"The number of actual disconnects per second that are being made to servers",
PerformanceCounterType.RateOfCountsPerSecond32);
- static internal readonly CounterCreationData SoftConnectsPerSecond = new CounterCreationData(
+ internal static readonly CounterCreationData SoftConnectsPerSecond = new CounterCreationData(
"SoftConnectsPerSecond",
"The number of connections we get from the pool per second",
PerformanceCounterType.RateOfCountsPerSecond32);
- static internal readonly CounterCreationData SoftDisconnectsPerSecond = new CounterCreationData(
+ internal static readonly CounterCreationData SoftDisconnectsPerSecond = new CounterCreationData(
"SoftDisconnectsPerSecond",
"The number of connections we return to the pool per second",
PerformanceCounterType.RateOfCountsPerSecond32);
- static internal readonly CounterCreationData NumberOfNonPooledConnections = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfNonPooledConnections = new CounterCreationData(
"NumberOfNonPooledConnections",
"The number of connections that are not using connection pooling",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfPooledConnections = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfPooledConnections = new CounterCreationData(
"NumberOfPooledConnections",
"The number of connections that are managed by the connection pooler",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfActiveConnectionPoolGroups = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfActiveConnectionPoolGroups = new CounterCreationData(
"NumberOfActiveConnectionPoolGroups",
"The number of unique connection strings",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfInactiveConnectionPoolGroups = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfInactiveConnectionPoolGroups = new CounterCreationData(
"NumberOfInactiveConnectionPoolGroups",
"The number of unique connection strings waiting for pruning",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfActiveConnectionPools = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfActiveConnectionPools = new CounterCreationData(
"NumberOfActiveConnectionPools",
"The number of connection pools",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfInactiveConnectionPools = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfInactiveConnectionPools = new CounterCreationData(
"NumberOfInactiveConnectionPools",
"The number of connection pools",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfActiveConnections = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfActiveConnections = new CounterCreationData(
"NumberOfActiveConnections",
"The number of connections currently in-use",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfFreeConnections = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfFreeConnections = new CounterCreationData(
"NumberOfFreeConnections",
"The number of connections currently available for use",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfStasisConnections = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfStasisConnections = new CounterCreationData(
"NumberOfStasisConnections",
"The number of connections currently waiting to be made ready for use",
PerformanceCounterType.NumberOfItems32);
- static internal readonly CounterCreationData NumberOfReclaimedConnections = new CounterCreationData(
+ internal static readonly CounterCreationData NumberOfReclaimedConnections = new CounterCreationData(
"NumberOfReclaimedConnections",
"The number of connections we reclaim from GC'd external connections",
PerformanceCounterType.NumberOfItems32);
private const int Win32_CheckTokenMembership = 1;
private const int Win32_CreateWellKnownSid = 5;
- static public 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;
get { return _isRestricted; }
}
- static private byte[] CreateWellKnownSid(WellKnownSidType sidType)
+ private static byte[] CreateWellKnownSid(WellKnownSidType sidType)
{
// Passing an array as big as it can ever be is a small price to pay for
// not having to P/Invoke twice (once to get the buffer, once to get the data)
return _hashCode;
}
- static private void IntegratedSecurityError(int caller)
+ private static void IntegratedSecurityError(int caller)
{
// passing 1,2,3,4,5 instead of true/false so that with a debugger
// we could determine more easily which Win32 method call failed
//
[DllImport(Interop.Libraries.OleAut32, CharSet = CharSet.Unicode, PreserveSig = true)]
- static internal extern System.Data.OleDb.OleDbHResult GetErrorInfo(
+ internal static extern System.Data.OleDb.OleDbHResult GetErrorInfo(
[In] int dwReserved,
[Out, MarshalAs(UnmanagedType.Interface)] out IErrorInfo ppIErrorInfo);
}
[DllImport(Interop.Libraries.Advapi32, EntryPoint = "CreateWellKnownSid", SetLastError = true, CharSet = CharSet.Unicode)]
- static internal extern int CreateWellKnownSid(
+ internal static extern int CreateWellKnownSid(
int sidType,
byte[] domainSid,
[Out] byte[] resultSid,
{
return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidMixedUsageOfAccessTokenAndIntegratedSecurity));
}
- static internal InvalidOperationException InvalidMixedUsageOfAccessTokenAndUserIDPassword()
+ internal static InvalidOperationException InvalidMixedUsageOfAccessTokenAndUserIDPassword()
{
return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidMixedUsageOfAccessTokenAndUserIDPassword));
}
- static internal Exception InvalidMixedUsageOfCredentialAndAccessToken()
+ internal static Exception InvalidMixedUsageOfCredentialAndAccessToken()
{
return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidMixedUsageOfCredentialAndAccessToken));
}
// This class is a way to stash our cloned Tx key for later disposal when it's no longer needed.
// We can't get at the key in the dictionary without enumerating entries, so we stash an extra
// copy as part of the value.
- sealed private class TransactedConnectionList : List<DbConnectionInternal>
+ private sealed class TransactedConnectionList : List<DbConnectionInternal>
{
private Transaction _transaction;
internal TransactedConnectionList(int initialAllocation, Transaction tx) : base(initialAllocation)
public DbConnectionOptions UserOptions { get; private set; }
}
- sealed private class TransactedConnectionPool
+ private sealed class TransactedConnectionPool
{
Dictionary<Transaction, TransactedConnectionList> _transactedCxns;
/// <param name="receivedBuff">Receive buffer</param>
/// <param name="sendBuff">Send buffer</param>
/// <param name="serverName">Service Principal Name buffer</param>
- /// <returns>SNI error code</returns>
public void GenSspiClientContext(SspiClientContextStatus sspiClientContextStatus, byte[] receivedBuff, ref byte[] sendBuff, byte[] serverName)
{
SafeDeleteContext securityContext = sspiClientContextStatus.SecurityContext;
internal static bool _setAlwaysTaskOnWrite = false; //when set and in DEBUG mode, TdsParser::WriteBulkCopyValue will always return a task
internal static bool SetAlwaysTaskOnWrite
{
- set
- {
- _setAlwaysTaskOnWrite = value;
- }
get
{
return _setAlwaysTaskOnWrite;
}
+ set
+ {
+ _setAlwaysTaskOnWrite = value;
+ }
}
#endif
}
}
- new public SqlConnection Connection
+ public new SqlConnection Connection
{
get
{
}
}
- new public SqlTransaction Transaction
+ public new SqlTransaction Transaction
{
get
{
}
}
- new public SqlParameterCollection Parameters
+ public new SqlParameterCollection Parameters
{
get
{
}
}
- new public SqlParameter CreateParameter()
+ public new SqlParameter CreateParameter()
{
return new SqlParameter();
}
return ExecuteReader(behavior);
}
- new public SqlDataReader ExecuteReader()
+ public new SqlDataReader ExecuteReader()
{
SqlStatistics statistics = null;
try
}
}
- new public SqlDataReader ExecuteReader(CommandBehavior behavior)
+ public new SqlDataReader ExecuteReader(CommandBehavior behavior)
{
// Reset _pendingCancel upon entry into any Execute - used to synchronize state
// between entry into Execute* API and the thread obtaining the stateObject.
}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.NotOnCanceled, TaskScheduler.Default);
}
- new public Task<SqlDataReader> ExecuteReaderAsync()
+ public new Task<SqlDataReader> ExecuteReaderAsync()
{
return ExecuteReaderAsync(CommandBehavior.Default, CancellationToken.None);
}
- new public Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior)
+ public new Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior)
{
return ExecuteReaderAsync(behavior, CancellationToken.None);
}
- new public Task<SqlDataReader> ExecuteReaderAsync(CancellationToken cancellationToken)
+ public new Task<SqlDataReader> ExecuteReaderAsync(CancellationToken cancellationToken)
{
return ExecuteReaderAsync(CommandBehavior.Default, cancellationToken);
}
- new public Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
+ public new Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
{
Guid operationId = default(Guid);
if (!_parentOperationStarted)
}
}
- new public SqlDataAdapter DataAdapter
+ public new SqlDataAdapter DataAdapter
{
get
{
base.RowUpdatingHandler(ruevent);
}
- new public SqlCommand GetInsertCommand()
+ public new SqlCommand GetInsertCommand()
=> (SqlCommand)base.GetInsertCommand();
- new public SqlCommand GetInsertCommand(bool useColumnsForParameterNames)
+ public new SqlCommand GetInsertCommand(bool useColumnsForParameterNames)
=> (SqlCommand)base.GetInsertCommand(useColumnsForParameterNames);
- new public SqlCommand GetUpdateCommand()
+ public new SqlCommand GetUpdateCommand()
=> (SqlCommand)base.GetUpdateCommand();
- new public SqlCommand GetUpdateCommand(bool useColumnsForParameterNames)
+ public new SqlCommand GetUpdateCommand(bool useColumnsForParameterNames)
=> (SqlCommand)base.GetUpdateCommand(useColumnsForParameterNames);
- new public SqlCommand GetDeleteCommand()
+ public new SqlCommand GetDeleteCommand()
=> (SqlCommand)base.GetDeleteCommand();
- new public SqlCommand GetDeleteCommand(bool useColumnsForParameterNames)
+ public new SqlCommand GetDeleteCommand(bool useColumnsForParameterNames)
=> (SqlCommand)base.GetDeleteCommand(useColumnsForParameterNames);
protected override void ApplyParameterInfo(DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause)
// PUBLIC METHODS
//
- new public SqlTransaction BeginTransaction()
+ public new SqlTransaction BeginTransaction()
{
// this is just a delegate. The actual method tracks executiontime
return BeginTransaction(IsolationLevel.Unspecified, null);
}
- new public SqlTransaction BeginTransaction(IsolationLevel iso)
+ public new SqlTransaction BeginTransaction(IsolationLevel iso)
{
// this is just a delegate. The actual method tracks executiontime
return BeginTransaction(iso, null);
}
}
- new public SqlCommand CreateCommand()
+ public new SqlCommand CreateCommand()
{
return new SqlCommand(null, this);
}
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+
using System;
using System.Collections;
using System.ComponentModel;
GC.SuppressFinalize(this);
}
- new public SqlCommand DeleteCommand
+ public new SqlCommand DeleteCommand
{
get { return _deleteCommand; }
set { _deleteCommand = value; }
set { _deleteCommand = (SqlCommand)value; }
}
- new public SqlCommand InsertCommand
+ public new SqlCommand InsertCommand
{
get { return _insertCommand; }
set { _insertCommand = value; }
set { _insertCommand = (SqlCommand)value; }
}
- new public SqlCommand SelectCommand
+ public new SqlCommand SelectCommand
{
get { return _selectCommand; }
set { _selectCommand = value; }
set { _selectCommand = (SqlCommand)value; }
}
- new public SqlCommand UpdateCommand
+ public new SqlCommand UpdateCommand
{
get { return _updateCommand; }
set { _updateCommand = value; }
#endregion
[Conditional("DEBUG")]
- static private void AssertPathFormat(string path)
+ private static void AssertPathFormat(string path)
{
Debug.Assert(path != null);
Debug.Assert(path == path.Trim());
Debug.Assert(path.StartsWith(@"\\", StringComparison.OrdinalIgnoreCase));
}
- static private string GetFullPathInternal(string path)
+ private static string GetFullPathInternal(string path)
{
//-----------------------------------------------------------------
// precondition validation should be validated by callers of this method
// This method exists to ensure that the requested path name is unique so that SMB/DNS is prevented
// from collapsing a file open request to a file handle opened previously. In the SQL FILESTREAM case,
// this would likely be a file open in another transaction, so this mechanism ensures isolation.
- static private string InitializeNtPath(string path)
+ private static string InitializeNtPath(string path)
{
// Ensure we have validated and normalized the path before
AssertPathFormat(path);
protected abstract byte[] GetDTCAddress();
- static private byte[] GetTransactionCookie(Transaction transaction, byte[] whereAbouts)
+ private static byte[] GetTransactionCookie(Transaction transaction, byte[] whereAbouts)
{
byte[] transactionCookie = null;
if (null != transaction)
}
public override bool IsFixedSize => ((System.Collections.IList)InnerList).IsFixedSize;
public override bool IsReadOnly => ((System.Collections.IList)InnerList).IsReadOnly;
- new public SqlParameter this[int index]
+ public new SqlParameter this[int index]
{
get
{
}
}
- new public SqlParameter this[string parameterName]
+ public new SqlParameter this[string parameterName]
{
get
{
{
}
- new public SqlCommand Command
+ public new SqlCommand Command
{
get
{
{
}
- new public SqlCommand Command
+ public new SqlCommand Command
{
get { return (base.Command as SqlCommand); }
set { base.Command = value; }
get { return s_singletonEncoding; }
}
- sealed private class SqlUnicodeDecoder : Decoder
+ private sealed class SqlUnicodeDecoder : Decoder
{
public override int GetCharCount(byte[] bytes, int index, int count)
{
// PROPERTIES
////////////////////////////////////////////////////////////////////////////////////////
- new public SqlConnection Connection
+ public new SqlConnection Connection
{
get
{
{
return ADP.InvalidOperation(SR.GetString(SR.SQL_ChangePasswordRequiresYukon));
}
- static internal Exception ChangePasswordUseOfUnallowedKey(string key)
+ internal static Exception ChangePasswordUseOfUnallowedKey(string key)
{
return ADP.InvalidOperation(SR.GetString(SR.SQL_ChangePasswordUseOfUnallowedKey, key));
}
{
return ADP.InvalidOperation(SR.GetString(SR.SQL_ParsingError));
}
- static internal Exception ParsingError(ParsingErrorState state)
+ internal static Exception ParsingError(ParsingErrorState state)
{
return ADP.InvalidOperation(SR.GetString(SR.SQL_ParsingErrorWithState, ((int)state).ToString(CultureInfo.InvariantCulture)));
}
- static internal Exception ParsingErrorValue(ParsingErrorState state, int value)
+ internal static Exception ParsingErrorValue(ParsingErrorState state, int value)
{
return ADP.InvalidOperation(SR.GetString(SR.SQL_ParsingErrorValue, ((int)state).ToString(CultureInfo.InvariantCulture), value));
}
- static internal Exception ParsingErrorFeatureId(ParsingErrorState state, int featureId)
+ internal static Exception ParsingErrorFeatureId(ParsingErrorState state, int featureId)
{
return ADP.InvalidOperation(SR.GetString(SR.SQL_ParsingErrorFeatureId, ((int)state).ToString(CultureInfo.InvariantCulture), featureId));
}
/// <summary>
/// This class holds methods invoked on System.Transactions through reflection for Global Transactions
/// </summary>
- static internal class SysTxForGlobalTransactions
+ internal static class SysTxForGlobalTransactions
{
private static readonly Lazy<MethodInfo> _enlistPromotableSinglePhase = new Lazy<MethodInfo>(() =>
typeof(Transaction).GetMethod("EnlistPromotableSinglePhase", new Type[] { typeof(IPromotableSinglePhaseNotification), typeof(Guid) }));
// SSPI variables
- private volatile static uint s_maxSSPILength = 0; // variable to hold max SSPI data size, keep for token from server
+ private static volatile uint s_maxSSPILength = 0; // variable to hold max SSPI data size, keep for token from server
// textptr sequence
private static readonly byte[] s_longDataHeader = { 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
internal CounterSet _counterSet;
internal string _instName;
private int _active;
- unsafe internal Interop.PerfCounter.PerfCounterSetInstanceStruct* _nativeInst;
+ internal unsafe Interop.PerfCounter.PerfCounterSetInstanceStruct* _nativeInst;
internal unsafe CounterSetInstance(CounterSet counterSetDefined, string instanceName)
{
/// </summary>
public sealed class CounterData
{
- unsafe private long* _offset;
+ private unsafe long* _offset;
/// <summary>
/// CounterData constructor
/// </summary>
/// <param name="pCounterData"> The memory location to store raw counter data </param>
- unsafe internal CounterData(long* pCounterData)
+ internal unsafe CounterData(long* pCounterData)
{
_offset = pCounterData;
*_offset = 0;
internal CounterSetInstance _instance;
private Dictionary<int, CounterData> _counters;
private int _disposed;
- unsafe internal byte* _dataBlock;
+ internal unsafe byte* _dataBlock;
internal CounterSetInstanceCounterDataSet(CounterSetInstance thisInst)
{
public static extern int GetProcessId(SafeProcessHandle nativeHandle);
[DllImport("kernel32.dll")]
- internal extern static int GetConsoleCP();
+ internal static extern int GetConsoleCP();
[DllImport("kernel32.dll")]
- internal extern static int GetConsoleOutputCP();
+ internal static extern int GetConsoleOutputCP();
[DllImport("kernel32.dll")]
- internal extern static int SetConsoleCP(int codePage);
+ internal static extern int SetConsoleCP(int codePage);
[DllImport("kernel32.dll")]
- internal extern static int SetConsoleOutputCP(int codePage);
+ internal static extern int SetConsoleOutputCP(int codePage);
[DllImport("netapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- internal extern static uint NetUserAdd(string servername, uint level, ref USER_INFO_1 buf, out uint parm_err);
+ internal static extern uint NetUserAdd(string servername, uint level, ref USER_INFO_1 buf, out uint parm_err);
[DllImport("netapi32.dll")]
- internal extern static uint NetUserDel(string servername, string username);
+ internal static extern uint NetUserDel(string servername, string username);
[DllImport("advapi32.dll")]
internal static extern bool OpenProcessToken(SafeProcessHandle ProcessHandle, uint DesiredAccess, out SafeProcessHandle TokenHandle);
}
[DllImport("kernel32")]
- private extern static int GetCurrentThreadId();
+ private static extern int GetCurrentThreadId();
}
}
// Note that, since computer is a derived class of user in AD, if you don't want to confuse
// computers with users, you must test an object for computer status before testing it for
// user status.
- static internal bool IsOfObjectClass(DirectoryEntry de, string classToCompare)
+ internal static bool IsOfObjectClass(DirectoryEntry de, string classToCompare)
{
return de.Properties["objectClass"].Contains(classToCompare);
}
- static internal bool IsOfObjectClass(SearchResult sr, string classToCompare)
+ internal static bool IsOfObjectClass(SearchResult sr, string classToCompare)
{
return sr.Properties["objectClass"].Contains(classToCompare);
}
// Retrieves the name of the actual server that the DirectoryEntry is connected to
- static internal string GetServerName(DirectoryEntry de)
+ internal static string GetServerName(DirectoryEntry de)
{
UnsafeNativeMethods.IAdsObjectOptions objOptions = (UnsafeNativeMethods.IAdsObjectOptions)de.NativeObject;
return (string)objOptions.GetOption(0 /* == ADS_OPTION_SERVERNAME */);
// This routine escapes values used in DNs, per RFC 2253 and ADSI escaping rules.
// It treats its input as a unescaped literal and produces a LDAP string that represents that literal
// and that is escaped according to RFC 2253 and ADSI rules for DN components.
- static internal string EscapeDNComponent(string dnComponent)
+ internal static string EscapeDNComponent(string dnComponent)
{
//
// From RFC 2254:
// This routine escapes values used in search filters, per RFC 2254 escaping rules.
// It treats its input as a unescaped literal and produces a LDAP string that represents that literal
// and that is escaped according to RFC 2254 rules.
- static internal string EscapeRFC2254SpecialChars(string s)
+ internal static string EscapeRFC2254SpecialChars(string s)
{
StringBuilder sb = new StringBuilder(s.Length);
// It treats its input string as a PAPI string filter (escaped according to
// PAPI rules, and possibly containing wildcards), and produces a string
// escaped to RFC 2254 rules and possibly containing wildcards.
- static internal string PAPIQueryToLdapQueryString(string papiString)
+ internal static string PAPIQueryToLdapQueryString(string papiString)
{
//
// Wildcard
return sb.ToString();
}
- static internal string EscapeBinaryValue(byte[] bytes)
+ internal static string EscapeBinaryValue(byte[] bytes)
{
StringBuilder sb = new StringBuilder(bytes.Length * 3);
return sb.ToString();
}
- static internal string DateTimeToADString(DateTime dateTime)
+ internal static string DateTimeToADString(DateTime dateTime)
{
// DateTime --> FILETIME --> stringized FILETIME
return fileTime.ToString(CultureInfo.InvariantCulture);
}
- static internal DateTime ADFileTimeToDateTime(long filetime)
+ internal static DateTime ADFileTimeToDateTime(long filetime)
{
// int64 FILETIME --> DateTime
return DateTime.FromFileTimeUtc(filetime);
}
- static internal long DateTimeToADFileTime(DateTime dt)
+ internal static long DateTimeToADFileTime(DateTime dt)
{
// DateTime --> int64 FILETIME
return dt.ToFileTimeUtc();
}
- static internal long LargeIntToInt64(UnsafeNativeMethods.IADsLargeInteger largeInt)
+ internal static long LargeIntToInt64(UnsafeNativeMethods.IADsLargeInteger largeInt)
{
uint lowPart = (uint)largeInt.LowPart;
uint highPart = (uint)largeInt.HighPart;
// Transform from hex string ("1AFF") to LDAP hex string ("\1A\FF").
// Returns null if input string is not a valid hex string.
- static internal string HexStringToLdapHexString(string s)
+ internal static string HexStringToLdapHexString(string s)
{
Debug.Assert(s != null);
return sb.ToString();
}
- static internal bool ArePrincipalsInSameForest(Principal p1, Principal p2)
+ internal static bool ArePrincipalsInSameForest(Principal p1, Principal p2)
{
string p1DnsForestName = ((ADStoreCtx)p1.GetStoreCtxToUse()).DnsForestName;
string p2DnsForestName = ((ADStoreCtx)p2.GetStoreCtxToUse()).DnsForestName;
/// Otherwise return false
/// </returns>
///
- static internal bool AreSidsInSameDomain(SecurityIdentifier sid1, SecurityIdentifier sid2)
+ internal static bool AreSidsInSameDomain(SecurityIdentifier sid1, SecurityIdentifier sid2)
{
if (sid1.IsAccountSid() && sid2.IsAccountSid())
{
}
}
- static internal Principal DirectoryEntryAsPrincipal(DirectoryEntry de, ADStoreCtx storeCtx)
+ internal static Principal DirectoryEntryAsPrincipal(DirectoryEntry de, ADStoreCtx storeCtx)
{
if (ADUtils.IsOfObjectClass(de, "computer") ||
ADUtils.IsOfObjectClass(de, "user") ||
}
}
- static internal Principal SearchResultAsPrincipal(SearchResult sr, ADStoreCtx storeCtx, object discriminant)
+ internal static Principal SearchResultAsPrincipal(SearchResult sr, ADStoreCtx storeCtx, object discriminant)
{
if (ADUtils.IsOfObjectClass(sr, "computer") ||
ADUtils.IsOfObjectClass(sr, "user") ||
// domain or the current forest and the target domain's forest.
// target domain must be the full DNS domain name of the target domain to make the string
// compare below work properly.
- static internal bool VerifyOutboundTrust(string targetDomain, string username, string password)
+ internal static bool VerifyOutboundTrust(string targetDomain, string username, string password)
{
Domain currentDom = null;
return false;
}
- static internal string RetriveWkDn(DirectoryEntry deBase, string defaultNamingContext, string serverName, byte[] wellKnownContainerGuid)
+ internal static string RetriveWkDn(DirectoryEntry deBase, string defaultNamingContext, string serverName, byte[] wellKnownContainerGuid)
{
/*
bool w2k3Supported = false;
_disposeDirEntry = disposeDirEntry;
}
- new public IEnumerator GetEnumerator()
+ public new IEnumerator GetEnumerator()
{
return this;
}
// To stop the compiler from autogenerating a constructor for this class
private SDSUtils() { }
- static internal Principal SearchResultToPrincipal(SearchResult sr, PrincipalContext owningContext, Type principalType)
+ internal static Principal SearchResultToPrincipal(SearchResult sr, PrincipalContext owningContext, Type principalType)
{
Principal p;
return p;
}
// Used to implement StoreCtx.GetAsPrincipal for AD and SAM
- static internal Principal DirectoryEntryToPrincipal(DirectoryEntry de, PrincipalContext owningContext, Type principalType)
+ internal static Principal DirectoryEntryToPrincipal(DirectoryEntry de, PrincipalContext owningContext, Type principalType)
{
Principal p;
return ADUtils.IsOfObjectClass(de, className);
}
}
- static internal AuthenticationTypes MapOptionsToAuthTypes(ContextOptions options)
+ internal static AuthenticationTypes MapOptionsToAuthTypes(ContextOptions options)
{
AuthenticationTypes authTypes = AuthenticationTypes.Secure;
return authTypes;
}
- static internal void MoveDirectoryEntry(DirectoryEntry deToMove, DirectoryEntry newParent, string newName)
+ internal static void MoveDirectoryEntry(DirectoryEntry deToMove, DirectoryEntry newParent, string newName)
{
if (newName != null)
deToMove.MoveTo(newParent, newName);
deToMove.MoveTo(newParent);
}
- static internal void DeleteDirectoryEntry(DirectoryEntry deToDelete)
+ internal static void DeleteDirectoryEntry(DirectoryEntry deToDelete)
{
DirectoryEntry deParent = deToDelete.Parent;
}
}
- static internal void InsertPrincipal(
+ internal static void InsertPrincipal(
Principal p,
StoreCtx storeCtx,
GroupMembershipUpdater updateGroupMembership,
internal delegate void GroupMembershipUpdater(Principal p, DirectoryEntry de, NetCred credentials, AuthenticationTypes authTypes);
- static internal void ApplyChangesToDirectory(
+ internal static void ApplyChangesToDirectory(
Principal p,
StoreCtx storeCtx,
GroupMembershipUpdater updateGroupMembership,
}
}
- static internal void SetPassword(DirectoryEntry de, string newPassword)
+ internal static void SetPassword(DirectoryEntry de, string newPassword)
{
Debug.Assert(newPassword != null); // but it could be an empty string
Debug.Assert(de != null);
}
}
- static internal void ChangePassword(DirectoryEntry de, string oldPassword, string newPassword)
+ internal static void ChangePassword(DirectoryEntry de, string oldPassword, string newPassword)
{
Debug.Assert(newPassword != null); // but it could be an empty string
Debug.Assert(oldPassword != null); // but it could be an empty string
}
}
- static internal DirectoryEntry BuildDirectoryEntry(string path, NetCred credentials, AuthenticationTypes authTypes)
+ internal static DirectoryEntry BuildDirectoryEntry(string path, NetCred credentials, AuthenticationTypes authTypes)
{
DirectoryEntry de = new DirectoryEntry(path,
credentials != null ? credentials.UserName : null,
return de;
}
- static internal DirectoryEntry BuildDirectoryEntry(NetCred credentials, AuthenticationTypes authTypes)
+ internal static DirectoryEntry BuildDirectoryEntry(NetCred credentials, AuthenticationTypes authTypes)
{
DirectoryEntry de = new DirectoryEntry();
return de;
}
- static internal void WriteAttribute<T>(string dePath, string attribute, T value, NetCred credentials, AuthenticationTypes authTypes)
+ internal static void WriteAttribute<T>(string dePath, string attribute, T value, NetCred credentials, AuthenticationTypes authTypes)
{
Debug.Assert(attribute != null && attribute.Length > 0);
}
}
- static internal void WriteAttribute(string dePath, string attribute, int value, NetCred credentials, AuthenticationTypes authTypes)
+ internal static void WriteAttribute(string dePath, string attribute, int value, NetCred credentials, AuthenticationTypes authTypes)
{
GlobalDebug.WriteLineIf(
GlobalDebug.Info,
//
// S.DS (LDAP or WinNT) --> PAPI conversion routines
//
- static internal void SingleScalarFromDirectoryEntry<T>(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName)
+ internal static void SingleScalarFromDirectoryEntry<T>(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName)
{
if (properties[suggestedProperty].Count != 0 && properties[suggestedProperty][0] != null)
{
}
}
- static internal void MultiScalarFromDirectoryEntry<T>(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName)
+ internal static void MultiScalarFromDirectoryEntry<T>(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName)
{
dSPropertyValueCollection values = properties[suggestedProperty];
p.LoadValueIntoProperty(propertyName, list);
}
- static internal bool StatusFromAccountControl(int uacValue, string propertyName)
+ internal static bool StatusFromAccountControl(int uacValue, string propertyName)
{
bool flag = false;
return flag;
}
- static internal void AccountControlFromDirectoryEntry(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName, bool testCantChangePassword)
+ internal static void AccountControlFromDirectoryEntry(dSPropertyCollection properties, string suggestedProperty, Principal p, string propertyName, bool testCantChangePassword)
{
Debug.Assert(
(!testCantChangePassword && (string.Equals(suggestedProperty, "userAccountControl", StringComparison.OrdinalIgnoreCase))) ||
// PAPI --> S.DS (LDAP or WinNT) conversion routines
//
- static internal void MultiStringToDirectoryEntryConverter(Principal p, string propertyName, DirectoryEntry de, string suggestedProperty)
+ internal static void MultiStringToDirectoryEntryConverter(Principal p, string propertyName, DirectoryEntry de, string suggestedProperty)
{
PrincipalValueCollection<string> trackingList = (PrincipalValueCollection<string>)p.GetValueForProperty(propertyName);
internal const int AD_DefaultUAC_Machine = (int)(0x1000 | 0X20 | 0x2); // UF_WORKSTATION_TRUST_ACCOUNT | UF_PASSWD_NOTREQD | UF_ACCOUNTDISABLE
internal const int SAM_DefaultUAC = (int)(0x200 | 0x1); // UF_NORMAL_ACCOUNT | UF_SCRIPT
- static internal void AccountControlToDirectoryEntry(
+ internal static void AccountControlToDirectoryEntry(
Principal p,
string propertyName,
DirectoryEntry de,
de.Properties[suggestedProperty].Value = uacValue;
}
- static internal DirectorySearcher ConstructSearcher(DirectoryEntry de)
+ internal static DirectorySearcher ConstructSearcher(DirectoryEntry de)
{
DirectorySearcher ds = new DirectorySearcher(de);
ds.ClientTimeout = new TimeSpan(0, 0, 30);
return ds;
}
- static internal bool IsObjectFromGC(string path)
+ internal static bool IsObjectFromGC(string path)
{
return path.StartsWith("GC:", StringComparison.OrdinalIgnoreCase);
}
- static internal string ConstructDnsDomainNameFromDn(string dn)
+ internal static string ConstructDnsDomainNameFromDn(string dn)
{
// Split the DN into its RDNs
string[] ncComponents = dn.Split(new char[] { ',' });
this.Enabled = enabled;
}
- static internal AuthenticablePrincipal MakeAuthenticablePrincipal(PrincipalContext ctx)
+ internal static AuthenticablePrincipal MakeAuthenticablePrincipal(PrincipalContext ctx)
{
AuthenticablePrincipal ap = new AuthenticablePrincipal(ctx);
ap.unpersisted = false;
//
// Internal "constructor": Used for constructing Computer returned by a query
//
- static internal ComputerPrincipal MakeComputer(PrincipalContext ctx)
+ internal static ComputerPrincipal MakeComputer(PrincipalContext ctx)
{
ComputerPrincipal computer = new ComputerPrincipal(ctx);
computer.unpersisted = false;
WinLH = 3
};
- static internal class CapabilityMap
+ internal static class CapabilityMap
{
public const string LDAP_CAP_ACTIVE_DIRECTORY_OID = "1.2.840.113556.1.4.800";
public const string LDAP_CAP_ACTIVE_DIRECTORY_V51_OID = "1.2.840.113556.1.4.1670";
#if TESTHOOK
- static public PrincipalContext Test
+ public static PrincipalContext Test
{
get
{
}
}
- static public PrincipalContext TestAltValidation
+ public static PrincipalContext TestAltValidation
{
get
{
}
}
- static public PrincipalContext TestNoTimeLimited
+ public static PrincipalContext TestNoTimeLimited
{
get
{
}
}
- static internal string ReadStructuralObjectClass(Type principalType)
+ internal static string ReadStructuralObjectClass(Type principalType)
{
DirectoryObjectClassAttribute[] MyAttribute =
(DirectoryObjectClassAttribute[])Attribute.GetCustomAttributes(principalType, typeof(DirectoryObjectClassAttribute), false);
public const DebugLevel DefaultDebugLevel = DebugLevel.None;
#endif
- static public DebugLevel DebugLevel
+ public static DebugLevel DebugLevel
{
get
{
}
}
- static public string DebugLogFile
+ public static string DebugLogFile
{
get
{
#endif
}
- static public bool Error
+ public static bool Error
{
get { return DebugLevel.Error >= GlobalDebug.s_debugLevel; }
}
- static public bool Warn
+ public static bool Warn
{
get { return DebugLevel.Warn >= GlobalDebug.s_debugLevel; }
}
- static public bool Info
+ public static bool Info
{
get { return DebugLevel.Info >= GlobalDebug.s_debugLevel; }
}
[ConditionalAttribute("DEBUG")]
- static public void WriteLineIf(bool f, string category, string message, params object[] args)
+ public static void WriteLineIf(bool f, string category, string message, params object[] args)
{
message = "[" + SafeNativeMethods.GetCurrentThreadId().ToString("x", CultureInfo.InvariantCulture) + "] " + message;
}
[ConditionalAttribute("DEBUG")]
- static public void WriteLineIf(bool f, string category, string message)
+ public static void WriteLineIf(bool f, string category, string message)
{
message = "[" + SafeNativeMethods.GetCurrentThreadId().ToString("x", CultureInfo.InvariantCulture) + "] " + message;
//
// Internal "constructor": Used for constructing Groups returned by a query
//
- static internal GroupPrincipal MakeGroup(PrincipalContext ctx)
+ internal static GroupPrincipal MakeGroup(PrincipalContext ctx)
{
GroupPrincipal g = new GroupPrincipal(ctx);
g.unpersisted = false;
public string UrnScheme
{
- set { _urnScheme = value; }
get { return _urnScheme; }
+ set { _urnScheme = value; }
}
private string _urnValue;
{IdentityType.Sid, IdentityTypeStringMap.Sid},
{IdentityType.Guid, IdentityTypeStringMap.Guid}};
}
- static internal class IdentityTypeStringMap
+ internal static class IdentityTypeStringMap
{
public const string Guid = "ms-guid";
public const string Sid = "ms-sid";
internal bool Loaded
{
- set
- {
- _loaded = value;
- }
get
{
return _loaded;
}
+ set
+ {
+ _loaded = value;
+ }
}
// A low-level way for derived classes to access the ctx field. Note this is intended for internal use only,
}
}
- static internal Principal MakePrincipal(PrincipalContext ctx, Type principalType)
+ internal static Principal MakePrincipal(PrincipalContext ctx, Type principalType)
{
Principal p = null;
// Given a property name, constructs and returns the appropriate individual property
// filter
- static public object CreateFilter(string propertyName)
+ public static object CreateFilter(string propertyName)
{
GlobalDebug.WriteLineIf(GlobalDebug.Info, "QbeFilterDescription", "FilterFactory.CreateFilter: name=" + propertyName);
// To stop the compiler from autogenerating a constructor for this class
private SAMUtils() { }
- static internal bool IsOfObjectClass(DirectoryEntry de, string classToCompare)
+ internal static bool IsOfObjectClass(DirectoryEntry de, string classToCompare)
{
return string.Equals(de.SchemaClassName, classToCompare, StringComparison.OrdinalIgnoreCase);
}
return true;
}
- static internal Principal DirectoryEntryAsPrincipal(DirectoryEntry de, StoreCtx storeCtx)
+ internal static Principal DirectoryEntryAsPrincipal(DirectoryEntry de, StoreCtx storeCtx)
{
string className = de.SchemaClassName;
//
//
- static internal string PAPIQueryToRegexString(string papiString)
+ internal static string PAPIQueryToRegexString(string papiString)
{
StringBuilder sb = new StringBuilder(papiString.Length);
//
// Internal "constructor": Used for constructing UnknownPrincipal
//
- static internal UnknownPrincipal CreateUnknownPrincipal(PrincipalContext ctx, byte[] sid, string name)
+ internal static UnknownPrincipal CreateUnknownPrincipal(PrincipalContext ctx, byte[] sid, string name)
{
UnknownPrincipal up = new UnknownPrincipal(ctx);
up.unpersisted = false;
namespace System.DirectoryServices.AccountManagement
{
- static internal class UrnScheme
+ internal static class UrnScheme
{
public const string GuidScheme = IdentityTypeStringMap.Guid;
public const string SidScheme = IdentityTypeStringMap.Sid;
//
// Internal "constructor": Used for constructing Users returned by a query
//
- static internal UserPrincipal MakeUser(PrincipalContext ctx)
+ internal static UserPrincipal MakeUser(PrincipalContext ctx)
{
UserPrincipal u = new UserPrincipal(ctx);
u.unpersisted = false;
}
- static internal Principal ConstructFakePrincipalFromSID(
+ internal static Principal ConstructFakePrincipalFromSID(
byte[] sid,
PrincipalContext ctx,
string serverName,
private SafeNativeMethods() { }
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCurrentThreadId", CharSet = CharSet.Unicode)]
- static extern public int GetCurrentThreadId();
+ public static extern int GetCurrentThreadId();
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaNtStatusToWinError", CharSet = CharSet.Unicode)]
- static extern public int LsaNtStatusToWinError(int ntStatus);
+ public static extern int LsaNtStatusToWinError(int ntStatus);
}
internal class UnsafeNativeMethods
}
[DllImport("authz.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "AuthzInitializeResourceManager", CharSet = CharSet.Unicode)]
- static extern public bool AuthzInitializeResourceManager(
+ public static extern bool AuthzInitializeResourceManager(
int flags,
IntPtr pfnAccessCheck,
IntPtr pfnComputeDynamicGroups,
);
*/
[DllImport("authz.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "AuthzInitializeContextFromSid", CharSet = CharSet.Unicode)]
- static extern public bool AuthzInitializeContextFromSid(
+ public static extern bool AuthzInitializeContextFromSid(
int Flags,
IntPtr UserSid,
IntPtr AuthzResourceManager,
);
*/
[DllImport("authz.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "AuthzGetInformationFromContext", CharSet = CharSet.Unicode)]
- static extern public bool AuthzGetInformationFromContext(
+ public static extern bool AuthzGetInformationFromContext(
IntPtr hAuthzClientContext,
int InfoClass,
int BufferSize,
);
[DllImport("authz.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "AuthzFreeContext", CharSet = CharSet.Unicode)]
- static extern public bool AuthzFreeContext(
+ public static extern bool AuthzFreeContext(
IntPtr AuthzClientContext
);
[DllImport("authz.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "AuthzFreeResourceManager", CharSet = CharSet.Unicode)]
- static extern public bool AuthzFreeResourceManager(
+ public static extern bool AuthzFreeResourceManager(
IntPtr rm
);
}
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "OpenThreadToken", CharSet = CharSet.Unicode)]
- static extern public bool OpenThreadToken(
+ public static extern bool OpenThreadToken(
IntPtr threadHandle,
int desiredAccess,
bool openAsSelf,
);
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "OpenProcessToken", CharSet = CharSet.Unicode)]
- static extern public bool OpenProcessToken(
+ public static extern bool OpenProcessToken(
IntPtr processHandle,
int desiredAccess,
ref IntPtr tokenHandle
);
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "CloseHandle", CharSet = CharSet.Unicode)]
- static extern public bool CloseHandle(IntPtr handle);
+ public static extern bool CloseHandle(IntPtr handle);
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCurrentThread", CharSet = CharSet.Unicode)]
- static extern public IntPtr GetCurrentThread();
+ public static extern IntPtr GetCurrentThread();
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCurrentProcess", CharSet = CharSet.Unicode)]
- static extern public IntPtr GetCurrentProcess();
+ public static extern IntPtr GetCurrentProcess();
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "GetTokenInformation", CharSet = CharSet.Unicode)]
- static extern public bool GetTokenInformation(
+ public static extern bool GetTokenInformation(
IntPtr tokenHandle,
int tokenInformationClass,
IntPtr buffer,
);
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaOpenPolicy", CharSet = CharSet.Unicode)]
- static extern public int LsaOpenPolicy(
+ public static extern int LsaOpenPolicy(
IntPtr lsaUnicodeString,
IntPtr lsaObjectAttributes,
int desiredAccess,
ref IntPtr policyHandle);
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaQueryInformationPolicy", CharSet = CharSet.Unicode)]
- static extern public int LsaQueryInformationPolicy(
+ public static extern int LsaQueryInformationPolicy(
IntPtr policyHandle,
int policyInformationClass,
ref IntPtr buffer
);
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaFreeMemory", CharSet = CharSet.Unicode)]
- static extern public int LsaFreeMemory(IntPtr buffer);
+ public static extern int LsaFreeMemory(IntPtr buffer);
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaClose", CharSet = CharSet.Unicode)]
- static extern public int LsaClose(IntPtr policyHandle);
+ public static extern int LsaClose(IntPtr policyHandle);
//
// Impersonation
//
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "LogonUserW", CharSet = CharSet.Unicode)]
- static extern public int LogonUser(
+ public static extern int LogonUser(
string lpszUsername,
string lpszDomain,
string lpszPassword,
ref IntPtr phToken);
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "ImpersonateLoggedOnUser", CharSet = CharSet.Unicode)]
- static extern public int ImpersonateLoggedOnUser(IntPtr hToken);
+ public static extern int ImpersonateLoggedOnUser(IntPtr hToken);
[DllImport("Advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "RevertToSelf", CharSet = CharSet.Unicode)]
- static extern public int RevertToSelf();
+ public static extern int RevertToSelf();
}
}
public static extern IntPtr LoadLibrary(string name);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- public extern static uint FreeLibrary(IntPtr libName);
+ public static extern uint FreeLibrary(IntPtr libName);
[DllImport("kernel32.dll", EntryPoint = "GetProcAddress", SetLastError = true, BestFitMapping = false)]
- public extern static IntPtr GetProcAddress(LoadLibrarySafeHandle hModule, string entryPoint);
+ public static extern IntPtr GetProcAddress(LoadLibrarySafeHandle hModule, string entryPoint);
/*
DWORD DsRoleGetPrimaryDomainInformation(
public static extern bool CopySid(int destinationLength, IntPtr pSidDestination, IntPtr pSidSource);
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "OpenThreadToken", CharSet = CharSet.Unicode)]
- static extern public bool OpenThreadToken(
+ public static extern bool OpenThreadToken(
IntPtr threadHandle,
int desiredAccess,
bool openAsSelf,
);
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "OpenProcessToken", CharSet = CharSet.Unicode)]
- static extern public bool OpenProcessToken(
+ public static extern bool OpenProcessToken(
IntPtr processHandle,
int desiredAccess,
ref IntPtr tokenHandle
);
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCurrentThread", CharSet = CharSet.Unicode)]
- static extern public IntPtr GetCurrentThread();
+ public static extern IntPtr GetCurrentThread();
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCurrentProcess", CharSet = CharSet.Unicode)]
- static extern public IntPtr GetCurrentProcess();
+ public static extern IntPtr GetCurrentProcess();
[DllImport("advapi32.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall, EntryPoint = "GetTokenInformation", CharSet = CharSet.Unicode)]
- static extern public bool GetTokenInformation(
+ public static extern bool GetTokenInformation(
IntPtr tokenHandle,
int tokenInformationClass,
IntPtr buffer,
);
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaOpenPolicy", CharSet = CharSet.Unicode)]
- static extern public int LsaOpenPolicy(
+ public static extern int LsaOpenPolicy(
IntPtr lsaUnicodeString,
IntPtr lsaObjectAttributes,
int desiredAccess,
ref IntPtr policyHandle);
[DllImport("advapi32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "LsaQueryInformationPolicy", CharSet = CharSet.Unicode)]
- static extern public int LsaQueryInformationPolicy(
+ public static extern int LsaQueryInformationPolicy(
IntPtr policyHandle,
int policyInformationClass,
ref IntPtr buffer
Dispose();
}
- static internal float systemDpiX
+ internal static float systemDpiX
{
get
{
}
}
- static internal float systemDpiY
+ internal static float systemDpiY
{
get
{
{
// Some special X11 stuff
[DllImport("libX11", EntryPoint = "XOpenDisplay")]
- internal extern static IntPtr XOpenDisplay(IntPtr display);
+ internal static extern IntPtr XOpenDisplay(IntPtr display);
[DllImport("libX11", EntryPoint = "XCloseDisplay")]
- internal extern static int XCloseDisplay(IntPtr display);
+ internal static extern int XCloseDisplay(IntPtr display);
[DllImport("libX11", EntryPoint = "XRootWindow")]
- internal extern static IntPtr XRootWindow(IntPtr display, int screen);
+ internal static extern IntPtr XRootWindow(IntPtr display, int screen);
[DllImport("libX11", EntryPoint = "XDefaultScreen")]
- internal extern static int XDefaultScreen(IntPtr display);
+ internal static extern int XDefaultScreen(IntPtr display);
[DllImport("libX11", EntryPoint = "XDefaultDepth")]
- internal extern static uint XDefaultDepth(IntPtr display, int screen);
+ internal static extern uint XDefaultDepth(IntPtr display, int screen);
[DllImport("libX11", EntryPoint = "XGetImage")]
- internal extern static IntPtr XGetImage(IntPtr display, IntPtr drawable, int src_x, int src_y, int width, int height, int pane, int format);
+ internal static extern IntPtr XGetImage(IntPtr display, IntPtr drawable, int src_x, int src_y, int width, int height, int pane, int format);
[DllImport("libX11", EntryPoint = "XGetPixel")]
- internal extern static int XGetPixel(IntPtr image, int x, int y);
+ internal static extern int XGetPixel(IntPtr image, int x, int y);
[DllImport("libX11", EntryPoint = "XDestroyImage")]
- internal extern static int XDestroyImage(IntPtr image);
+ internal static extern int XDestroyImage(IntPtr image);
[DllImport("libX11", EntryPoint = "XDefaultVisual")]
- internal extern static IntPtr XDefaultVisual(IntPtr display, int screen);
+ internal static extern IntPtr XDefaultVisual(IntPtr display, int screen);
[DllImport("libX11", EntryPoint = "XGetVisualInfo")]
- internal extern static IntPtr XGetVisualInfo(IntPtr display, int vinfo_mask, ref XVisualInfo vinfo_template, ref int nitems);
+ internal static extern IntPtr XGetVisualInfo(IntPtr display, int vinfo_mask, ref XVisualInfo vinfo_template, ref int nitems);
[DllImport("libX11", EntryPoint = "XVisualIDFromVisual")]
- internal extern static IntPtr XVisualIDFromVisual(IntPtr visual);
+ internal static extern IntPtr XVisualIDFromVisual(IntPtr visual);
[DllImport("libX11", EntryPoint = "XFree")]
- internal extern static void XFree(IntPtr data);
+ internal static extern void XFree(IntPtr data);
}
}
internal static class MarshallingHelpers
{
// Copies a Ptr to an array of Points and releases the memory
- static public void FromUnManagedMemoryToPointI(IntPtr prt, Point[] pts)
+ public static void FromUnManagedMemoryToPointI(IntPtr prt, Point[] pts)
{
int nPointSize = Marshal.SizeOf(pts[0]);
IntPtr pos = prt;
}
// Copies a Ptr to an array of Points and releases the memory
- static public void FromUnManagedMemoryToPoint(IntPtr prt, PointF[] pts)
+ public static void FromUnManagedMemoryToPoint(IntPtr prt, PointF[] pts)
{
int nPointSize = Marshal.SizeOf(pts[0]);
IntPtr pos = prt;
}
// Copies an array of Points to unmanaged memory
- static public IntPtr FromPointToUnManagedMemoryI(Point[] pts)
+ public static IntPtr FromPointToUnManagedMemoryI(Point[] pts)
{
int nPointSize = Marshal.SizeOf(pts[0]);
IntPtr dest = Marshal.AllocHGlobal(nPointSize * pts.Length);
}
// Copies an array of Points to unmanaged memory
- static public IntPtr FromPointToUnManagedMemory(PointF[] pts)
+ public static IntPtr FromPointToUnManagedMemory(PointF[] pts)
{
int nPointSize = Marshal.SizeOf(pts[0]);
IntPtr dest = Marshal.AllocHGlobal(nPointSize * pts.Length);
internal const int CAL_UMALQURA = 23;
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static int GetLocaleInfoEx(string lpLocaleName, uint LCType, StringBuilder data, int cchData);
+ internal static extern int GetLocaleInfoEx(string lpLocaleName, uint LCType, StringBuilder data, int cchData);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static int GetLocaleInfoEx(string lpLocaleName, uint LCType, ref int data, int cchData);
+ internal static extern int GetLocaleInfoEx(string lpLocaleName, uint LCType, ref int data, int cchData);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static bool EnumSystemLocalesEx(EnumLocalesProcEx lpLocaleEnumProcEx, uint dwFlags, IntPtr lParam, IntPtr reserved);
+ internal static extern bool EnumSystemLocalesEx(EnumLocalesProcEx lpLocaleEnumProcEx, uint dwFlags, IntPtr lParam, IntPtr reserved);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static int GetCalendarInfoEx(string lpLocaleName, int Calendar, IntPtr lpReserved, uint CalType, StringBuilder lpCalData, int cchData, IntPtr lpValue);
+ internal static extern int GetCalendarInfoEx(string lpLocaleName, int Calendar, IntPtr lpReserved, uint CalType, StringBuilder lpCalData, int cchData, IntPtr lpValue);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static int GetCalendarInfoEx(string lpLocaleName, int Calendar, IntPtr lpReserved, uint CalType, StringBuilder lpCalData, int cchData, ref uint lpValue);
+ internal static extern int GetCalendarInfoEx(string lpLocaleName, int Calendar, IntPtr lpReserved, uint CalType, StringBuilder lpCalData, int cchData, ref uint lpValue);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static bool EnumCalendarInfoExEx(EnumCalendarInfoProcExEx pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string lpReserved, uint CalType, IntPtr lParam);
+ internal static extern bool EnumCalendarInfoExEx(EnumCalendarInfoProcExEx pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string lpReserved, uint CalType, IntPtr lParam);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
- internal extern static bool EnumTimeFormatsEx(EnumTimeFormatsProcEx lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, IntPtr lParam);
+ internal static extern bool EnumTimeFormatsEx(EnumTimeFormatsProcEx lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, IntPtr lParam);
public static IEnumerable<object[]> CultureInfo_TestData()
{
/// UTF-16 (Little Endian and Big Endian)
/// </summary>
/// <param name="reader">XmlReader</param>
- /// <returns>throws an exception if the encoding is not UTF-8 or UTF-16</returns>
internal static void PerformInitialReadAndVerifyEncoding(XmlReader reader)
{
Debug.Assert(reader != null && reader.ReadState == ReadState.Initial);
/// <param name="i">
/// The index of the attribute. The index is zero-based. (The first attribute has index 0.)
/// </param>
- /// <returns>
- /// true if the attribute is found; otherwise, false. If false, the reader's position does not change.
- /// </returns>
public override void MoveToAttribute(int i)
{
if (_ignoredAttributeCount == 0)
internal int BaudRate
{
+ get
+ {
+ return Interop.Termios.TermiosGetSpeed(_handle);
+ }
set
{
if (value != _baudRate)
_baudRate = value;
}
}
-
- get
- {
- return Interop.Termios.TermiosGetSpeed(_handle);
- }
}
public bool BreakState
private byte[] _tempBuf; // used to avoid multiple array allocations in ReadByte()
// called whenever any async i/o operation completes.
- private static unsafe readonly IOCompletionCallback s_IOCallback = new IOCompletionCallback(AsyncFSCallback);
+ private static readonly unsafe IOCompletionCallback s_IOCallback = new IOCompletionCallback(AsyncFSCallback);
// ----- new get-set properties -----------------*
// ----SUBSECTION: internal methods supporting public read/write methods-------*
- unsafe private SerialStreamAsyncResult BeginReadCore(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject)
+ private unsafe SerialStreamAsyncResult BeginReadCore(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject)
{
// Create and store async stream class library specific data in the
// async result
return asyncResult;
}
- unsafe private SerialStreamAsyncResult BeginWriteCore(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject)
+ private unsafe SerialStreamAsyncResult BeginWriteCore(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject)
{
// Create and store async stream class library specific data in the
// async result
// ----SUBSECTION: internal methods supporting events/async operation------*
// This is a the callback prompted when a thread completes any async I/O operation.
- unsafe private static void AsyncFSCallback(uint errorCode, uint numBytes, NativeOverlapped* pOverlapped)
+ private static unsafe void AsyncFSCallback(uint errorCode, uint numBytes, NativeOverlapped* pOverlapped)
{
// Extract async the result from overlapped structure
SerialStreamAsyncResult asyncResult =
// This is an internal object implementing IAsyncResult with fields
// for all of the relevant data necessary to complete the IO operation.
// This is used by AsyncFSCallback and all async methods.
- unsafe internal sealed class SerialStreamAsyncResult : IAsyncResult
+ internal unsafe sealed class SerialStreamAsyncResult : IAsyncResult
{
// User code callback
internal AsyncCallback _userCallback;
public partial class NullTests
{
[Fact]
- public async static Task TestNullStream_Flush()
+ public static async Task TestNullStream_Flush()
{
// Neither of these methods should have
// side effects, so call them twice to
}
[Fact]
- public async static Task TestNullStream_CopyTo()
+ public static async Task TestNullStream_CopyTo()
{
Stream source = Stream.Null;
}
[Fact]
- public async static Task TestNullStream_CopyToAsyncValidation()
+ public static async Task TestNullStream_CopyToAsyncValidation()
{
// Since Stream.Null previously inherited its CopyToAsync
// implementation from the base class, which did check its
[Theory]
[MemberData(nameof(NullStream_ReadWriteData))]
- public async static Task TestNullStream_Read(byte[] buffer, int offset, int count)
+ public static async Task TestNullStream_Read(byte[] buffer, int offset, int count)
{
byte[] copy = buffer?.ToArray();
Stream source = Stream.Null;
[Theory]
[MemberData(nameof(NullStream_ReadWriteData))]
- public async static Task TestNullStream_Write(byte[] buffer, int offset, int count)
+ public static async Task TestNullStream_Write(byte[] buffer, int offset, int count)
{
byte[] copy = buffer?.ToArray();
Stream source = Stream.Null;
_t = t;
}
- public new static CastInstruction Create(Type t)
+ public static new CastInstruction Create(Type t)
{
if (t.IsValueType && !t.IsNullableType())
{
class OperatorState<TKey>
{
- volatile internal int _updatesDone = 0;
+ internal volatile int _updatesDone = 0;
internal TKey _currentLowKey;
}
}
/// <param name=' relationshipQualifier'>The qualifier which the resulting relationship classes must have.</param>
/// <param name=' thisRole'>The role which the source class must have in the resulting relationship classes.</param>
/// <param name=' options'> The options for retrieving the results.</param>
- /// <returns>
- /// <para>A collection of association classes
- /// relating this class to others, according to the given options.</para>
- /// </returns>
public void GetRelationshipClasses(
ManagementOperationObserver watcher,
string relationshipClass,
/// Function which checks if the language supports Unsigned numbers
/// </summary>
/// <param name="Language">Language</param>
- /// <returns>true - if unsigned is supported</returns>
void GetUnsignedSupport(CodeLanguage Language)
{
switch(Language)
return c == ' ' || (c >= '\x0009' && c <= '\x000d') || c == '\x00a0' || c == '\x0085';
}
- private unsafe readonly struct HeaderBufferSpan
+ private readonly unsafe struct HeaderBufferSpan
{
private readonly byte* _pointer;
public readonly int Length;
}
// Can't use Span here as it's unsupported.
- private unsafe readonly struct BytePtrAccessor : IHeaderNameAccessor
+ private readonly unsafe struct BytePtrAccessor : IHeaderNameAccessor
{
private readonly byte* _p;
private readonly int _length;
// This is only used internally to enumerate the collection
// without the enumerator allocation.
- new public List<T>.Enumerator GetEnumerator()
+ public new List<T>.Enumerator GetEnumerator()
{
return ((List<T>)Items).GetEnumerator();
}
}
}
- private async static void OnKeepAlive(object sender)
+ private static async void OnKeepAlive(object sender)
{
Debug.Assert(sender != null, "'sender' MUST NOT be NULL.");
Debug.Assert((sender as WebSocketBase) != null, "'sender as WebSocketBase' MUST NOT be NULL.");
public string TargetName
{
- set { _targetName = value; }
get { return _targetName; }
+ set { _targetName = value; }
}
private bool ServerSupportsEai
}
}
- private async static Task<bool> IsLocalHost(string hostname)
+ private static async Task<bool> IsLocalHost(string hostname)
{
IPAddress[] hostAddresses = await Dns.GetHostAddressesAsync(hostname);
IPAddress[] localHostAddresses = await Dns.GetHostAddressesAsync(Dns.GetHostName());
private SafeNativeOverlapped _nativeOverlapped;
// The WinNT Completion Port callback.
- private static unsafe readonly IOCompletionCallback s_ioCallback = new IOCompletionCallback(CompletionPortCallback);
+ private static readonly unsafe IOCompletionCallback s_ioCallback = new IOCompletionCallback(CompletionPortCallback);
internal BaseOverlappedAsyncResult(Socket socket, object asyncState, AsyncCallback asyncCallback)
: base(socket, asyncState, asyncCallback)
public abstract class ExposeProtectedWebSocket : WebSocket
{
- public new static bool IsStateTerminal(WebSocketState state) =>
+ public static new bool IsStateTerminal(WebSocketState state) =>
WebSocket.IsStateTerminal(state);
- public new static void ThrowOnInvalidState(WebSocketState state, params WebSocketState[] validStates) =>
+ public static new void ThrowOnInvalidState(WebSocketState state, params WebSocketState[] validStates) =>
WebSocket.ThrowOnInvalidState(state, validStates);
}
}
}
#if OLDWRITER
- unsafe internal void WriteText(char* chars, int charCount)
+ internal unsafe void WriteText(char* chars, int charCount)
{
ThrowIfClosed();
if (inStartElement)
writer.WriteText(chars, charCount);
}
}
- unsafe internal void WriteEscapedText(char* chars, int count)
+ internal unsafe void WriteEscapedText(char* chars, int count)
{
ThrowIfClosed();
// Skip all white spaces before the start of root element.
{
private static XmlNodeWriter s_nullNodeWriter;
- static public XmlNodeWriter Null
+ public static XmlNodeWriter Null
{
get
{
_inAttribute = false;
}
- new public void SetOutput(Stream stream, bool ownsStream, Encoding encoding)
+ public new void SetOutput(Stream stream, bool ownsStream, Encoding encoding)
{
Encoding utf8Encoding = null;
if (encoding != null && encoding.CodePage == Encoding.UTF8.CodePage)
internal static XmlSchemaSimpleType AnyAtomicType { get { return s__anyAtomicType; } }
internal static XmlSchemaSimpleType UntypedAtomicType { get { return s__untypedAtomicType; } }
- internal new static DatatypeImplementation FromXmlTokenizedType(XmlTokenizedType token)
+ internal static new DatatypeImplementation FromXmlTokenizedType(XmlTokenizedType token)
{
return s_tokenizedTypes[(int)token];
}
- internal new static DatatypeImplementation FromXmlTokenizedTypeXsd(XmlTokenizedType token)
+ internal static new DatatypeImplementation FromXmlTokenizedTypeXsd(XmlTokenizedType token)
{
return s_tokenizedTypesXsd[(int)token];
}
- internal new static DatatypeImplementation FromXdrName(string name)
+ internal static new DatatypeImplementation FromXdrName(string name)
{
int i = Array.BinarySearch(s_xdrTypes, name, null);
return i < 0 ? null : (DatatypeImplementation)s_xdrTypes[i];
return dt;
}
- internal new static DatatypeImplementation DeriveByUnion(XmlSchemaSimpleType[] types, XmlSchemaType schemaType)
+ internal static new DatatypeImplementation DeriveByUnion(XmlSchemaSimpleType[] types, XmlSchemaType schemaType)
{
DatatypeImplementation dt = new Datatype_union(types);
dt._baseType = s_anySimpleType; //Base type of a union is anySimpleType
public InferenceOption Occurrence
{
- set
- {
- _occurrence = value;
- }
get
{
return _occurrence;
}
+ set
+ {
+ _occurrence = value;
+ }
}
public InferenceOption TypeInference
{
- set
- {
- _typeInference = value;
- }
get
{
return _typeInference;
}
+ set
+ {
+ _typeInference = value;
+ }
}
public XmlSchemaInference()
/// The XmlCharType class is used for quick character type recognition
/// which is optimized for the first 127 ascii characters.
/// </summary>
- unsafe internal struct XmlCharType
+ internal unsafe struct XmlCharType
{
// Surrogate constants
internal const int SurHighStart = 0xd800; // 1101 10xx
return -1;
}
- static internal bool IsOnlyDigits(string str, int startPos, int len)
+ internal static bool IsOnlyDigits(string str, int startPos, int len)
{
Debug.Assert(str != null);
Debug.Assert(startPos + len <= str.Length);
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class XmlQueryItemSequence : XmlQuerySequence<XPathItem>
{
- public new static readonly XmlQueryItemSequence Empty = new XmlQueryItemSequence();
+ public static new readonly XmlQueryItemSequence Empty = new XmlQueryItemSequence();
/// <summary>
/// If "seq" is non-null, then clear it and reuse it. Otherwise, create a new XmlQueryItemSequence.
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class XmlQueryNodeSequence : XmlQuerySequence<XPathNavigator>, IList<XPathItem>
{
- public new static readonly XmlQueryNodeSequence Empty = new XmlQueryNodeSequence();
+ public static new readonly XmlQueryNodeSequence Empty = new XmlQueryNodeSequence();
private XmlQueryNodeSequence _docOrderDistinct;
public class ConstructorTestSubClass : ConstructorTestBaseClass
{
- public new static int Members = 5; //.cctor is added
- public new static int MembersEverything = 11;
+ public static new int Members = 5; //.cctor is added
+ public static new int MembersEverything = 11;
public ConstructorTestSubClass(string s) { }
public ConstructorTestSubClass(short i2) { }
public class EventTestSubClass : EventTestBaseClass
{
- new public static int Members = 7;
- new public static int MembersEverything = 22;
- new public static string[] DeclaredEvents = new string[] { };
- new public static string[] InheritedEvents = new string[] { "EventPublic", "EventInternal", "EventProtected" };
- new public static string[] InheritedButHiddenEvents = new string[] { };
- new public static string[] PublicEvents = new string[] { };
+ public static new int Members = 7;
+ public static new int MembersEverything = 22;
+ public static new string[] DeclaredEvents = new string[] { };
+ public static new string[] InheritedEvents = new string[] { "EventPublic", "EventInternal", "EventProtected" };
+ public static new string[] InheritedButHiddenEvents = new string[] { };
+ public static new string[] PublicEvents = new string[] { };
}
public class EventTestSubClassWithNewEvents : EventTestSubClass
{
- new public static int Members = 15;
- new public static int MembersEverything = 29;
+ public static new int Members = 15;
+ public static new int MembersEverything = 29;
- new public static string[] DeclaredEvents = new string[] { "EventProtected", "EventPublicNew" };
- new public static string[] InheritedEvents = new string[] { "EventPublic", "EventInternal" };
- new public static string[] InheritedButHiddenEvents = new string[] { "EventProtected" };
- new public static string[] PublicEvents = new string[] { "EventPublic", "EventPublicNew" };
+ public static new string[] DeclaredEvents = new string[] { "EventProtected", "EventPublicNew" };
+ public static new string[] InheritedEvents = new string[] { "EventPublic", "EventInternal" };
+ public static new string[] InheritedButHiddenEvents = new string[] { "EventProtected" };
+ public static new string[] PublicEvents = new string[] { "EventPublic", "EventPublicNew" };
new protected event EventHandler EventProtected; // overrides the ProEvent from EventFieldTest parent
public event EventHandler EventPublicNew;
public class EventFieldTestWithIgnoreCase : EventTestSubClassWithNewEvents
{
- new public static int Members = 23;
- new public static int MembersEverything = 43;
+ public static new int Members = 23;
+ public static new int MembersEverything = 43;
- new public static string[] DeclaredEvents = new string[] { "eVentProtected", "eVentPublicNew", "eVENTInternal", "eVentPriVate" };
- new public static string[] InheritedEvents = new string[] { "EventPublic", "EventInternal", "EventProtected", "EventPublicNew" };
- new public static string[] InheritedButHiddenEvents = new string[] { "EventProtected" };
- new public static string[] PublicEvents = new string[] { "eVentPublicNew", "EventPublic", "EventPublicNew" };
+ public static new string[] DeclaredEvents = new string[] { "eVentProtected", "eVentPublicNew", "eVENTInternal", "eVentPriVate" };
+ public static new string[] InheritedEvents = new string[] { "EventPublic", "EventInternal", "EventProtected", "EventPublicNew" };
+ public static new string[] InheritedButHiddenEvents = new string[] { "EventProtected" };
+ public static new string[] PublicEvents = new string[] { "eVentPublicNew", "EventPublic", "EventPublicNew" };
protected event EventHandler eVentProtected; // overrides the ProEvent from EventFieldTest parent
public event EventHandler eVentPublicNew;
public class FieldTestSubClass : FieldTestBaseClass
{
- public new static int Members = 32;
- public new static int MembersEverything = 54;
+ public static new int Members = 32;
+ public static new int MembersEverything = 54;
- public new static string[] DeclaredFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Intfld1", "Intfld2", "Intfld3",
+ public static new string[] DeclaredFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Intfld1", "Intfld2", "Intfld3",
"Profld1", "Profld2", "Profld3", "ProIntfld1", "ProIntfld2", "ProIntfld3",
"Pubfld4", "Pubfld5", "Pubfld6", "Intfld4", "Intfld5", "Intfld6", "Profld4", "Profld5",
"Profld6", "ProIntfld4", "ProIntfld5", "ProIntfld6",
"Members", "DeclaredFieldNames", "InheritedFieldNames", "NewFieldNames", "MembersEverything", "PublicFieldNames"};
- public new static string[] InheritedFieldNames = new string[] { "SubPubfld1", "SubIntfld1", "SubProfld1", "SubProIntfld1" };
+ public static new string[] InheritedFieldNames = new string[] { "SubPubfld1", "SubIntfld1", "SubProfld1", "SubProIntfld1" };
public static string[] NewFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Intfld1", "Intfld2", "Intfld3",
"Profld1", "Profld2", "Profld3", "ProIntfld1", "ProIntfld2", "ProIntfld3"};
- public new static string[] PublicFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Pubfld4", "Pubfld5", "Pubfld6",
+ public static new string[] PublicFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Pubfld4", "Pubfld5", "Pubfld6",
"Members", "DeclaredFieldNames", "InheritedFieldNames", "NewFieldNames", "MembersEverything", "PublicFieldNames"};
public new string Pubfld1 = "";
public new readonly string Pubfld2 = "";
public new volatile string Pubfld3 = "";
- public new static string Pubfld4 = "";
- public new static readonly string Pubfld5 = "";
- public new static volatile string Pubfld6 = "";
+ public static new string Pubfld4 = "";
+ public static new readonly string Pubfld5 = "";
+ public static new volatile string Pubfld6 = "";
internal new string Intfld1 = "";
internal new readonly string Intfld2 = "";
internal new volatile string Intfld3 = "";
- internal new static string Intfld4 = "";
- internal new static readonly string Intfld5 = "";
- internal new static volatile string Intfld6 = "";
+ internal static new string Intfld4 = "";
+ internal static new readonly string Intfld5 = "";
+ internal static new volatile string Intfld6 = "";
protected new string Profld1 = "";
protected new readonly string Profld2 = "";
protected new volatile string Profld3 = "";
- protected new static string Profld4 = "";
- protected new static readonly string Profld5 = "";
- protected new static volatile string Profld6 = "";
+ protected static new string Profld4 = "";
+ protected static new readonly string Profld5 = "";
+ protected static new volatile string Profld6 = "";
protected internal new string ProIntfld1 = "";
protected internal new readonly string ProIntfld2 = "";
protected internal new volatile string ProIntfld3 = "";
- protected internal new static string ProIntfld4 = "";
- protected internal new static readonly string ProIntfld5 = "";
- protected internal new static volatile string ProIntfld6 = "";
+ protected internal static new string ProIntfld4 = "";
+ protected internal static new readonly string ProIntfld5 = "";
+ protected internal static new volatile string ProIntfld6 = "";
}
}
public class MethodTestSubClass : MethodTestBaseClass
{
- public new static int Members = 31;
- public new static int MembersEverything = 51;
+ public static new int Members = 31;
+ public static new int MembersEverything = 51;
- public new static string[] DeclaredMethodNames = new string[]{ "Void PubMeth1()",
+ public static new string[] DeclaredMethodNames = new string[]{ "Void PubMeth1()",
"Void PubMeth2()",
"Void PubMeth3()",
"Void IntMeth1()",
"Void ProMeth2ToOverride()",
"Void ProIntMeth2ToOverride()"};
- public new static string[] InheritedMethodNames = new string[] { "Void PubBaseMeth1()",
+ public static new string[] InheritedMethodNames = new string[] { "Void PubBaseMeth1()",
"Void PubBaseMeth1(System.String)",
"Void IntBaseMeth1()",
"Void IntBaseMeth1(System.String)",
"Void ProtectedBaseMeth1()",
"Void ProtectedBaseMeth1(System.String)"};
- public new static string[] PublicMethodNames = new string[]{ "Void PubMeth1()",
+ public static new string[] PublicMethodNames = new string[]{ "Void PubMeth1()",
"Void PubMeth2()",
"Void PubMeth3()",
"Void PubMeth2ToOverride()"};
public new void PubMeth1() { }
public new virtual void PubMeth2() { }
public override void PubMeth2ToOverride() { }
- public new static void PubMeth3() { }
+ public static new void PubMeth3() { }
internal new void IntMeth1() { }
internal new virtual void IntMeth2() { }
internal override void IntMeth2ToOverride() { }
- internal new static void IntMeth3() { }
+ internal static new void IntMeth3() { }
protected new void ProMeth1() { }
protected new virtual void ProMeth2() { }
protected override void ProMeth2ToOverride() { }
- protected new static void ProMeth3() { }
+ protected static new void ProMeth3() { }
protected internal new void ProIntMeth1() { }
protected internal new virtual void ProIntMeth2() { }
protected internal override void ProIntMeth2ToOverride() { }
- protected internal new static void ProIntMeth3() { }
+ protected internal static new void ProIntMeth3() { }
private void PrivMeth1() { }
private static void PrivMeth3() { }
public abstract class MethodTestAbsSubClass : MethodTestAbsBaseClass
{
- public new static int Members = 7;
- public new static int MembersEverything = 17;
+ public static new int Members = 7;
+ public static new int MembersEverything = 17;
- public new static string[] DeclaredMethodNames = new string[] { };
- public new static string[] InheritedMethodNames = new string[] { "Void meth1()", "Void meth2()", "Void meth3()", "Void meth4()" };
- public new static string[] PublicMethodNames = new string[] { };
+ public static new string[] DeclaredMethodNames = new string[] { };
+ public static new string[] InheritedMethodNames = new string[] { "Void meth1()", "Void meth2()", "Void meth3()", "Void meth4()" };
+ public static new string[] PublicMethodNames = new string[] { };
}
}
internal class PropertyTestSubClass : PropertyTestBaseClass
{
- public new static int Members = 55;
- public new static int MembersEverything = 89;
+ public static new int Members = 55;
+ public static new int MembersEverything = 89;
- public new static string[] DeclaredPropertyNames = new string[] { "Pubprop1", "Pubprop2", "Pubprop3", "Intprop1", "Intprop2", "Intprop3",
+ public static new string[] DeclaredPropertyNames = new string[] { "Pubprop1", "Pubprop2", "Pubprop3", "Intprop1", "Intprop2", "Intprop3",
"Proprop1", "Proprop2", "Proprop3", "ProIntprop1", "ProIntprop2", "ProIntprop3",
};
- public new static string[] InheritedPropertyNames = new string[] { "SubPubprop1", "SubIntprop1", "SubProprop1", "SubProIntprop1" };
+ public static new string[] InheritedPropertyNames = new string[] { "SubPubprop1", "SubIntprop1", "SubProprop1", "SubProIntprop1" };
- public new static string[] InheritedButHiddenPropertyNames = new string[] { "Pubprop1", "Pubprop2", "Intprop1", "Intprop2",
+ public static new string[] InheritedButHiddenPropertyNames = new string[] { "Pubprop1", "Pubprop2", "Intprop1", "Intprop2",
"Proprop1", "Proprop2", "ProIntprop1", "ProIntprop2", };
- public new static string[] PublicPropertyNames = new string[] { "Pubprop1", "Pubprop2", "Pubprop3" };
+ public static new string[] PublicPropertyNames = new string[] { "Pubprop1", "Pubprop2", "Pubprop3" };
public new string Pubprop1 { get { return ""; } set { } }
public new virtual string Pubprop2 { get { return ""; } set { } }
- public new static string Pubprop3 { get { return ""; } set { } }
+ public static new string Pubprop3 { get { return ""; } set { } }
internal new string Intprop1 { get { return ""; } set { } }
internal new virtual string Intprop2 { get { return ""; } set { } }
- internal new static string Intprop3 { get { return ""; } set { } }
+ internal static new string Intprop3 { get { return ""; } set { } }
protected new string Proprop1 { get { return ""; } set { } }
protected new virtual string Proprop2 { get { return ""; } set { } }
- protected new static string Proprop3 { get { return ""; } set { } }
+ protected static new string Proprop3 { get { return ""; } set { } }
protected new internal string ProIntprop1 { get { return ""; } set { } }
protected new internal virtual string ProIntprop2 { get { return ""; } set { } }
public class PropertyTestSubIndexerClass : PropertyTestBaseIndexerClass
{
- public new static int Members = 13;
- public new static int MembersEverything = 26;
+ public static new int Members = 13;
+ public static new int MembersEverything = 26;
- public new static string[] DeclaredPropertyNames = new string[] { "Item", "Item" };
- public new static string[] InheritedPropertyNames = new string[] { "Item" };
- public new static string[] InheritedButHiddenPropertyNames = new string[] { "Item", "Item" };
- public new static string[] PublicPropertyNames = new string[] { "Item", "Item" };
+ public static new string[] DeclaredPropertyNames = new string[] { "Item", "Item" };
+ public static new string[] InheritedPropertyNames = new string[] { "Item" };
+ public static new string[] InheritedButHiddenPropertyNames = new string[] { "Item", "Item" };
+ public static new string[] PublicPropertyNames = new string[] { "Item", "Item" };
public new int this[int i] { get { return 1; } set { } }
public new int this[string i] { get { return 1; } set { } }
internal abstract class PropertyTestSubAbsClass : PropertyTestBaseAbsClass
{
- public new static int Members = 19;
- public new static int MembersEverything = 25;
+ public static new int Members = 19;
+ public static new int MembersEverything = 25;
- public new static string[] DeclaredPropertyNames = new string[] { "prop1", "prop2", "prop3", "prop4" };
- public new static string[] InheritedPropertyNames = new string[] { };
- public new static string[] InheritedButHiddenPropertyNames = new string[] { };
- public new static string[] PublicPropertyNames = new string[] { "prop1" };
+ public static new string[] DeclaredPropertyNames = new string[] { "prop1", "prop2", "prop3", "prop4" };
+ public static new string[] InheritedPropertyNames = new string[] { };
+ public static new string[] InheritedButHiddenPropertyNames = new string[] { };
+ public static new string[] PublicPropertyNames = new string[] { "prop1" };
public override abstract string prop1 { get; set; }
internal abstract override string prop2 { get; set; }
namespace System.Reflection.Internal
{
[DebuggerDisplay("{GetDebuggerDisplay(),nq}")]
- internal unsafe readonly struct MemoryBlock
+ internal readonly unsafe struct MemoryBlock
{
internal readonly byte* Pointer;
internal readonly int Length;
/// <param name="tryEnd">Label marking the instruction immediately following the try block.</param>
/// <param name="handlerStart">Label marking the first instruction of the handler.</param>
/// <param name="handlerEnd">Label marking the instruction immediately following the handler.</param>
- /// <returns>Encoder for the next clause.</returns>
/// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception>
/// <exception cref="ArgumentNullException">A label has default value.</exception>
public void AddFinallyRegion(LabelHandle tryStart, LabelHandle tryEnd, LabelHandle handlerStart, LabelHandle handlerEnd) =>
private class Derived : Base
{
public new event Action<int> MyEvent { add { } remove { } }
- public new static event Action<double> MyStaticEvent { add { } remove { } }
- public new static event Action<float> MyEventInstanceStatic { add { } remove { } }
+ public static new event Action<double> MyStaticEvent { add { } remove { } }
+ public static new event Action<float> MyEventInstanceStatic { add { } remove { } }
public new event Action<long> MyEventStaticInstance { add { } remove { } }
}
}
private class Derived : Base
{
public new int MyField;
- public new static int MyStaticField;
+ public static new int MyStaticField;
}
}
private class Derived : Base
{
public new int MyMethod() { throw null; }
- public new static int MyStaticMethod() { throw null; }
+ public static new int MyStaticMethod() { throw null; }
}
}
private abstract class Derived : Base
{
public new int MyProp { get; }
- public new static int MyStaticProp { get; }
- public new static int MyInstanceThenStaticProp { get; }
+ public static new int MyStaticProp { get; }
+ public static new int MyInstanceThenStaticProp { get; }
public new int MyStaticThenInstanceProp { get; }
public new double MyStringThenDoubleProp { get; }
public abstract int this[double x] { get; }
private class StaticDerived : StaticBase
{
- public new static event Action MyEvent { add { } remove { } }
+ public static new event Action MyEvent { add { } remove { } }
}
private class StaticDerived2 : StaticDerived
public class TypeInfoFieldSubClass : TypeInfoFieldBaseClass
{
- public new static int Members = 10;
+ public static new int Members = 10;
public static string[] InheritedFieldNames = new string[] { "SubPubfld1" };
public static string[] NewFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3" };
- public new static string[] PublicFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Pubfld4", "Pubfld5", "Pubfld6",
+ public static new string[] PublicFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Pubfld4", "Pubfld5", "Pubfld6",
"Members", "InheritedFieldNames", "NewFieldNames", "PublicFieldNames"};
public new string Pubfld1 = "";
public new readonly string Pubfld2 = "";
public new volatile string Pubfld3 = "";
- public new static string Pubfld4 = "";
- public new static readonly string Pubfld5 = "";
- public new static volatile string Pubfld6 = "";
+ public static new string Pubfld4 = "";
+ public static new readonly string Pubfld5 = "";
+ public static new volatile string Pubfld6 = "";
}
}
public class TypeInfoMemberSubClass : TypeInfoMemberBaseClass
{
- public new static int Members = 10;
+ public static new int Members = 10;
public static string[] InheritedFieldNames = new string[] { "SubPubfld1" };
public static string[] NewFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3" };
- public new static string[] PublicFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Pubfld4", "Pubfld5", "Pubfld6",
+ public static new string[] PublicFieldNames = new string[] { "Pubfld1", "Pubfld2", "Pubfld3", "Pubfld4", "Pubfld5", "Pubfld6",
"Members", "InheritedFieldNames", "NewFieldNames", "PublicFieldNames"};
public new string Pubfld1 = "";
public new readonly string Pubfld2 = "";
public new volatile string Pubfld3 = "";
- public new static string Pubfld4 = "";
- public new static readonly string Pubfld5 = "";
- public new static volatile string Pubfld6 = "";
+ public static new string Pubfld4 = "";
+ public static new readonly string Pubfld5 = "";
+ public static new volatile string Pubfld6 = "";
}
}
public class TypeInfoMethodSubClass : TypeInfoMethodBaseClass
{
- public new static string[] PublicMethodNames = new string[]{ "PubMeth1",
+ public static new string[] PublicMethodNames = new string[]{ "PubMeth1",
"PubMeth2",
"PubMeth3",
"PubMeth2ToOverride"};
public new void PubMeth1() { }
public new virtual void PubMeth2() { }
public override void PubMeth2ToOverride() { }
- public new static void PubMeth3() { }
+ public static new void PubMeth3() { }
}
}
public class TestNestDerived : TestNest
{
- new public static int iDeclaredNests = 4;
+ public static new int iDeclaredNests = 4;
public new class NestPublic { }
public class NestPublic3 { }
{
public new string Pubprop1 { get { return ""; } set { } }
public new virtual string Pubprop2 { get { return ""; } set { } }
- public new static string Pubprop3 { get { return ""; } set { } }
+ public static new string Pubprop3 { get { return ""; } set { } }
}
}
public new event EventHandler EventPublic; // Overrides event
public event EventHandler EventPublicNew; // New event
- public new static string[] s_arrayField = new string[10];
+ public static new string[] s_arrayField = new string[10];
public new string _field2 = "";
public new readonly string _readonlyField = "";
public new volatile string _volatileField = "";
- public new static string s_field = "";
- public new static readonly string s_readonlyField = "";
- public new static volatile string s_volatileField = "";
+ public static new string s_field = "";
+ public static new readonly string s_readonlyField = "";
+ public static new volatile string s_volatileField = "";
public new void VoidMethodReturningVoid2() { }
public new virtual void VirtualVoidMethodReturningVoid1() { }
public override void VirtualVoidMethodReturningVoid2() { }
- public new static void StaticVoidMethodReturningVoid() { }
+ public static new void StaticVoidMethodReturningVoid() { }
public new class PublicNestedClass1 { }
public class NestPublic3 { }
public new string StringProperty1 { get { return ""; } set { } }
public new virtual string VirtualStringProperty { get { return ""; } set { } }
- public new static string StaticStringProperty { get { return ""; } set { } }
+ public static new string StaticStringProperty { get { return ""; } set { } }
}
public interface TI_NonGenericInterface1 { }
{
internal struct ExpiresEntryRef
{
- static internal readonly ExpiresEntryRef INVALID = new ExpiresEntryRef(0, 0);
+ internal static readonly ExpiresEntryRef INVALID = new ExpiresEntryRef(0, 0);
private const uint ENTRY_MASK = 0x000000ffu;
private const int PAGE_SHIFT = 8;
{
internal struct UsageEntryRef
{
- static internal readonly UsageEntryRef INVALID = new UsageEntryRef(0, 0);
+ internal static readonly UsageEntryRef INVALID = new UsageEntryRef(0, 0);
private const uint ENTRY_MASK = 0x000000ffu;
private const int PAGE_SHIFT = 8;
}
[DllImport("Kernel32", SetLastError = true)]
- private extern static void SetLastError(int error);
+ private static extern void SetLastError(int error);
private class LastErrorSafeHandle : SafeHandle
{
{
public class Program
{
- static public string Describe(string lang)
+ public static string Describe(string lang)
{
try
{
{
public class Program
{
- static public string Describe(string lang)
+ public static string Describe(string lang)
{
try
{
[InlineData("es-MX", "Spanish (Mexico) language Main description 1.0.0")]
[InlineData("fr", "Neutral language Main description 1.0.0")]
[InlineData("fr-FR", "Neutral language Main description 1.0.0")]
- static public void mainResources(string lang, string expected)
+ public static void mainResources(string lang, string expected)
{
Assert.Equal(expected, Describe(lang));
}
internal object TopObject
{
- set { _topObject = value; }
get { return _topObject; }
+ set { _topObject = value; }
}
internal ObjectHolderList SpecialFixupObjects =>
{
static RuntimeTypeHandleEqualityComparer comparer;
- static public RuntimeTypeHandleEqualityComparer Comparer
+ public static RuntimeTypeHandleEqualityComparer Comparer
{
get
{
return true;
}
- static internal string EncodeLocalName(string localName)
+ internal static string EncodeLocalName(string localName)
{
if (IsAsciiLocalName(localName))
return localName;
Add(new PrimitiveDataContract(typeof(Uri)));
Add(objectContract);
}
- static public void Add(PrimitiveDataContract primitiveContract)
+ public static void Add(PrimitiveDataContract primitiveContract)
{
typeToContract.Add(primitiveContract.UnderlyingType, primitiveContract);
nameToContract.Add(primitiveContract.StableName, primitiveContract);
}
- static public PrimitiveDataContract GetPrimitiveDataContract(Type type)
+ public static PrimitiveDataContract GetPrimitiveDataContract(Type type)
{
PrimitiveDataContract retVal = null;
if (type.IsInterface)
return retVal;
}
- static public PrimitiveDataContract GetPrimitiveDataContract(string name, string ns)
+ public static PrimitiveDataContract GetPrimitiveDataContract(string name, string ns)
{
PrimitiveDataContract retVal = null;
nameToContract.TryGetValue(new XmlQualifiedName(name, ns), out retVal);
public SelfRef1 data;
[NonSerialized]
- static public SelfRef1 containedData = new SelfRef1();
+ public static SelfRef1 containedData = new SelfRef1();
public DCExplicitInterfaceIObjRef() { }
public DCExplicitInterfaceIObjRef(bool init)
base.Add(item.ToString());
}
- public new static CDC_NewAddToPrivate CreateInstance()
+ public static new CDC_NewAddToPrivate CreateInstance()
{
CDC_NewAddToPrivate list = new CDC_NewAddToPrivate();
list.Insert(0, "223213");
{
public override string Name1 { get; set; }
- new public string Name2 { get; set; }
+ public new string Name2 { get; set; }
- new public string Name3 { get; set; }
+ public new string Name3 { get; set; }
new internal string Name4 { get; set; }
- new public string Name5 { get; set; }
+ public new string Name5 { get; set; }
public override string Name6 { get; set; }
}
{
public override string Name1 { get; set; }
- new public string Name2 { get; set; }
+ public new string Name2 { get; set; }
- new public string Name3 { get; set; }
+ public new string Name3 { get; set; }
new internal string Name4 { get; set; }
public class DerivedClass1 : BaseClass1
{
[XmlElement]
- new public MyCollection1 Prop;
+ public new MyCollection1 Prop;
}
public class MyCollection1 : IEnumerable<DateTime>, IEnumerable
{
}
- public new static int DoRun(C x)
+ public static new int DoRun(C x)
{
return 107;
}
[PreserveSigAttribute]
[return: MarshalAsAttribute(UnmanagedType.Bool)]
[DllImportAttribute("nonexistent", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true, PreserveSig = true, EntryPoint = "MyEntryPoint")]
- public extern static bool TestMethod([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I4), In, Out, Optional] int[] x);
+ public static extern bool TestMethod([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I4), In, Out, Optional] int[] x);
}
public class TestTypeWithoutAttributes
public class IsCollectibleTests
{
- static public string asmNameString = "TestCollectibleAssembly";
- static public string asmPath = Path.Combine(Environment.CurrentDirectory, "TestCollectibleAssembly.dll");
+ public static string asmNameString = "TestCollectibleAssembly";
+ public static string asmPath = Path.Combine(Environment.CurrentDirectory, "TestCollectibleAssembly.dll");
- static public Func<AssemblyName, Assembly> assemblyResolver = (asmName) =>
+ public static Func<AssemblyName, Assembly> assemblyResolver = (asmName) =>
asmName.Name == asmNameString ? Assembly.LoadFrom(asmPath) : null;
- static public Func<AssemblyName, Assembly> collectibleAssemblyResolver(AssemblyLoadContext alc) =>
+ public static Func<AssemblyName, Assembly> collectibleAssemblyResolver(AssemblyLoadContext alc) =>
(asmName) =>
asmName.Name == asmNameString ? alc.LoadFromAssemblyPath(asmPath) : null;
- static public Func<Assembly, string, bool, Type> typeResolver(bool shouldThrowIfNotFound) =>
+ public static Func<Assembly, string, bool, Type> typeResolver(bool shouldThrowIfNotFound) =>
(asm, simpleTypeName, isCaseSensitive) => asm == null ?
Type.GetType(simpleTypeName, shouldThrowIfNotFound, isCaseSensitive) :
asm.GetType(simpleTypeName, shouldThrowIfNotFound, isCaseSensitive);
private class Derived : Base
{
public new event Action<int> MyEvent { add { } remove { } }
- public new static event Action<double> MyStaticEvent { add { } remove { } }
- public new static event Action<float> MyEventInstanceStatic { add { } remove { } }
+ public static new event Action<double> MyStaticEvent { add { } remove { } }
+ public static new event Action<float> MyEventInstanceStatic { add { } remove { } }
public new event Action<long> MyEventStaticInstance { add { } remove { } }
}
}
private class Derived : Base
{
public new int MyField;
- public new static int MyStaticField;
+ public static new int MyStaticField;
}
}
private class Derived : Base
{
public new int MyMethod() { throw null; }
- public new static int MyStaticMethod() { throw null; }
+ public static new int MyStaticMethod() { throw null; }
}
}
private abstract class Derived : Base
{
public new int MyProp { get; }
- public new static int MyStaticProp { get; }
- public new static int MyInstanceThenStaticProp { get; }
+ public static new int MyStaticProp { get; }
+ public static new int MyInstanceThenStaticProp { get; }
public new int MyStaticThenInstanceProp { get; }
public new double MyStringThenDoubleProp { get;}
public abstract int this[double x] { get; }
private class StaticDerived : StaticBase
{
- public new static event Action MyEvent { add { } remove { } }
+ public static new event Action MyEvent { add { } remove { } }
}
private class StaticDerived2 : StaticDerived
return GetXml(document);
}
- new internal XmlElement GetXml(XmlDocument document)
+ internal new XmlElement GetXml(XmlDocument document)
{
if (ReferenceType == null)
throw new CryptographicException(SR.Cryptography_Xml_ReferenceTypeRequired);
public XmlResolver Resolver
{
- // This property only has a setter. The rationale for this is that we don't have a good value
+ internal get
+ {
+ return _xmlResolver;
+ }
+ // This property only has a public setter. The rationale for this is that we don't have a good value
// to return when it has not been explicitely set, as we are using XmlSecureResolver by default
set
{
_xmlResolver = value;
_bResolverSet = true;
}
-
- internal get
- {
- return _xmlResolver;
- }
}
internal bool ResolverSet
return sr.ReadToEnd();
}
- static private string base64 = "XmlDsigBase64Transform";
- static private byte[] base64array = { 0x58, 0x6D, 0x6C, 0x44, 0x73, 0x69, 0x67, 0x42, 0x61, 0x73, 0x65, 0x36, 0x34, 0x54, 0x72, 0x61, 0x6E, 0x73, 0x66, 0x6F, 0x72, 0x6D };
+ private static string base64 = "XmlDsigBase64Transform";
+ private static byte[] base64array = { 0x58, 0x6D, 0x6C, 0x44, 0x73, 0x69, 0x67, 0x42, 0x61, 0x73, 0x65, 0x36, 0x34, 0x54, 0x72, 0x61, 0x6E, 0x73, 0x66, 0x6F, 0x72, 0x6D };
private XmlDocument GetDoc()
{
return error;
}
- static internal Collection<SyndicationCategory> CloneCategories(Collection<SyndicationCategory> categories)
+ internal static Collection<SyndicationCategory> CloneCategories(Collection<SyndicationCategory> categories)
{
if (categories == null)
{
return result;
}
- static internal Collection<SyndicationLink> CloneLinks(Collection<SyndicationLink> links)
+ internal static Collection<SyndicationLink> CloneLinks(Collection<SyndicationLink> links)
{
if (links == null)
{
return result;
}
- static internal Collection<SyndicationPerson> ClonePersons(Collection<SyndicationPerson> persons)
+ internal static Collection<SyndicationPerson> ClonePersons(Collection<SyndicationPerson> persons)
{
if (persons == null)
{
return result;
}
- static internal TextSyndicationContent CloneTextContent(TextSyndicationContent content)
+ internal static TextSyndicationContent CloneTextContent(TextSyndicationContent content)
{
if (content == null)
{
return uriToWrite;
}
- static internal string GetUriString(Uri uri)
+ internal static string GetUriString(Uri uri)
{
if (uri == null)
{
}
}
- static internal bool IsXmlns(string name, string ns)
+ internal static bool IsXmlns(string name, string ns)
{
return name == "xmlns" || ns == "http://www.w3.org/2000/xmlns/";
}
return SR.Format(SR.XmlFoundNodeType, reader.NodeType);
}
- static public void ThrowStartElementExpected(XmlDictionaryReader reader)
+ public static void ThrowStartElementExpected(XmlDictionaryReader reader)
{
ThrowXmlException(reader, SR.XmlStartElementExpected, GetWhatWasFound(reader));
}
public static partial class StreamTests
{
[Fact]
- public async static Task VerifyValueFail()
+ public static async Task VerifyValueFail()
{
MemoryStream stream = new MemoryStream();
await Assert.ThrowsAsync<ArgumentNullException>(async () => await JsonSerializer.SerializeAsync(stream, "", (Type)null));
}
[Fact]
- public async static Task VerifyTypeFail()
+ public static async Task VerifyTypeFail()
{
MemoryStream stream = new MemoryStream();
await Assert.ThrowsAsync<ArgumentException>(async () => await JsonSerializer.SerializeAsync(stream, 1, typeof(string)));
base.Verify();
}
- new public void VerifyNonVirtual()
+ public new void VerifyNonVirtual()
{
Assert.Equal(500, CreditLimit);
}
public object MyStringImmutablQueueT { get; set; }
public object MyStringImmutableSortedSetT { get; set; }
- public new static readonly string s_json =
+ public static new readonly string s_json =
@"{" +
@"""MyInt16"" : 1," +
@"""MyInt32"" : 2," +
@"""MyStringImmutableSortedSetT"" : [""Hello""]" +
@"}";
- public new static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json);
+ public static new readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json);
public override void Initialize()
{
internal class MatchSparse : Match
{
// the lookup hashtable
- new internal readonly Hashtable _caps;
+ internal new readonly Hashtable _caps;
internal MatchSparse(Regex regex, Hashtable caps, int capcount, string text, int begpos, int len, int startpos)
: base(regex, capcount, text, begpos, len, startpos)
/// <remarks>
/// Do not change the values of this instance. It is shared by all of our blocks when no options are provided by the user.
/// </remarks>
- internal new static readonly ExecutionDataflowBlockOptions Default = new ExecutionDataflowBlockOptions();
+ internal static new readonly ExecutionDataflowBlockOptions Default = new ExecutionDataflowBlockOptions();
/// <summary>Returns this <see cref="ExecutionDataflowBlockOptions"/> instance if it's the default instance or else a cloned instance.</summary>
/// <returns>An instance of the options that may be cached by the block.</returns>
/// <remarks>
/// Do not change the values of this instance. It is shared by all of our blocks when no options are provided by the user.
/// </remarks>
- internal new static readonly GroupingDataflowBlockOptions Default = new GroupingDataflowBlockOptions();
+ internal static new readonly GroupingDataflowBlockOptions Default = new GroupingDataflowBlockOptions();
/// <summary>Returns this <see cref="GroupingDataflowBlockOptions"/> instance if it's the default instance or else a cloned instance.</summary>
/// <returns>An instance of the options that may be cached by the block.</returns>
}
// Asynchronous version of time-consuming method (End part)
- new public T EndDoTask(IAsyncResult asyncResult)
+ public new T EndDoTask(IAsyncResult asyncResult)
{
// We know that the IAsyncResult is really a Task object
Task<T> task = (Task<T>)asyncResult;