Search Results for

Show / Hide Table of Contents

# Class LicenseService

Manages license file discovery, caching, and validation for CoreUpload v5. Searches for coreupload.lic in standard locations.

##### Inheritance

object
LicenseService

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: CoreUpload.Licensing

###### Assembly: CoreUpload.dll

##### Syntax

    public class LicenseService

### Constructors

#### LicenseService(IWebHostEnvironment, IHttpContextAccessor, ILogger<LicenseService>, IOptions<CoreUploadOptions>)

##### Declaration

    public LicenseService(IWebHostEnvironment env, IHttpContextAccessor httpContextAccessor, ILogger<LicenseService> logger, IOptions<CoreUploadOptions> options)

##### Parameters

Type | Name | Description
--- | --- | ---
IWebHostEnvironment | env |
IHttpContextAccessor | httpContextAccessor |
ILogger<LicenseService> | logger |
IOptions<CoreUploadOptions> | options |

### Methods

#### GetValidation()

Gets the current license validation result for this request. Results are cached per host (domain/IP licenses can differ per host).

##### Declaration

    public LicenseValidationResult GetValidation()

##### Returns

Type | Description
--- | ---
LicenseValidationResult |

#### IsLicensed()

Returns true if a valid license is present.

##### Declaration

    public bool IsLicensed()

##### Returns

Type | Description
--- | ---
bool |

#### LoadFromFile(string)

Loads a license from a specific file path (for manual configuration).

##### Declaration

    public void LoadFromFile(string filePath)

##### Parameters

Type | Name | Description
--- | --- | ---
string | filePath |