Exemple #1
0
 public static async Task ConvertTimeouts(DocumentStore docStore)
 {
     foreach (var timeout in docStore.AllDocumentsStartingWith <TimeoutData>(Configuration.TimeoutDocumentsStartWith, 1024))
     {
         var proxy = EndpointProxy.GetProxy(timeout.OwningTimeoutManager);
         await proxy.TimeoutStorage.Add(timeout.ToCoreTimeoutData(), new ContextBag());
     }
 }
 private static async Task ConvertSubscription(Subscription subscription)
 {
     Console.WriteLine($"Converting subscriptions for {subscription.MessageType.TypeName}");
     foreach (var client in subscription.Subscribers)
     {
         var newSubscriber = new Subscriber(client.TransportAddress, client.Endpoint);
         var proxy         = EndpointProxy.GetProxy(client.Endpoint);
         await proxy.SubscriptionStorage.Subscribe(newSubscriber, subscription.MessageType, new ContextBag());
     }
 }