forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add blurb about dist tracing (Azure#17059)
- Addresses Azure#16238 - Update LineCounter sample app to show usage of Event Grid - Update LineCounter README to include a screenshot of Azure Monitor - Update Distributed Tracing section in Diagnostics readme to link to LineCounter. - Also add in DI extension methods.
- Loading branch information
1 parent
53e48da
commit a4e3453
Showing
9 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
.../Azure.Messaging.EventGrid/src/Compatibility/EventGridPublisherClientBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using Azure; | ||
using Azure.Core.Extensions; | ||
using Azure.Messaging.EventGrid; | ||
|
||
namespace Microsoft.Extensions.Azure | ||
{ | ||
/// <summary> | ||
/// The set of extensions to add the <see cref="EventGridPublisherClient"/> type to the clients builder. | ||
/// </summary> | ||
public static class EventGridPublisherClientBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Registers a <see cref="EventGridPublisherClient "/> instance with the provided <see cref="Uri"/> and <see cref="AzureKeyCredential"/>./>. | ||
/// </summary> | ||
public static IAzureClientBuilder<EventGridPublisherClient, EventGridPublisherClientOptions> AddEventGridPublisherClient<TBuilder>( | ||
this TBuilder builder, | ||
Uri endpoint, | ||
AzureKeyCredential credential) | ||
where TBuilder : IAzureClientFactoryBuilder => | ||
builder.RegisterClientFactory<EventGridPublisherClient, EventGridPublisherClientOptions>(options => new EventGridPublisherClient(endpoint, credential, options)); | ||
|
||
/// <summary> | ||
/// Registers a <see cref="EventGridPublisherClient "/> instance with the provided <see cref="Uri"/> and <see cref="EventGridSharedAccessSignatureCredential"/>./>. | ||
/// </summary> | ||
public static IAzureClientBuilder<EventGridPublisherClient, EventGridPublisherClientOptions> AddEventGridPublisherClient<TBuilder>( | ||
this TBuilder builder, | ||
Uri endpoint, | ||
EventGridSharedAccessSignatureCredential credential) | ||
where TBuilder : IAzureClientFactoryBuilder => | ||
builder.RegisterClientFactory<EventGridPublisherClient, EventGridPublisherClientOptions>(options => new EventGridPublisherClient(endpoint, credential, options)); | ||
|
||
/// <summary> | ||
/// Registers a <see cref="EventGridPublisherClient"/> instance with connection options loaded from the provided <paramref name="configuration"/> instance. | ||
/// </summary> | ||
public static IAzureClientBuilder<EventGridPublisherClient, EventGridPublisherClientOptions> AddEventGridPublisherClient<TBuilder, TConfiguration>( | ||
this TBuilder builder, | ||
TConfiguration configuration) | ||
where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration> => | ||
builder.RegisterClientFactory<EventGridPublisherClient, EventGridPublisherClientOptions>(configuration); | ||
} | ||
} |