pulumi/tests/integration/stack_component/dotnet/Program.cs
Mikhail Shilkov f1cdce9488
Move .NET serialization attributes to Pulumi namespace (#3902)
Move .NET serialization attributes to Pulumi namespace, deprecate the ones in Pulumi.Serialization
2020-02-11 11:40:14 +01:00

29 lines
718 B
C#

// Copyright 2016-2019, Pulumi Corporation. All rights reserved.
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
class MyStack : Stack
{
[Output("abc")]
public Output<string> Abc { get; private set; }
[Output]
public Output<int> Foo { get; private set; }
// This should NOT be exported as stack output due to the missing attribute
public Output<string> Bar { get; private set; }
public MyStack()
{
this.Abc = Output.Create("ABC");
this.Foo = Output.Create(42);
this.Bar = Output.Create("this should not come to output");
}
}
class Program
{
static Task<int> Main(string[] args) => Deployment.RunAsync<MyStack>();
}