One.Neupart.Common
3.0.0
See the version list below for details.
dotnet add package One.Neupart.Common --version 3.0.0
NuGet\Install-Package One.Neupart.Common -Version 3.0.0
<PackageReference Include="One.Neupart.Common" Version="3.0.0" />
paket add One.Neupart.Common --version 3.0.0
#r "nuget: One.Neupart.Common, 3.0.0"
// Install One.Neupart.Common as a Cake Addin
#addin nuget:?package=One.Neupart.Common&version=3.0.0
// Install One.Neupart.Common as a Cake Tool
#tool nuget:?package=One.Neupart.Common&version=3.0.0
Namespace OneCommon
This library contains general and fully tested functionality for use in the NorthGRC application, the functionality will let you validate NorthGRC certificates and finc the inclosed information.
Getting Started
Include the latest version of the NuGet package One.Neupart.Common
Get the license from the Tenant table attribute Signature
The GetLicense will return a license if the signature sign is valid (not changed) or null
OneLicense? oneLicense = OneLicense.GetLicense(tenantLicense.Signature);
Check license dates
When a signed license is returned, you can use the IsValid method to check if the license is in the valid period (ValidFrom < today < ValidTo)
bool isValid = oneLicense.IsValid();
DateTime from = oneLicense.ValidFrom;
DateTime to = oneLicense.ValidTo;
Check license Workbenches
You can check for a single workbench, or simply get a list of all the allowed workbenches
bool enableGdpr = oneLicense.HasWorkbench(OneWorkbench.DataProtection);
List<OneWorkbench> workbenches = oneLicense.Workbenches;
Check license Limits
You can use the helper methof to get limit values, or simply get a list of all limits. Limits are in the format "key-number"
int domains = oneLicense.GetLimitValue(OneLicense.LimitEnterpriseDomain);
int members = oneLicense.GetLimitValue(OneLicense.LimitEnterpriseMemeber);
List<string> limits = oneLicense.Limits;
OneLicense
Sealed readonly class with a validated NorthGRC license. Use this as parameter to all methods that needs a valid license.
Enums
OneWorkbenches
A list of Workbenches available in the scope of the NorthGRC application and license
public enum OneWorkbench
{
InformationSecurity,
DataProtection,
Enterprise,
ESG,
None
}
OneModule
A list of Modules available in the scope of the NorthGRC application and license
public enum OneModule
{
Task,
Document,
Compliance,
Risk,
Quiz,
Vendor,
None
}
Constants
Limits are just text strings, but helper constants are provided by the class
public const string LimitEnterpriseDomain = "enterprisedomain";
public const string LimitEnterpriseMemeber = "enterprisemember";
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Removed OneSecurity and combined all functionality in the OneLicense class, Updated comments and description and added limits helper.