LicenseManager.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //
  2. // System.ComponentModel.LicenseManager.cs
  3. //
  4. // Authors:
  5. // Martin Willemoes Hansen ([email protected])
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2003 Martin Willemoes Hansen
  9. // (C) 2003 Andreas Nahr
  10. //
  11. namespace System.ComponentModel
  12. {
  13. public sealed class LicenseManager
  14. {
  15. private static LicenseContext mycontext = null;
  16. private LicenseManager ()
  17. {
  18. }
  19. public static LicenseContext CurrentContext {
  20. get {
  21. lock (mycontext) {
  22. return mycontext;
  23. }
  24. }
  25. set {
  26. lock (mycontext) {
  27. mycontext = value;
  28. }
  29. }
  30. }
  31. public static LicenseUsageMode UsageMode {
  32. get {
  33. lock (mycontext)
  34. {
  35. return mycontext.UsageMode;
  36. }
  37. }
  38. }
  39. public static object CreateWithContext (Type type,
  40. LicenseContext creationContext)
  41. {
  42. return CreateWithContext (type, creationContext, new object[0]);
  43. }
  44. [MonoTODO]
  45. public static object CreateWithContext (Type type,
  46. LicenseContext creationContext,
  47. object[] args)
  48. {
  49. throw new NotImplementedException();
  50. }
  51. [MonoTODO]
  52. public static bool IsLicensed (Type type)
  53. {
  54. throw new NotImplementedException();
  55. }
  56. [MonoTODO]
  57. public static bool IsValid (Type type)
  58. {
  59. throw new NotImplementedException();
  60. }
  61. [MonoTODO]
  62. public static bool IsValid (Type type, object instance,
  63. out License license)
  64. {
  65. throw new NotImplementedException();
  66. }
  67. [MonoTODO]
  68. public static void LockContext (object contextUser)
  69. {
  70. throw new NotImplementedException();
  71. }
  72. [MonoTODO]
  73. public static void UnlockContext (object contextUser)
  74. {
  75. throw new NotImplementedException();
  76. }
  77. [MonoTODO]
  78. public static void Validate (Type type)
  79. {
  80. throw new NotImplementedException();
  81. }
  82. [MonoTODO]
  83. public static License Validate (Type type, object instance)
  84. {
  85. throw new NotImplementedException();
  86. }
  87. }
  88. }