Slide 32
Slide 32 text
wύϥϝʔλఆٛΛू
wύϥϝʔλͷݩωλຖʹ
IParameterSourceΛ࣮
w౷Ұతͳ*'ͰύϥϝʔλΞΫηε
32
$େ౷ҰͷϙΠϯτ
ϏϧυγεςϜΛ$େ౷Ұ͓ͨ͠
public readonly partial record struct Parameter(
string Name,
ParameterType ParameterType,
InputCondition InputCondition,
string EnvironmentVariableName,
string GitHubKey,
string SlackKey,
string InfoPlistKey,
string? Label = default,
Func? ValueFactory = default,
object? DefaultValue = default
)
public interface IParameterSource
{
bool TryGetValue(Parameter parameter, out object? value);
}
public partial record UnityProjectSettings(
UnityPlayerSettings PlayerSettings
) : IParameterSource {}
public sealed class EnvironmentVariable(
IConfiguration configuration
) : IParameterSource {}
public sealed class ParameterProvider
{
public T? GetValue(
Parameter parameter,
T? defaultValue = default
)
{
// 登録済の IParameterSource 達から値を取得
}
}