#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.Licensing](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing 'Abblix\.Oidc\.Server\.Features\.Licensing')

## AggregationExtensions Class

Provides extension methods for aggregating values from objects based on specific comparable properties\.

```csharp
public static class AggregationExtensions
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → AggregationExtensions
### Methods

## AggregationExtensions\.Greater\<T\>\(this Nullable\<T\>, Nullable\<T\>\) Method {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_)}

Determines the greater of two nullable values, treating null as positive infinity\.

```csharp
public static System.Nullable<T> Greater<T>(this System.Nullable<T> accumulatorValue, System.Nullable<T> currentValue)
    where T : struct, System.IComparable<T>;
```
#### Type parameters

###### `T` {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).T}

The type of the values being compared, constrained to value types that implement
            [System\.IComparable](https://learn.microsoft.com/en-us/dotnet/api/system.icomparable 'System\.IComparable')\.
#### Parameters

###### `accumulatorValue` [System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Greater\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1') {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).accumulatorValue}

The first nullable value to compare\.

###### `currentValue` [System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Greater\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1') {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).currentValue}

The second nullable value to compare\.

#### Returns
[System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Greater\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')  
The greater of the two values if at least one is non\-null; otherwise, null\. If both values are
            non\-null, the method returns null only if the [currentValue](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Greater_T_(thisSystem.Nullable_T_,System.Nullable_T_).currentValue 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Greater\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.currentValue') is null, indicating it is
            considered as positive infinity\.

### Remarks
This method is useful in scenarios where you're aggregating a collection of nullable values and consider
the absence of a value \(null\) as the highest possible value, allowing for custom maximum value logic\.

## AggregationExtensions\.Join\<T\>\(this HashSet\<T\>, HashSet\<T\>\) Method {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_)}

Combines the elements of two hash sets into a single set, including all unique elements from both\.

```csharp
public static System.Collections.Generic.HashSet<T>? Join<T>(this System.Collections.Generic.HashSet<T>? accumulator, System.Collections.Generic.HashSet<T>? current);
```
#### Type parameters

###### `T` {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_).T}

The type of elements in the hash sets\.
#### Parameters

###### `accumulator` [System\.Collections\.Generic\.HashSet&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1 'System\.Collections\.Generic\.HashSet\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Join\<T\>\(this System\.Collections\.Generic\.HashSet\<T\>, System\.Collections\.Generic\.HashSet\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1 'System\.Collections\.Generic\.HashSet\`1') {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_).accumulator}

The first hash set\.

###### `current` [System\.Collections\.Generic\.HashSet&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1 'System\.Collections\.Generic\.HashSet\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Join\<T\>\(this System\.Collections\.Generic\.HashSet\<T\>, System\.Collections\.Generic\.HashSet\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1 'System\.Collections\.Generic\.HashSet\`1') {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_).current}

The second hash set to combine with the first\.

#### Returns
[System\.Collections\.Generic\.HashSet&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1 'System\.Collections\.Generic\.HashSet\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Join_T_(thisSystem.Collections.Generic.HashSet_T_,System.Collections.Generic.HashSet_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Join\<T\>\(this System\.Collections\.Generic\.HashSet\<T\>, System\.Collections\.Generic\.HashSet\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1 'System\.Collections\.Generic\.HashSet\`1')  
A new hash set containing all unique elements from both input sets\. If both inputs are null, returns null\.

### Remarks
This method provides a convenient way to merge two sets of elements, ensuring that the result contains
all distinct elements from both sets\. It is particularly useful for combining collections of unique items
without duplicating any elements\.

## AggregationExtensions\.Lesser\<T\>\(this Nullable\<T\>, Nullable\<T\>\) Method {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_)}

Determines the lesser of two nullable values, treating null as negative infinity\.

```csharp
public static System.Nullable<T> Lesser<T>(this System.Nullable<T> currentValue, System.Nullable<T> accumulatorValue)
    where T : struct, System.IComparable<T>;
```
#### Type parameters

###### `T` {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).T}

The type of the values being compared, constrained to value types that implement
            [System\.IComparable&lt;&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.icomparable-1 'System\.IComparable\`1')\.
#### Parameters

###### `currentValue` [System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Lesser\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1') {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).currentValue}

The first nullable value to compare\.

###### `accumulatorValue` [System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Lesser\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1') {#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).accumulatorValue}

The second nullable value to compare\.

#### Returns
[System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).T 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Lesser\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.T')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')  
The lesser of the two values if at least one is non\-null; otherwise, null\. If both values are non\-null,
            the method returns null only if the [accumulatorValue](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Licensing.AggregationExtensions#Abblix.Oidc.Server.Features.Licensing.AggregationExtensions.Lesser_T_(thisSystem.Nullable_T_,System.Nullable_T_).accumulatorValue 'Abblix\.Oidc\.Server\.Features\.Licensing\.AggregationExtensions\.Lesser\<T\>\(this System\.Nullable\<T\>, System\.Nullable\<T\>\)\.accumulatorValue') is null, indicating it is considered
            as negative infinity\.

### Remarks
This method supports scenarios requiring aggregation of a series of nullable values where the absence of
a value \(null\) is interpreted as the lowest possible value, enabling custom minimum value logic\.
