Skip to content

Instantly share code, notes, and snippets.

@oguzhancagliyan
Created September 30, 2020 00:13
Show Gist options
  • Save oguzhancagliyan/519a01149e34f4a22b0eb7f70932bbc0 to your computer and use it in GitHub Desktop.
Save oguzhancagliyan/519a01149e34f4a22b0eb7f70932bbc0 to your computer and use it in GitHub Desktop.
public class SqsSeeder
{
public static void CreateQueue(AmazonSQSClient client)
{
var installers = typeof(MovieLikeSeeder).Assembly.ExportedTypes
.Where(m => typeof(ISqsSeeder).IsAssignableFrom(m) && !m.IsInterface && !m.IsAbstract)
.Select(Activator.CreateInstance)
.Cast<ISqsSeeder>()
.ToList();
installers.ForEach(m => m.CreateQueue(client));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment