LicFileLicenseProvider.cs 834 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // System.ComponentModel.LicFileLicenseProvider.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 class LicFileLicenseProvider : LicenseProvider
  14. {
  15. public LicFileLicenseProvider()
  16. {
  17. }
  18. [MonoTODO]
  19. public override License GetLicense (LicenseContext context,
  20. Type type,
  21. object instance,
  22. bool allowExceptions)
  23. {
  24. throw new NotImplementedException();
  25. }
  26. protected virtual string GetKey (Type type)
  27. {
  28. return (type.FullName + " is a licensed component.");
  29. }
  30. protected virtual bool IsKeyValid (string key, Type type)
  31. {
  32. if (key == null)
  33. return false;
  34. return key.Equals (GetKey (type));
  35. }
  36. }
  37. }