public static DefaultSyncModel SetTextView(this SyncContent syncContent, string text) { var defaultSyncModel = new DefaultSyncModel() { Text = text }; syncContent.SetView(defaultSyncModel); return(defaultSyncModel); }
public static CancelSyncModel SetCancelView(this SyncContent syncContent, string text) { var cancelSyncModel = new CancelSyncModel() { Text = text }; syncContent.SetView(cancelSyncModel); return(cancelSyncModel); }
public async Task <SyncContent> EnterSync() { await semaphoreSlim.WaitAsync(); var oldView = view.SyncView; view.SyncView = this; var syncContent = new SyncContent(this, () => { try { view.SyncView = oldView; } finally { semaphoreSlim.Release(); } }); return(syncContent); }