pulumi/sdk/dotnet/Pulumi.Tests/Core
Fraser Waters c4cd7214d1
Add Union.Bimap and some more InputUnion conversions (#8733)
Resolves https://github.com/pulumi/pulumi/issues/8753

This adds conversion operators so that you can cast a `Union<T0,T1>` or
`Output<Union<T0,T1>>` to an `InputUnion<T0,T1>`. Without this
conversions it wasn't possible to create an `InputUnion` with a union
value, you could only give it a `T0` or `T1` (or an output of them).

This also adds `Union.Bimap` to easily convert both sides of the union,
it was possible to write this with match but Bimap is slightly nicer:
```
union.Match<Union<TResult0, TResult1>>(t0 => mapFunc0(t0), t1 => mapFunc1(t1)))

union.Bimap(mapFunc0, mapFunc1)
```
2022-01-14 14:57:10 +00:00
..
InputTests.cs Add Union.Bimap and some more InputUnion conversions (#8733) 2022-01-14 14:57:10 +00:00
OutputTests.cs [dotnet/sdk] Add create unknown to output utilities (#7173) 2021-06-10 10:54:16 -04:00
ResourceArgsTests.cs [dotnet] Fix Resharper code issues (#7178) 2021-06-10 10:32:33 -04:00