Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(bindings): change bindings to be ICollection #178

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/LEGO.AsyncAPI.Bindings/BindingsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static TCollection Add<TCollection, TItem>(
return destination;
}

public static IEnumerable<IBindingParser<IBinding>> All => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> All => new List<IBindingParser<IBinding>>
{
Pulsar,
Kafka,
Expand All @@ -57,51 +57,51 @@ public static TCollection Add<TCollection, TItem>(
MQTT,
};

public static IEnumerable<IBindingParser<IBinding>> Http => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> Http => new List<IBindingParser<IBinding>>
{
new HttpOperationBinding(),
new HttpMessageBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> Websockets => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> Websockets => new List<IBindingParser<IBinding>>
{
new WebSocketsChannelBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> Kafka => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> Kafka => new List<IBindingParser<IBinding>>
{
new KafkaServerBinding(),
new KafkaChannelBinding(),
new KafkaOperationBinding(),
new KafkaMessageBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> Pulsar => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> Pulsar => new List<IBindingParser<IBinding>>
{
new PulsarServerBinding(),
new PulsarChannelBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> Sqs => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> Sqs => new List<IBindingParser<IBinding>>
{
new SqsChannelBinding(),
new SqsOperationBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> Sns => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> Sns => new List<IBindingParser<IBinding>>
{
new SnsChannelBinding(),
new SnsOperationBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> AMQP => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> AMQP => new List<IBindingParser<IBinding>>
{
new AMQPChannelBinding(),
new AMQPOperationBinding(),
new AMQPMessageBinding(),
};

public static IEnumerable<IBindingParser<IBinding>> MQTT => new List<IBindingParser<IBinding>>
public static ICollection<IBindingParser<IBinding>> MQTT => new List<IBindingParser<IBinding>>
{
new MQTTServerBinding(),
new MQTTOperationBinding(),
Expand Down
2 changes: 1 addition & 1 deletion src/LEGO.AsyncAPI.Readers/AsyncApiReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public Dictionary<string, Func<AsyncApiAny, IAsyncApiExtension>>
{ get; set; } =
new Dictionary<string, Func<AsyncApiAny, IAsyncApiExtension>>();

public IEnumerable<IBindingParser<IBinding>>
public ICollection<IBindingParser<IBinding>>
Bindings
{ get; set; } =
new List<IBindingParser<IBinding>>();
Expand Down
Loading