-
Notifications
You must be signed in to change notification settings - Fork 152
Create custom .NET Aspire component #1355
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
Conversation
docs/extensibility/snippets/MailDevResource/MailKit.Client/MailKitClientFactory.cs
Outdated
Show resolved
Hide resolved
...sibility/snippets/MailDevResource/MailKit.Client/MailKitClientServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
docs/extensibility/snippets/MailDevResource/MailKit.Client/MailKitClientSettings.cs
Outdated
Show resolved
Hide resolved
...sibility/snippets/MailDevResource/MailKit.Client/MailKitClientServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
...sibility/snippets/MailDevResource/MailKit.Client/MailKitClientServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
b6e5ae2
to
83524af
Compare
docs/extensibility/snippets/MailDevResource/MailKit.Client/MailKitClientFactory.cs
Outdated
Show resolved
Hide resolved
...sibility/snippets/MailDevResource/MailKit.Client/MailKitClientServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
docs/extensibility/snippets/MailDevResource/MailKit.Client/MailKitClientFactory.cs
Outdated
Show resolved
Hide resolved
...sibility/snippets/MailDevResource/MailKit.Client/MailKitClientServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is impressive. It's ready to
if (builder.Configuration.GetConnectionString(connectionName) is string connectionString) | ||
{ | ||
settings.ParseConnectionString(connectionString); | ||
} | ||
|
||
if (builder.Configuration.GetSection( | ||
$"{configurationSectionName}:Credentials") is { } section) | ||
{ | ||
settings.ParseCredentials(section); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically we put this whole thing into the connection string, and not separate sections. That way there is only 1 "contract" between the Hosting piece and the Component libraries.
Also, that way you can have different credentials when you use a "keyed" service - if you had 2 mail connections.
Summary
Fixes #5
Internal previews