< Summary

Class:Azure.Messaging.EventHubs.Samples.Program
Assembly:Azure.Messaging.EventHubs.Samples
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\samples\Program.cs
Covered lines:0
Uncovered lines:185
Coverable lines:185
Total lines:609
Line coverage:0% (0 of 185)
Covered branches:0
Total branches:84
Branch coverage:0% (0 of 84)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-0%100%
Main()-0%0%
RetrieveSample()-0%0%
IsGoBack(...)-0%100%
IsEventHubsIdentity(...)-0%100%
IsLastOption(...)-0%0%
PrintEventHubsSamples(...)-0%0%
PrintEventHubsIdentitySamples(...)-0%0%
PrintSamples(...)-0%0%
PromptConnectionStringIfMissing(...)-0%0%
PromptEventHubNameIfMissing(...)-0%0%
PromptClientIdIfMissing(...)-0%0%
PromptFullyQualifiedNamespaceIfMissing(...)-0%0%
PromptSecretIfMissing(...)-0%0%
PromptTenantIdIfMissing(...)-0%0%
DisplayHelp()-0%0%
ReadSelection(...)-0%0%
ReadSelection(...)-0%0%
ParseArguments(...)-0%0%
LocateSamples()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\samples\Program.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Collections.Generic;
 6using System.Linq;
 7using System.Threading.Tasks;
 8using Azure.Messaging.EventHubs.Samples.Infrastructure;
 9
 10namespace Azure.Messaging.EventHubs.Samples
 11{
 12    /// <summary>
 13    ///
 14    ///   The main entry point for executing the samples.
 15    ///
 16    ///   To run a sample, after a successful build, go to the following folder:
 17    ///
 18    ///   "artifacts\bin\Azure.Messaging.EventHubs.Samples\Debug\"
 19    ///
 20    ///   If using .NET Core, move to the corresponding sub-folder and launch
 21    ///   one of the following commands from command line:
 22    ///
 23    ///      dotnet Azure.Messaging.EventHubs.Samples.dll `
 24    ///          --ConnectionString "<< YOUR_CONNECTION_STRING >>" `
 25    ///          --EventHub "<< YOUR_EVENT_HUB_NAME >>"
 26    ///
 27    ///   To run an identity sample extra parameters will be needed:
 28    ///
 29    ///      dotnet Azure.Messaging.EventHubs.Samples.dll `
 30    ///          --FullyQualifiedNamespace "{yournamespace}.servicebus.windows.net" `
 31    ///          --EventHub "<< YOUR_EVENT_HUB_NAME >>" `
 32    ///          --TenantId " << YOUR_TENANT_ID >> " `
 33    ///          --ClientId "<< YOUR_CLIENT_ID >>" `
 34    ///          --Secret "<< YOUR_SECRET_ID >>"
 35    ///
 36    /// </summary>
 37    ///
 38    public static class Program
 39    {
 40        /// <summary>
 41        ///   A set of controlling options displayed to the user on console.
 42        /// </summary>
 43        ///
 044        private static readonly string[] ExtraOptionsForSamples = new[]
 045        {
 046            "Explore Identity Samples"
 047        };
 48
 49        /// <summary>
 50        ///   A set of controlling option displayed to the user if they choose to explore identity samples.
 51        /// </summary>
 52        ///
 053        private static readonly string[] ExtraOptionsForIdentitySamples = new[]
 054        {
 055            "Go Back"
 056        };
 57
 58        /// <summary>
 59        ///   Serves as the main entry point of the application.
 60        /// </summary>
 61        ///
 62        /// <param name="args">The set of command line arguments passed.</param>
 63        ///
 64        public static async Task Main(string[] args)
 65        {
 66            // Parse the command line arguments determine if help was explicitly requested or if the
 67            // needed information was passed.
 68
 069            CommandLineArguments parsedArgs = ParseArguments(args);
 70
 071            if (parsedArgs.Help)
 72            {
 073                DisplayHelp();
 074                return;
 75            }
 76
 77            // Display the welcome message.
 78
 079            Console.WriteLine();
 080            Console.WriteLine("=========================================");
 081            Console.WriteLine("Welcome to the Event Hubs client library!");
 082            Console.WriteLine("=========================================");
 083            Console.WriteLine();
 84
 085            ISample sample = RetrieveSample();
 86
 087            if (sample == null)
 88            {
 089                Console.WriteLine();
 090                Console.WriteLine();
 091                Console.WriteLine("Quitting...");
 092                Console.WriteLine();
 93
 094                return;
 95            }
 96            else
 97            {
 098                Console.WriteLine();
 099                Console.WriteLine();
 0100                Console.WriteLine();
 0101                Console.WriteLine("-------------------------------------------------------------------------");
 0102                Console.WriteLine($"Running: { sample.Name }");
 0103                Console.WriteLine("-------------------------------------------------------------------------");
 0104                Console.WriteLine();
 105            }
 106
 107            // Run the chosen sample
 108
 0109            if (sample is IEventHubsSample eventHubsSample)
 110            {
 0111                PromptConnectionStringIfMissing(parsedArgs);
 0112                PromptEventHubNameIfMissing(parsedArgs);
 113
 0114                await eventHubsSample.RunAsync(parsedArgs.ConnectionString, parsedArgs.EventHub);
 115            }
 0116            else if (sample is IEventHubsIdentitySample identitySample)
 117            {
 0118                PromptFullyQualifiedNamespaceIfMissing(parsedArgs);
 0119                PromptEventHubNameIfMissing(parsedArgs);
 0120                PromptTenantIdIfMissing(parsedArgs);
 0121                PromptClientIdIfMissing(parsedArgs);
 0122                PromptSecretIfMissing(parsedArgs);
 123
 0124                await identitySample.RunAsync(parsedArgs.FullyQualifiedNamespace,
 0125                                              parsedArgs.EventHub,
 0126                                              parsedArgs.Tenant,
 0127                                              parsedArgs.Client,
 0128                                              parsedArgs.Secret);
 129            }
 0130        }
 131
 132        /// <summary>
 133        ///   It prints a list of options to console for the user. It reads the user's
 134        ///   choice then it returns the chosen sample.
 135        /// </summary>
 136        ///
 137        /// <returns>A sample or null if that could not be determined.</returns>
 138        ///
 139        private static ISample RetrieveSample()
 140        {
 0141            var samples = LocateSamples<IEventHubsSample>();
 142
 0143            PrintEventHubsSamples(samples);
 144
 0145            int? choice = ReadSelection(samples);
 146
 0147            if (IsEventHubsIdentity(samples, choice))
 148            {
 0149                var identitySamples = LocateSamples<IEventHubsIdentitySample>();
 150
 0151                PrintEventHubsIdentitySamples(identitySamples);
 152
 0153                while (IsEventHubsIdentity(samples, choice))
 154                {
 0155                    choice = ReadSelection(identitySamples);
 156
 0157                    if (choice.HasValue && !IsGoBack(identitySamples, choice))
 158                    {
 0159                        return identitySamples[choice.Value];
 160                    }
 0161                    else if (IsGoBack(identitySamples, choice))
 162                    {
 0163                        choice = ReadSelection(samples);
 164                    }
 165                }
 166            }
 167
 0168            if (choice.HasValue)
 169            {
 0170                return samples[choice.Value];
 171            }
 172
 0173            return null;
 174        }
 175
 176        /// <summary>
 177        ///   It checks if an option is to go back.
 178        /// </summary>
 179        ///
 180        /// <param name="identitySamples">A list of identity samples</param>
 181        /// <param name="choice">The zero-based index referring to the option chosen from console</param>
 182        ///
 183        /// <returns>If the user has chosed to go back in the main sample listing.</returns>
 184        ///
 185        private static bool IsGoBack(IReadOnlyList<IEventHubsIdentitySample> identitySamples, int? choice)
 186        {
 0187            return IsLastOption(identitySamples, ExtraOptionsForIdentitySamples.Length, choice);
 188        }
 189
 190        /// <summary>
 191        ///   It checks if an option is to see the identity samples.
 192        /// </summary>
 193        ///
 194        /// <param name="samples">A list of samples</param>
 195        /// <param name="choice">The zero-based index referring to the option chosen from console</param>
 196        ///
 197        /// <returns>If the user has chosen to see the event hubs identity samples.</returns>
 198        ///
 199        private static bool IsEventHubsIdentity(IReadOnlyList<IEventHubsSample> samples, int? choice)
 200        {
 0201            return IsLastOption(samples, ExtraOptionsForSamples.Length, choice);
 202        }
 203
 204        /// <summary>
 205        ///   It checks if an option is the last available.
 206        /// </summary>
 207        ///
 208        /// <param name="samples">A list of identity samples</param>
 209        /// <param name="numberOfExtraOptions">The number of extra options available for the category of samples</param>
 210        /// <param name="choice">The zero-based index referring to the option chosen from console</param>
 211        ///
 212        /// <typeparam name="TSampleCategory">The category of samples selected.</typeparam>
 213        ///
 214        /// <returns>If the users have chosen the last of the set of options that were presented to them.</returns>
 215        ///
 216        private static bool IsLastOption<TSampleCategory>(IReadOnlyList<TSampleCategory> samples, int? numberOfExtraOpti
 217        {
 0218            return choice == (samples.Count + numberOfExtraOptions - 1);
 219        }
 220
 221        /// <summary>
 222        ///   It prints to console a set of samples and controlling options.
 223        /// </summary>
 224        ///
 225        /// <param name="samples">A list of samples to be printed</param>
 226        ///
 227        private static void PrintEventHubsSamples(IReadOnlyList<ISample> samples)
 228        {
 0229            PrintSamples(samples);
 230
 0231            for (int i = 0; i < ExtraOptionsForSamples.Length; i++)
 232            {
 0233                Console.WriteLine($"{ samples.Count + i + 1 }) { ExtraOptionsForSamples[i] }");
 0234                Console.WriteLine();
 235            }
 236
 0237            Console.WriteLine();
 0238        }
 239
 240        /// <summary>
 241        ///   It prints to console a set of identity samples and controlling options.
 242        /// </summary>
 243        ///
 244        /// <param name="samples">A list of samples to be printed</param>
 245        ///
 246        private static void PrintEventHubsIdentitySamples(IReadOnlyList<ISample> samples)
 247        {
 0248            PrintSamples(samples);
 249
 0250            for (int i = 0; i < ExtraOptionsForIdentitySamples.Length; i++)
 251            {
 0252                Console.WriteLine($"{ samples.Count + i + 1 }) { ExtraOptionsForIdentitySamples[i] }");
 0253                Console.WriteLine();
 254            }
 255
 0256            Console.WriteLine();
 0257        }
 258
 259        /// <summary>
 260        ///   It prints to console a set of sample names and their description.
 261        /// </summary>
 262        ///
 263        /// <param name="samples">A list of samples to be printed</param>
 264        ///
 265        private static void PrintSamples(IReadOnlyList<ISample> samples)
 266        {
 267            // Display the set of available samples and allow the user to choose.
 268
 0269            Console.WriteLine();
 0270            Console.WriteLine("Available Samples:");
 0271            Console.WriteLine();
 272
 0273            for (var index = 0; index < samples.Count; ++index)
 274            {
 0275                Console.WriteLine($"{ index + 1 }) { samples[index].Name }");
 0276                Console.WriteLine($"\t{ samples[index].Description }");
 0277                Console.WriteLine();
 278            }
 0279        }
 280
 281        /// <summary>
 282        ///   Prompt the user to insert the EventHubs connection string, if not
 283        ///   already passed it from command line.
 284        /// </summary>
 285        ///
 286        /// <param name="parsedArgs">The arguments passed from console.</param>
 287        ///
 288        private static void PromptConnectionStringIfMissing(CommandLineArguments parsedArgs)
 289        {
 290            // Prompt for the connection string, if it wasn't passed.
 291
 0292            while (string.IsNullOrEmpty(parsedArgs.ConnectionString))
 293            {
 0294                Console.Write("Please provide the connection string for the Event Hubs namespace that you'd like to use 
 0295                parsedArgs.ConnectionString = Console.ReadLine().Trim();
 0296                Console.WriteLine();
 297            }
 0298        }
 299
 300        /// <summary>
 301        ///   Prompt the user to insert the EventHubs fully qualified name, if not
 302        ///   already passed it from command line.
 303        /// </summary>
 304        ///
 305        /// <param name="parsedArgs">The arguments passed from console.</param>
 306        ///
 307        private static void PromptEventHubNameIfMissing(CommandLineArguments parsedArgs)
 308        {
 309            // Prompt for the Event Hub name, if it wasn't passed.
 310
 0311            while (string.IsNullOrEmpty(parsedArgs.EventHub))
 312            {
 0313                Console.Write("Please provide the name of the Event Hub that you'd like to use and then press Enter: ");
 0314                parsedArgs.EventHub = Console.ReadLine().Trim();
 0315                Console.WriteLine();
 316            }
 0317        }
 318
 319        /// <summary>
 320        ///   Prompt the user to insert the Azure Active Directory service client id, if not
 321        ///   already passed it from command line.
 322        /// </summary>
 323        ///
 324        /// <param name="parsedArgs">The arguments passed from console.</param>
 325        ///
 326        private static void PromptClientIdIfMissing(CommandLineArguments parsedArgs)
 327        {
 328            // Prompt for the Event Hub name, if it wasn't passed.
 329
 0330            while (string.IsNullOrEmpty(parsedArgs.Client))
 331            {
 0332                Console.Write("Please provide the Azure Active Directory client identifier of the service principal: ");
 0333                parsedArgs.Client = Console.ReadLine().Trim();
 0334                Console.WriteLine();
 335            }
 0336        }
 337
 338        /// <summary>
 339        ///   Prompt the user to insert the EventHubs fully qualified namespace, if not
 340        ///   already passed it from command line.
 341        /// </summary>
 342        ///
 343        /// <param name="parsedArgs">The arguments passed from console.</param>
 344        ///
 345        private static void PromptFullyQualifiedNamespaceIfMissing(CommandLineArguments parsedArgs)
 346        {
 347            // Prompt for the Fully Qualified Namespace, if it wasn't passed.
 348
 0349            while (string.IsNullOrEmpty(parsedArgs.FullyQualifiedNamespace))
 350            {
 0351                Console.Write("Please provide the fully qualified Event Hubs namespace.  This is likely to be similar to
 0352                parsedArgs.FullyQualifiedNamespace = Console.ReadLine().Trim();
 0353                Console.WriteLine();
 354            }
 0355        }
 356
 357        /// <summary>
 358        ///   Prompt the user to insert the Azure Active Directory service principal secret, if not
 359        ///   already passed it from command line.
 360        /// </summary>
 361        ///
 362        /// <param name="parsedArgs">The arguments passed from console.</param>
 363        ///
 364        private static void PromptSecretIfMissing(CommandLineArguments parsedArgs)
 365        {
 366            // Prompt for the Secret, if it wasn't passed.
 367
 0368            while (string.IsNullOrEmpty(parsedArgs.Secret))
 369            {
 0370                Console.Write("Please provide the Azure Active Directory secret of the service principal: ");
 0371                parsedArgs.Secret = Console.ReadLine().Trim();
 0372                Console.WriteLine();
 373            }
 0374        }
 375
 376        /// <summary>
 377        ///   Prompt the user to insert the Azure Active Directory tenant id, if not already passed it from
 378        ///   command line.
 379        /// </summary>
 380        ///
 381        /// <param name="parsedArgs">The arguments passed from console.</param>
 382        ///
 383        private static void PromptTenantIdIfMissing(CommandLineArguments parsedArgs)
 384        {
 385            // The Azure Active Directory tenant that holds the service principal.
 386
 0387            while (string.IsNullOrEmpty(parsedArgs.Tenant))
 388            {
 0389                Console.Write("Please provide the Azure Active Directory tenant of the service principal: ");
 0390                parsedArgs.Tenant = Console.ReadLine().Trim();
 0391                Console.WriteLine();
 392            }
 0393        }
 394
 395        /// <summary>
 396        ///   Displays the help text for running the samples to the console output.
 397        /// </summary>
 398        ///
 399        private static void DisplayHelp()
 400        {
 0401            Console.WriteLine();
 0402            Console.WriteLine($"{ typeof(Program).Namespace }");
 0403            Console.WriteLine();
 0404            Console.WriteLine("This executable allows for running the Azure Event Hubs client library samples.  Because"
 0405            Console.WriteLine("the samples run against live Azure services, they require an Event Hubs namespace and an"
 0406            Console.WriteLine("Event Hub under it in order to run.");
 0407            Console.WriteLine();
 0408            Console.WriteLine();
 0409            Console.WriteLine("Arguments:");
 0410            Console.WriteLine($"\t{ nameof(CommandLineArguments.Help) }:");
 0411            Console.WriteLine("\t\tDisplays this message.");
 0412            Console.WriteLine();
 0413            Console.WriteLine($"\t{ nameof(CommandLineArguments.ConnectionString) }:");
 0414            Console.WriteLine("\t\tThe connection string to the Event Hubs namespace to use for the samples.");
 0415            Console.WriteLine();
 0416            Console.WriteLine($"\t{ nameof(CommandLineArguments.EventHub) }:");
 0417            Console.WriteLine("\t\tThe name of the Event Hub under the namespace to use.");
 0418            Console.WriteLine();
 0419            Console.WriteLine("Usage:");
 0420            Console.WriteLine($"\tAzure.Messaging.EventHubs.Samples.exe");
 0421            Console.WriteLine();
 0422            Console.WriteLine($"\tAzure.Messaging.EventHubs.Samples.exe { CommandLineArguments.ArgumentPrefix }{ nameof(
 0423            Console.WriteLine();
 0424            Console.WriteLine("\tAzure.Messaging.EventHubs.Samples.exe \"Endpoint=sb://fake.servicebus.windows.net/;Shar
 0425            Console.WriteLine();
 0426            Console.WriteLine($"\tAzure.Messaging.EventHubs.Samples.exe { CommandLineArguments.ArgumentPrefix }{ nameof(
 0427            Console.WriteLine();
 0428        }
 429
 430        /// <summary>
 431        ///   Reads the selection of the application's user from the console for samples.
 432        /// </summary>
 433        ///
 434        /// <param name="samples">The available samples.</param>
 435        ///
 436        /// <typeparam name="TSampleCategory">The interface associated with the category of samples.</typeparam>
 437        ///
 438        /// <returns>The validated selection that was made.</returns>
 439        ///
 0440        private static int? ReadSelection<TSampleCategory>(IReadOnlyList<TSampleCategory> samples) => samples switch
 0441        {
 0442            IReadOnlyList<IEventHubsSample> eventHubSamples => ReadSelection(eventHubSamples.Count + ExtraOptionsForSamp
 0443            IReadOnlyList<IEventHubsIdentitySample> identitySamples => ReadSelection(identitySamples.Count + ExtraOption
 0444            _ => throw new ArgumentException()
 0445        };
 446
 447        /// <summary>
 448        ///   Reads the selection of the application's user from the console.
 449        /// </summary>
 450        ///
 451        /// <param name="optionsCount">The count of available options.</param>
 452        ///
 453        /// <returns>The validated selection that was made.</returns>
 454        ///
 455        private static int? ReadSelection(int optionsCount)
 456        {
 457            while (true)
 458            {
 0459                Console.Write("Please enter the number of a sample to run or press \"X\" to exit: ");
 460
 0461                var value = Console.ReadLine();
 462
 0463                if (string.Equals(value, "X", StringComparison.OrdinalIgnoreCase))
 464                {
 0465                    return null;
 466                }
 467
 0468                if (Int32.TryParse(value, out var choice))
 469                {
 0470                    --choice;
 471
 0472                    if ((choice >= 0) && (choice < optionsCount))
 473                    {
 0474                        return choice;
 475                    }
 476                }
 477            }
 478        }
 479
 480        /// <summary>
 481        ///   Parses the set of arguments read from the command line.
 482        /// </summary>
 483        ///
 484        /// <param name="args">The command line arguments.</param>
 485        ///
 486        /// <returns>The set of parsed arguments, with any values for known items captured and cleaned.</returns>
 487        ///
 488        private static CommandLineArguments ParseArguments(string[] args)
 489        {
 490            // If at least two arguments were passed with no argument designator, then assume they're values and
 491            // accept them positionally.
 492
 0493            if ((args.Length >= 2) && (!args[0].StartsWith(CommandLineArguments.ArgumentPrefix)) && (!args[1].StartsWith
 494            {
 0495                return new CommandLineArguments { ConnectionString = args[0], EventHub = args[1] };
 496            }
 497
 0498            var parsedArgs = new CommandLineArguments();
 499
 500            // Enumerate the arguments that were passed, stopping one before the
 501            // end, since we're scanning forward by an item to retrieve values;  if a
 502            // command was passed in the last position, there was no accompanying value,
 503            // so it isn't useful.
 504
 0505            for (var index = 0; index < args.Length - 1; ++index)
 506            {
 507                // Remove any excess spaces to comparison purposes.
 508
 0509                args[index] = args[index].Trim();
 510
 511                // Help is the only flag argument supported; check for it before making
 512                // assumptions about argument/value pairings that comprise the other tokens.
 513
 0514                if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Help) }", 
 515                {
 0516                    parsedArgs.Help = true;
 0517                    continue;
 518                }
 519
 520                // Since we're evaluating the next token in sequence as a value in the
 521                // checks that follow, if it is an argument, we'll skip to the next iteration.
 522
 0523                if (args[index + 1].StartsWith(CommandLineArguments.ArgumentPrefix))
 524                {
 525                    continue;
 526                }
 527
 528                // If the current token is one of our known arguments, capture the next token in sequence as it's
 529                // value, since we've already ruled out that it is another argument name.
 530
 0531                if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Connection
 532                {
 0533                    parsedArgs.ConnectionString = args[index + 1].Trim();
 534                }
 0535                else if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Event
 536                {
 0537                    parsedArgs.EventHub = args[index + 1].Trim();
 538                }
 0539                else if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Clien
 540                {
 0541                    parsedArgs.Client = args[index + 1].Trim();
 542                }
 0543                else if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Fully
 544                {
 0545                    parsedArgs.FullyQualifiedNamespace = args[index + 1].Trim();
 546                }
 0547                else if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Tenan
 548                {
 0549                    parsedArgs.Tenant = args[index + 1].Trim();
 550                }
 0551                else if (args[index].Equals($"{ CommandLineArguments.ArgumentPrefix }{ nameof(CommandLineArguments.Secre
 552                {
 0553                    parsedArgs.Secret = args[index + 1].Trim();
 554                }
 555            }
 556
 0557            return parsedArgs;
 558        }
 559
 560        /// <summary>
 561        ///   Locates the samples within the solution and creates an instance
 562        ///   that can be inspected and run.
 563        /// </summary>
 564        ///
 565        /// <typeparam name="TSampleCategory">The interface associated with the category of samples that should be locat
 566        ///
 567        /// <returns>The set of samples defined in the solution.</returns>
 568        ///
 569        private static IReadOnlyList<TSampleCategory> LocateSamples<TSampleCategory>() =>
 0570            typeof(Program)
 0571              .Assembly
 0572              .ExportedTypes
 0573              .Where(type => (type.IsClass && typeof(TSampleCategory).IsAssignableFrom(type)))
 0574              .Select(type => (TSampleCategory)Activator.CreateInstance(type))
 0575              .ToList();
 576
 577        /// <summary>
 578        ///   Provides a local means of collecting and passing
 579        ///   the command line arguments received.
 580        /// </summary>
 581        ///
 582        private class CommandLineArguments
 583        {
 584            /// <summary>The sequence of characters that prefix a command-line argument.</summary>
 585            public const string ArgumentPrefix = "--";
 586
 587            /// <summary>The connection string to the Azure Event Hubs namespace for samples.</summary>
 588            public string ConnectionString;
 589
 590            /// <summary>The name of the Event Hub to use samples.</summary>
 591            public string EventHub;
 592
 593            /// <summary>The fully qualified Event Hubs namespace.  This is likely to be similar to <c>{yournamespace}.s
 594            public string FullyQualifiedNamespace;
 595
 596            /// <summary>The Azure Active Directory tenant that holds the service principal.</summary>
 597            public string Tenant;
 598
 599            /// <summary>The Azure Active Directory client identifier of the service principal.</summary>
 600            public string Client;
 601
 602            /// <summary>The Azure Active Directory secret of the service principal.</summary>
 603            public string Secret;
 604
 605            /// <summary>A flag indicating whether or not help was requested.</summary>
 606            public bool Help;
 607        }
 608    }
 609}