Ejemplo n.º 1
0
        public async Task <Wallet> CreateWallet(FileInfo walletFile)
        {
            Wallet newWallet     = null;
            var    creationSheet = new WalletCreationSheetController(walletFile);
            var    creationLock  = new SemaphoreLite();

            await creationLock.WaitAsync();

            creationSheet.ShowSheet(Window);
            creationSheet.DidCreate += (sender, e) => newWallet = e.Wallet;
            creationSheet.DidClose  += (sender, e) => creationLock.Release();

            await creationLock.WaitAsync();

            creationLock.Release();
            return(newWallet);
        }
		public async Task<Wallet> CreateWallet(FileInfo walletFile) {
			Wallet newWallet = null;
			var creationSheet = new WalletCreationSheetController(walletFile);
			var creationLock = new SemaphoreLite();

			await creationLock.WaitAsync();

			creationSheet.ShowSheet(Window);
			creationSheet.DidCreate += (sender, e) => newWallet = e.Wallet;
			creationSheet.DidClose += (sender, e) => creationLock.Release();

			await creationLock.WaitAsync();
			creationLock.Release();
			return newWallet;
		}