LicenseContext.cs 884 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // System.ComponentModel.LicenseContext.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. using System.Reflection;
  12. namespace System.ComponentModel
  13. {
  14. // Serves as base class for RuntimeLicenseContext and DesignTimeLicenseContext
  15. // (no clue why this isn't abstract)
  16. public class LicenseContext : IServiceProvider
  17. {
  18. public LicenseContext()
  19. {
  20. }
  21. public virtual string GetSavedLicenseKey (Type type,
  22. Assembly resourceAssembly)
  23. {
  24. return null;
  25. }
  26. public virtual object GetService (Type type)
  27. {
  28. return null;
  29. }
  30. public virtual void SetSavedLicenseKey (Type type, string key)
  31. {
  32. // Intentionally empty
  33. }
  34. public virtual LicenseUsageMode UsageMode {
  35. get {
  36. return LicenseUsageMode.Runtime;
  37. }
  38. }
  39. }
  40. }