diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-FoundryAgent/Program.cs b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-FoundryAgent/Program.cs index 7f509084c0..11069c6403 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-FoundryAgent/Program.cs +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-FoundryAgent/Program.cs @@ -66,26 +66,26 @@ internal sealed class DevTemporaryTokenCredential : TokenCredential public DevTemporaryTokenCredential() { - _token = Environment.GetEnvironmentVariable(EnvironmentVariable); + this._token = Environment.GetEnvironmentVariable(EnvironmentVariable); } public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) { - return GetAccessToken(); + return this.GetAccessToken(); } public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) { - return new ValueTask(GetAccessToken()); + return new ValueTask(this.GetAccessToken()); } private AccessToken GetAccessToken() { - if (string.IsNullOrEmpty(_token)) + if (string.IsNullOrEmpty(this._token)) { throw new CredentialUnavailableException($"{EnvironmentVariable} environment variable is not set."); } - return new AccessToken(_token, DateTimeOffset.UtcNow.AddHours(1)); + return new AccessToken(this._token, DateTimeOffset.UtcNow.AddHours(1)); } } diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-LocalTools/Program.cs b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-LocalTools/Program.cs index f1b2f7e3bd..2a296f6ee4 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-LocalTools/Program.cs +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-LocalTools/Program.cs @@ -143,22 +143,22 @@ internal sealed class DevTemporaryTokenCredential : TokenCredential public DevTemporaryTokenCredential() { - _token = Environment.GetEnvironmentVariable(EnvironmentVariable); + this._token = Environment.GetEnvironmentVariable(EnvironmentVariable); } public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - => GetAccessToken(); + => this.GetAccessToken(); public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - => new(GetAccessToken()); + => new(this.GetAccessToken()); private AccessToken GetAccessToken() { - if (string.IsNullOrEmpty(_token)) + if (string.IsNullOrEmpty(this._token)) { throw new CredentialUnavailableException($"{EnvironmentVariable} environment variable is not set."); } - return new AccessToken(_token, DateTimeOffset.UtcNow.AddHours(1)); + return new AccessToken(this._token, DateTimeOffset.UtcNow.AddHours(1)); } } diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-McpTools/Program.cs b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-McpTools/Program.cs index a969b75477..0e97e5f84f 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-McpTools/Program.cs +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-McpTools/Program.cs @@ -109,22 +109,22 @@ internal sealed class DevTemporaryTokenCredential : TokenCredential public DevTemporaryTokenCredential() { - _token = Environment.GetEnvironmentVariable(EnvironmentVariable); + this._token = Environment.GetEnvironmentVariable(EnvironmentVariable); } public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - => GetAccessToken(); + => this.GetAccessToken(); public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - => new(GetAccessToken()); + => new(this.GetAccessToken()); private AccessToken GetAccessToken() { - if (string.IsNullOrEmpty(_token)) + if (string.IsNullOrEmpty(this._token)) { throw new CredentialUnavailableException($"{EnvironmentVariable} environment variable is not set."); } - return new AccessToken(_token, DateTimeOffset.UtcNow.AddHours(1)); + return new AccessToken(this._token, DateTimeOffset.UtcNow.AddHours(1)); } } diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-Workflows/Program.cs b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-Workflows/Program.cs index 6288e3cf5f..955bff62d0 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-Workflows/Program.cs +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/HostedAgentsV2/Hosted-Workflows/Program.cs @@ -76,22 +76,22 @@ internal sealed class DevTemporaryTokenCredential : TokenCredential public DevTemporaryTokenCredential() { - _token = Environment.GetEnvironmentVariable(EnvironmentVariable); + this._token = Environment.GetEnvironmentVariable(EnvironmentVariable); } public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - => GetAccessToken(); + => this.GetAccessToken(); public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - => new(GetAccessToken()); + => new(this.GetAccessToken()); private AccessToken GetAccessToken() { - if (string.IsNullOrEmpty(_token)) + if (string.IsNullOrEmpty(this._token)) { throw new CredentialUnavailableException($"{EnvironmentVariable} environment variable is not set."); } - return new AccessToken(_token, DateTimeOffset.UtcNow.AddHours(1)); + return new AccessToken(this._token, DateTimeOffset.UtcNow.AddHours(1)); } }