• Home
  • Blog
  • Docs
  • GitHub
Show / Hide Table of Contents

Interface IConfigurationTypeMapper

Maps types to a correct string value that can be interpreted by the emulator configuration. Convention requires that there be a default converver for Enum types implemented by default

Namespace: Snowflake.Configuration
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IConfigurationTypeMapper

Properties

Item[Type, Object]

Converts a value to the format using a previously configured converter function

Declaration
string this[Type t, object value] { get; }
Parameters
Type Name Description
System.Type t

The type to convert

System.Object value

The value to convert

Property Value
Type Description
System.String

The converted value

Methods

Add<T>(Func<T, String>)

Adds a converter for this type mapper to support.

Declaration
void Add<T>(Func<T, string> converter)
Parameters
Type Name Description
System.Func<T, System.String> converter

The converter function

Type Parameters
Name Description
T

The type to convert

ConvertValue<T>(T)

Converts a value to the format using a previously configured converter function

Declaration
string ConvertValue<T>(T value)
Parameters
Type Name Description
T value

The value to convert

Returns
Type Description
System.String

The converted value

Type Parameters
Name Description
T

The type to convert

Built with ❤️ by @chyyran. Text content licensed under CC-BY-SA 4.0.