Add source

This commit is contained in:
hexadecimal
2025-04-24 20:51:29 +03:00
parent 9badc969b8
commit e3c1cdea0e
92 changed files with 13471 additions and 0 deletions
@@ -0,0 +1,53 @@
#if NET5_0_OR_NETFRAMEWORK
using System;
using System.Collections;
namespace System.ComponentModel
{
// These compatibility classes are needed because we don't have a reference to System.ComponentModel
// in modern .NET or need to ensure consistent behavior across frameworks
#if !NET5_0_OR_GREATER
public abstract class License : IDisposable
{
protected License() { }
public abstract string LicenseKey { get; }
public abstract void Dispose();
}
// License provider abstract class
public abstract class LicenseProvider
{
protected LicenseProvider() { }
public abstract License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions);
}
// License context
public class LicenseContext : IServiceProvider
{
public LicenseContext() { }
public virtual object GetService(Type serviceType)
{
return null;
}
public virtual string GetSavedLicenseKey(Type type, string key)
{
return null;
}
public virtual void SetSavedLicenseKey(Type type, string key)
{
}
}
// License usage mode enum
public enum LicenseUsageMode
{
Designtime,
Runtime
}
#endif
}
#endif