public override void Dispose() { base.Dispose(); CommandsSource.RaiseOnEndScopeCommand(_commandsSource, Context, new LogScopeCommandArgs(this)); Context.Log = Parent; }
public BaseLogScope(ILogContext logContext, IExtensionManager extensionManager, CommandsSource commandsSource) { Context = logContext; _extensionManager = extensionManager; _commandsSource = commandsSource; BeginTime = DateTime.UtcNow; }
void DialogContentControl_KeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == VirtualKey.Enter) { CommandsSource.FirstOrDefault(x => x.IsDefault).Do(x => { e.Handled = true; DialogResultCommand.Execute(x); }); } else if (e.Key == VirtualKey.Escape) { CommandsSource.FirstOrDefault(x => x.IsCancel).Do(x => { e.Handled = true; DialogResultCommand.Execute(x); }); } }
public LogScope(ILogContext logContext, IExtensionManager extensionManager, CommandsSource commandsSource, ILogScope root, ILogScope parent, string name) : base(logContext, extensionManager, commandsSource) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException("Log scope name cannot be null of empty.", nameof(name)); } Root = root; Parent = parent; Name = name; CommandsSource.RaiseOnBeginScopeCommand(commandsSource, logContext, new LogScopeCommandArgs(this)); }
public RootLogScope(ILogContext logContext, IExtensionManager extensionManager, CommandsSource commandsSource) : base(logContext, extensionManager, commandsSource) { }
public virtual void Message(ILogMessage log) { CommandsSource.RaiseOnLogMessageCommand(_commandsSource, Context, new Extensibility.Commands.CommandArgs.LogMessageCommandArgs(this, log)); }