mirror of https://github.com/pulumi/pulumi.git
38 lines
1.2 KiB
C#
38 lines
1.2 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.ComponentModel;
|
|
using Pulumi;
|
|
|
|
namespace Pulumi.Example.Local
|
|
{
|
|
[EnumType]
|
|
public readonly struct MyEnum : IEquatable<MyEnum>
|
|
{
|
|
private readonly double _value;
|
|
|
|
private MyEnum(double value)
|
|
{
|
|
_value = value;
|
|
}
|
|
|
|
public static MyEnum Pi { get; } = new MyEnum(3.1415);
|
|
public static MyEnum Small { get; } = new MyEnum(1e-07);
|
|
|
|
public static bool operator ==(MyEnum left, MyEnum right) => left.Equals(right);
|
|
public static bool operator !=(MyEnum left, MyEnum right) => !left.Equals(right);
|
|
|
|
public static explicit operator double(MyEnum value) => value._value;
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public override bool Equals(object? obj) => obj is MyEnum other && Equals(other);
|
|
public bool Equals(MyEnum other) => _value == other._value;
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public override int GetHashCode() => _value.GetHashCode();
|
|
|
|
public override string ToString() => _value.ToString();
|
|
}
|
|
}
|