Class AdditionalFeaturesExtensions
Extension methods for the ISupportAdditionalFeatures interface
Inherited Members
Namespace: FluentMigrator.Infrastructure.Extensions
Assembly: FluentMigrator.Abstractions.dll
Syntax
public static class AdditionalFeaturesExtensions
Methods
| Edit this page View SourceGetAdditionalFeature<T>(ISupportAdditionalFeatures, string, Func<T>)
Gets an additional feature value
Declaration
public static T GetAdditionalFeature<T>(this ISupportAdditionalFeatures additionalFeatures, string key, Func<T> createDefaultValue)
Parameters
Type | Name | Description |
---|---|---|
ISupportAdditionalFeatures | additionalFeatures | The additional feature values |
string | key | The key into the AdditionalFeatures dictionary |
Func<T> | createDefaultValue | A lambda to create a default value |
Returns
Type | Description |
---|---|
T | The stored or a newly created value |
Type Parameters
Name | Description |
---|---|
T | The value type |
GetAdditionalFeature<T>(ISupportAdditionalFeatures, string, T)
Gets an additional feature value
Declaration
public static T GetAdditionalFeature<T>(this ISupportAdditionalFeatures additionalFeatures, string key, T defaultValue = default)
Parameters
Type | Name | Description |
---|---|---|
ISupportAdditionalFeatures | additionalFeatures | The additional feature values |
string | key | The key into the AdditionalFeatures dictionary |
T | defaultValue | The default value to be used if none was found |
Returns
Type | Description |
---|---|
T | The stored value or the |
Type Parameters
Name | Description |
---|---|
T | The value type |
SetAdditionalFeature<T>(ISupportAdditionalFeatures, string, T)
Sets the value for an additional feature
Declaration
public static void SetAdditionalFeature<T>(this ISupportAdditionalFeatures additionalFeatures, string key, T value)
Parameters
Type | Name | Description |
---|---|---|
ISupportAdditionalFeatures | additionalFeatures | The additional feature values |
string | key | The key into the AdditionalFeatures dictionary |
T | value | The value to be set |
Type Parameters
Name | Description |
---|---|
T | The value type |