Skip to content

Instantly share code, notes, and snippets.

@GeradeDev
Created July 17, 2020 10:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
[Binding]
[AttributeUsage(AttributeTargets.Parameter)]
public class RabbitMqTriggerAttribute : Attribute
{
public string HostName { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Port { get; set; }
public string Connection { get; set; }
public string QueueName { get; set; }
public RabbitMqTriggerAttribute(string queueName)
{
QueueName = queueName;
}
public void LoadRabbitSettings()
{
HostName = Environment.GetEnvironmentVariable("HostName");
Username = Environment.GetEnvironmentVariable("HostUsername");
Password = Environment.GetEnvironmentVariable("Password");
Port = Environment.GetEnvironmentVariable("Port");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment