/// <summary> /// Handles the specified bridge command line options. /// </summary> /// <param name="options"> /// The options. /// </param> public static void Handle(BridgeOptions options) { if (options.IsVerbose) { Debug.Listeners.Add(new ColoredConsoleTraceListener()); } var destination = CreateMessageBus( options.DestinationConnectionString, options.DestinationFactory, string.Empty); var source = CreateMessageBus( options.SourceConnectionString, options.SourceFactory, options.StorageConnectionString); var description = new MessageBusBridgeDescription { BridgeName = "GoldenBridge", SourceBus = source, SourceEntity = options.SourceEntity, TargetBus = destination, TargetEntity = options.DestinationEntity }; var bridge = new MySimpleMessageBridge(); bridge.InitializeAsync(description).Wait(); Console.WriteLine("Press any key to exist..."); Console.ReadKey(); Console.WriteLine("Closing bridge..."); bridge.CloseAsync().ContinueWith(t => Console.WriteLine("Bridge is closed.")).Wait(); }