pulumi/tests/testdata/codegen/config-variables/dotnet/Config/Config.cs

44 lines
1.3 KiB
C#

// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Immutable;
namespace Pulumi.Example
{
public static class Config
{
[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "IDE1006", Justification =
"Double underscore prefix used to avoid conflicts with variable names.")]
private sealed class __Value<T>
{
private readonly Func<T> _getter;
private T _value = default!;
private bool _set;
public __Value(Func<T> getter)
{
_getter = getter;
}
public T Get() => _set ? _value : _getter();
public void Set(T value)
{
_value = value;
_set = true;
}
}
private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("example");
private static readonly __Value<double?> _httpRetryWaitMax = new __Value<double?>(() => __config.GetDouble("httpRetryWaitMax"));
public static double? HttpRetryWaitMax
{
get => _httpRetryWaitMax.Get();
set => _httpRetryWaitMax.Set(value);
}
}
}