public DialogViewModel(IObjectInitializationService initSvc) : base(initSvc) { AbortCommand = new DelegateCommand() { CanExecuteHandler = () => CanAbort(), ExecuteHandler = () => { Abort(); TearDown(); OnCloseRequest?.Invoke(false); } }; SaveCommand = new DelegateCommand() { CanExecuteHandler = () => ValidateContent(), ExecuteHandler = () => { SaveChanges(); TearDown(); OnCloseRequest?.Invoke(true); } }; }
public ClosingWsListener() { void ClosingBehavior(ClosingWsBehavior wsService) { wsService.CloseRequested += (sender, args) => OnCloseRequest?.Invoke(this, null); } _webSocketServerListener.AddWebSocketService <ClosingWsBehavior>("/close", ClosingBehavior); _webSocketServerListener.Start(); }