Exemplo n.º 1
0
 private IPromise DatabaseApiInitialized(DatabaseApi api)
 {
     return(api.GetChainId().Then(SetChainId).Then(() => Repository.SubscribeToNotice(api).Then(() => Repository.SubscribeToDynamicGlobalProperties(api).Then(() =>
     {
         OnDatabaseApiInitialized.SafeInvoke(api);
         return Promise.Resolved();
     }))));
 }
Exemplo n.º 2
0
 IPromise DatabaseApiInitialized(DatabaseApi api)
 {
     return(api.GetChainId().Then((Action <string>)SetChainId).Then(result => {
         return Repository.SubscribeToNotice(api).Then(() => {
             if (!OnDatabaseApiInitialized.IsNull())
             {
                 OnDatabaseApiInitialized.Invoke(api);
             }
             return Promise.Resolved();
         });
     }));
 }