11// *** WARNING: this file was generated by Pulumi SDK Generator. ***
22// *** Do not edit by hand unless you're certain you know what you are doing! ***
33
4- using System ;
5- using System . IO ;
6- using System . Reflection ;
7- using Pulumi ;
8-
94namespace Pulumi . KubernetesIngressNginx
105{
116 static class Utilities
@@ -14,7 +9,7 @@ static class Utilities
149 {
1510 foreach ( var n in names )
1611 {
17- var value = Environment . GetEnvironmentVariable ( n ) ;
12+ var value = global :: System . Environment . GetEnvironmentVariable ( n ) ;
1813 if ( value != null )
1914 {
2015 return value ;
@@ -30,11 +25,11 @@ static class Utilities
3025 var s = GetEnv ( names ) ;
3126 if ( s != null )
3227 {
33- if ( Array . IndexOf ( trueValues , s ) != - 1 )
28+ if ( global :: System . Array . IndexOf ( trueValues , s ) != - 1 )
3429 {
3530 return true ;
3631 }
37- if ( Array . IndexOf ( falseValues , s ) != - 1 )
32+ if ( global :: System . Array . IndexOf ( falseValues , s ) != - 1 )
3833 {
3934 return false ;
4035 }
@@ -46,28 +41,29 @@ static class Utilities
4641
4742 public static double ? GetEnvDouble ( params string [ ] names ) => double . TryParse ( GetEnv ( names ) , out double v ) ? ( double ? ) v : null ;
4843
49- public static InvokeOptions WithVersion ( this InvokeOptions ? options )
44+ [ global ::System . Obsolete ( "Please use WithDefaults instead" ) ]
45+ public static global ::Pulumi . InvokeOptions WithVersion ( this global ::Pulumi . InvokeOptions ? options )
5046 {
51- if ( options ? . Version != null )
52- {
53- return options ;
54- }
55- return new InvokeOptions
56- {
57- Parent = options ? . Parent ,
58- Provider = options ? . Provider ,
59- Version = Version ,
60- } ;
47+ var dst = options ?? new global :: Pulumi . InvokeOptions { } ;
48+ dst . Version = options ? . Version ?? Version ;
49+ return dst ;
50+ }
51+
52+ public static global :: Pulumi . InvokeOptions WithDefaults ( this global :: Pulumi . InvokeOptions ? src )
53+ {
54+ var dst = src ?? new global :: Pulumi . InvokeOptions { } ;
55+ dst . Version = src ? . Version ?? Version ;
56+ return dst ;
6157 }
6258
6359 private readonly static string version ;
6460 public static string Version => version ;
6561
6662 static Utilities ( )
6763 {
68- var assembly = typeof ( Utilities ) . GetTypeInfo ( ) . Assembly ;
64+ var assembly = global :: System . Reflection . IntrospectionExtensions . GetTypeInfo ( typeof ( Utilities ) ) . Assembly ;
6965 using var stream = assembly . GetManifestResourceStream ( "Pulumi.KubernetesIngressNginx.version.txt" ) ;
70- using var reader = new StreamReader ( stream ?? throw new NotSupportedException ( "Missing embedded version.txt file" ) ) ;
66+ using var reader = new global :: System . IO . StreamReader ( stream ?? throw new global :: System . NotSupportedException ( "Missing embedded version.txt file" ) ) ;
7167 version = reader . ReadToEnd ( ) . Trim ( ) ;
7268 var parts = version . Split ( "\n " ) ;
7369 if ( parts . Length == 2 )
0 commit comments