Skip to content

Instantly share code, notes, and snippets.

@bgavrilMS
Created February 23, 2024 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgavrilMS/fd70a44bca9ad194d2d453c4e7b3669d to your computer and use it in GitHub Desktop.
Save bgavrilMS/fd70a44bca9ad194d2d453c4e7b3669d to your computer and use it in GitHub Desktop.
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
public class ManagedIdentityApplication
{
private ManagedIdentityClient _managedIdentityClient;
public ManagedIdentityApplication()
{
_managedIdentityClient = new ManagedIdentityClient();
}
}
public class ManagedIdentityClient
{
private static BaseManagedIdentitySource _managedIdentitySource;
public ManagedIdentityClient()
{
}
public int SendRequest()
{
if (_managedIdentitySource == null)
{
_managedIdentitySource = new Imds();
}
return _managedIdentitySource.MakeRequest();
}
}
public class HttpClientWithRetries
{
public string Send()
{
return "Hello, World!";
}
}
public class BaseManagedIdentitySource
{
private readonly HttpClientWithRetries _httpClientWithRetries;
public BaseManagedIdentitySource(HttpClientWithRetries httpClientWithRetries)
{
_httpClientWithRetries = httpClientWithRetries;
}
public int MakeRequest()
{
_httpClientWithRetries.Send();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment