Coree.NETASP
  • API
Show / Hide Table of Contents
  • Coree.NETASP.Extensions
    • HttpResponseExtensions
  • Coree.NETASP.Extensions.KestrelOptions
    • AuthenticationBuilderExtensions
    • ConfigureWebHostBuilderExtensions
    • ConfigureWebHostBuilderExtensions.ListenType
    • xExtensions
  • Coree.NETASP.Extensions.WebApplicationBuilderExtensions
    • WebAppBuilderExtensions
    • WebApplicationBuilderExtension
  • Coree.NETASP.Middleware
    • FailurePointsMiddleware
    • FailurePointsMiddlewareExtensions
    • FailurePointsMiddlewareOptions
    • RequestThrottlingMiddleware
  • Coree.NETASP.Middleware.AcceptLanguageFiltering
    • AcceptLanguageFilteringExtensions
    • AcceptLanguageFilteringMiddleware
    • AcceptLanguageFilteringOptions
  • Coree.NETASP.Middleware.DnsHostNameFiltering
    • DnsHostNameFilteringMiddleware
    • DnsHostNameFilteringMiddlewareExtensions
    • DnsHostNameFilteringOptions
  • Coree.NETASP.Middleware.HostNameFiltering
    • HostNameFilterOptions
    • HostNameFilteringExtensions
    • HostNameFilteringMiddleware
  • Coree.NETASP.Middleware.NewFolder
    • PreMiddlewareHostedService
    • WaitForPreMiddlewareHostedServiceMiddleware
    • fooExtensions
  • Coree.NETASP.Middleware.PathDeep
    • PathDeepFilteringExtensions
    • PathDeepFilteringMiddleware
    • PathDeepFilteringOptions
  • Coree.NETASP.Middleware.ProtocolFiltering
    • ProtocolFilteringMiddleware
    • ProtocolFilteringMiddlewareExtensions
    • ProtocolFilteringOptions
  • Coree.NETASP.Middleware.RequestLogging
    • RequestLoggingMiddleware
  • Coree.NETASP.Middleware.RequestUrlFiltering
    • RequestUrlFilteringExtensions
    • RequestUrlFilteringMiddleware
    • RequestUrlFilteringOptions
  • Coree.NETASP.Middleware.ResponseRecording
    • ResponseRecordingMiddleware
  • Coree.NETASP.Middleware.SegmentBlacklistFiltering
    • SegmentBlacklistFilterOptions
    • SegmentBlacklistFilteringExtensions
    • SegmentBlacklistFilteringMiddleware
  • Coree.NETASP.Middleware.UnwantedHeaderKeysFiltering
    • UnwantedHeaderKeysMiddleware
    • UnwantedHeaderKeysMiddlewareExtensions
    • UnwantedHeaderKeysOptions
  • Coree.NETASP.Middleware.UserAgentFiltering
    • UserAgentFilterOptions
    • UserAgentFilteringExtensions
    • UserAgentFilteringMiddleware
  • Coree.NETASP.Services.CertificateManager
    • CertificateManager
    • CertificateManagerService
    • CommonDistinguishedNameBuilder
    • DistinguishedName
    • ICertificateManagerService
  • Coree.NETASP.Services.CookieAuth
    • AuthExtensions
    • CookieAuthHandler
    • ICookieAuthHandler
  • Coree.NETASP.Services.Instancer
    • IServerConfigurationAnalyzer
    • ServerConfigurationAnalyzer
    • ServerConfigurationAnalyzer.ServerListenDetail
  • Coree.NETASP.Services.Points
    • Entry
    • IPointService
    • PointEntry
    • PointService
    • PointServiceOptions
  • Coree.NETASP.UnderConstruction
    • CustomWebApplication
    • CustomWebApplication2
    • DummyFileProvider
    • EmptyWebHostBuilder
    • EmptyWebHostBuilder2
    • EmptyWebHostBuilder3
    • EmptyWebHostBuilderx
    • ExampleClass
    • FileServerMiddleware
    • FileServerMiddlewareExtensions
    • MyWebHostBuilder
    • ObjectDumper
    • ObjectDumper2
    • ObjectDumper3
    • OptionsDumper
    • OptionsKestrelServerOptionsExtensions
    • PhpCgiExecutor
    • Product
    • PropertyAccessTracker<T>
    • ServicesDumper
    • TrackableItem<T>
    • TrackableList<T>
    • TrackableState

Class PointService

Inheritance
object
PointService
Implements
IPointService
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Coree.NETASP.Services.Points
Assembly: Coree.NETASP.dll
Syntax
public class PointService : IPointService

Constructors

| Edit this page View Source

PointService(IOptions<PointServiceOptions>, ILogger<PointService>, IHostApplicationLifetime)

Declaration
public PointService(IOptions<PointServiceOptions> options, ILogger<PointService> logger, IHostApplicationLifetime hostApplicationLifetime)
Parameters
Type Name Description
IOptions<PointServiceOptions> options
ILogger<PointService> logger
IHostApplicationLifetime hostApplicationLifetime

Methods

| Edit this page View Source

AddOrUpdateEntry(string, int, string)

Assigns points to a specific IP address.

Declaration
public Task AddOrUpdateEntry(string key, int points, string reason)
Parameters
Type Name Description
string key
int points

The number of points to assign.

string reason

The reason for assigning points.

Returns
Type Description
Task
| Edit this page View Source

DeleteEntry(string)

Declaration
public Task DeleteEntry(string key)
Parameters
Type Name Description
string key
Returns
Type Description
Task
| Edit this page View Source

DeleteKeySemaphore(string)

Deletes the semaphore for a specified key if it exists.

Declaration
public void DeleteKeySemaphore(string key)
Parameters
Type Name Description
string key

The key for which to delete the semaphore.

| Edit this page View Source

GetEntry(string)

Gets all point entries for a specific IP address.

Declaration
public Task<Entry?> GetEntry(string key)
Parameters
Type Name Description
string key
Returns
Type Description
Task<Entry>

An Entry object containing point entries.

| Edit this page View Source

LoadData()

Loads the point data from disk.

Declaration
public void LoadData()
| Edit this page View Source

SaveData()

Saves the point data to disk.

Declaration
public Task SaveData()
Returns
Type Description
Task
| Edit this page View Source

ShrinkEntrys(string)

Declaration
public Task ShrinkEntrys(string key)
Parameters
Type Name Description
string key
Returns
Type Description
Task
| Edit this page View Source

SortEntriesByLastUpdatedAsync()

Sorts the dictionary by the LastUpdated property of each entry.

Declaration
public void SortEntriesByLastUpdatedAsync()
| Edit this page View Source

StartAsync(CancellationToken)

Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task
| Edit this page View Source

StopAsync(CancellationToken)

Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

Implements

IPointService
  • Edit this page
  • View Source
In this article
Back to top