MobileStubs.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // help building System.Data without win32-specific p/invokes
  2. using System;
  3. using System.Diagnostics;
  4. internal static partial class Bid {
  5. internal enum ApiGroup : uint {
  6. Pooling = 0x00001000,
  7. Correlation = 0x00040000,
  8. }
  9. internal static bool AdvancedOn {
  10. get { return false; }
  11. }
  12. internal static bool IsOn (ApiGroup flag)
  13. {
  14. return false;
  15. }
  16. [Conditional ("BID")]
  17. internal static void Trace (params object[] a)
  18. {
  19. }
  20. [Conditional ("BID")]
  21. internal static void PoolerTrace (params object[] a)
  22. {
  23. }
  24. // out method can't be conditional
  25. internal static void ScopeEnter (out IntPtr p, params object[] a)
  26. {
  27. p = IntPtr.Zero;
  28. }
  29. [Conditional ("BID")]
  30. internal static void ScopeLeave (ref IntPtr a)
  31. {
  32. }
  33. // out method can't be conditional
  34. internal static void PoolerScopeEnter (out IntPtr p, string a, System.Int32 b)
  35. {
  36. p = IntPtr.Zero;
  37. }
  38. }
  39. [ConditionalAttribute ("CODE_ANALYSIS")]
  40. [AttributeUsage (AttributeTargets.Method)]
  41. internal sealed class BidMethodAttribute : Attribute {
  42. }
  43. [ConditionalAttribute ("CODE_ANALYSIS")]
  44. [AttributeUsage (AttributeTargets.Parameter | AttributeTargets.Method, AllowMultiple=true)]
  45. internal sealed class BidArgumentTypeAttribute : Attribute {
  46. internal BidArgumentTypeAttribute (Type bidArgumentType)
  47. {
  48. }
  49. }
  50. namespace System.Data.Common {
  51. internal static class UnsafeNativeMethods {
  52. // note: likely unreachable code - as this never worked on mono
  53. internal static int lstrlenW (IntPtr p)
  54. {
  55. throw new NotImplementedException ();
  56. }
  57. static internal int CreateWellKnownSid (int sidType, byte[] domainSid, byte[] resultSid, ref uint resultSidLength )
  58. {
  59. return -1;
  60. }
  61. static internal bool CheckTokenMembership (IntPtr tokenHandle, byte[] sidToCheck, out bool isMember)
  62. {
  63. isMember = false;
  64. return false;
  65. }
  66. static internal bool GetTokenInformation (IntPtr tokenHandle, uint token_class, IntPtr tokenStruct, uint tokenInformationLength, ref uint tokenString)
  67. {
  68. return false;
  69. }
  70. static internal bool ConvertSidToStringSidW (IntPtr sid, out IntPtr stringSid)
  71. {
  72. stringSid = IntPtr.Zero;
  73. return false;
  74. }
  75. }
  76. }