forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSample01_HelloWorld.cs
executable file
·50 lines (45 loc) · 2.15 KB
/
Sample01_HelloWorld.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Threading.Tasks;
using Azure.Messaging.EventHubs.CheckpointStore.Blobs.Samples.Infrastructure;
namespace Azure.Messaging.EventHubs.CheckpointStore.Blobs.Samples
{
/// <summary>
/// An introduction to Event Hubs checkpoint storage using blobs, illustrating how to create an event
/// processor and configure it for using blob storage for checkpoints.
/// </summary>
///
public class Sample01_HelloWorld : IEventHubsBlobCheckpointSample
{
/// <summary>
/// The name of the sample.
/// </summary>
///
public string Name { get; } = nameof(Sample01_HelloWorld);
/// <summary>
/// A short description of the sample.
/// </summary>
///
public string Description { get; } = "An introduction to processing events using Azure blob storage for persisting checkpoints.";
/// <summary>
/// Runs the sample using the specified Event Hubs and Azure storage connection information.
/// </summary>
///
/// <param name="eventHubsConnectionString">The connection string for the Event Hubs namespace that the sample should target.</param>
/// <param name="eventHubName">The name of the Event Hub, sometimes known as its path, that the sample should run against.</param>
/// <param name="blobStorageConnectionString">The connection string for the storage account where checkpoints should be persisted.</param>
/// <param name="blobContainerName">The name of the blob storage container where checkpoints should be persisted.</param>
///
public async Task RunAsync(string eventHubsConnectionString,
string eventHubName,
string blobStorageConnectionString,
string blobContainerName)
{
// TODO: Create sample content
await Task.Delay(500);
Console.WriteLine("Connected to Event Hubs and storage");
Console.WriteLine();
}
}
}