diff --git a/src/ReportPortal.Shared/Execution/CommandsSource.cs b/src/ReportPortal.Shared/Execution/CommandsSource.cs index 560917cb..9cbf48ce 100644 --- a/src/ReportPortal.Shared/Execution/CommandsSource.cs +++ b/src/ReportPortal.Shared/Execution/CommandsSource.cs @@ -5,11 +5,17 @@ namespace ReportPortal.Shared.Execution { - /// + /// + /// Represents a source of commands. + /// public class CommandsSource : ICommandsSource { private IList _listeners; + /// + /// Initializes a new instance of the class. + /// + /// The list of commands listeners. public CommandsSource(IList listeners) { _listeners = listeners; @@ -23,48 +29,108 @@ public CommandsSource(IList listeners) } } + /// + /// Gets the test commands source. + /// public ITestCommandsSource TestCommandsSource { get; } = new TestCommandsSource(); + /// + /// Occurs when a begin log scope command is raised. + /// public event LogCommandHandler OnBeginLogScopeCommand; + /// + /// Occurs when an end log scope command is raised. + /// public event LogCommandHandler OnEndLogScopeCommand; + /// + /// Occurs when a log message command is raised. + /// public event LogCommandHandler OnLogMessageCommand; + /// + /// Raises the event. + /// + /// The commands source. + /// The log context. + /// The command arguments. public static void RaiseOnBeginScopeCommand(CommandsSource commandsSource, ILogContext logContext, LogScopeCommandArgs args) { commandsSource.OnBeginLogScopeCommand?.Invoke(logContext, args); } + /// + /// Raises the event. + /// + /// The commands source. + /// The log context. + /// The command arguments. public static void RaiseOnEndScopeCommand(CommandsSource commandsSource, ILogContext logContext, LogScopeCommandArgs args) { commandsSource.OnEndLogScopeCommand?.Invoke(logContext, args); } + /// + /// Raises the event. + /// + /// The commands source. + /// The log context. + /// The command arguments. public static void RaiseOnLogMessageCommand(CommandsSource commandsSource, ILogContext logContext, LogMessageCommandArgs args) { commandsSource.OnLogMessageCommand?.Invoke(logContext, args); } } + /// + /// Represents a source of test commands. + /// public class TestCommandsSource : ITestCommandsSource { + /// + /// Occurs when a get test attributes command is raised. + /// public event TestCommandHandler OnGetTestAttributes; + /// + /// Occurs when an add test attributes command is raised. + /// public event TestCommandHandler OnAddTestAttributes; + /// + /// Occurs when a remove test attributes command is raised. + /// public event TestCommandHandler OnRemoveTestAttributes; + /// + /// Raises the event. + /// + /// The commands source. + /// The test context. + /// The command arguments. public static void RaiseOnGetTestAttributes(TestCommandsSource commandsSource, ITestContext testContext, TestAttributesCommandArgs args) { commandsSource.OnGetTestAttributes?.Invoke(testContext, args); } + /// + /// Raises the event. + /// + /// The commands source. + /// The test context. + /// The command arguments. public static void RaiseOnAddTestAttributes(TestCommandsSource commandsSource, ITestContext testContext, TestAttributesCommandArgs args) { commandsSource.OnAddTestAttributes?.Invoke(testContext, args); } + /// + /// Raises the event. + /// + /// The commands source. + /// The test context. + /// The command arguments. public static void RaiseOnRemoveTestAttributes(TestCommandsSource commandsSource, ITestContext testContext, TestAttributesCommandArgs args) { commandsSource.OnRemoveTestAttributes?.Invoke(testContext, args); diff --git a/src/ReportPortal.Shared/Execution/Logging/LogScopeStatus.cs b/src/ReportPortal.Shared/Execution/Logging/LogScopeStatus.cs index 10f93199..140566b5 100644 --- a/src/ReportPortal.Shared/Execution/Logging/LogScopeStatus.cs +++ b/src/ReportPortal.Shared/Execution/Logging/LogScopeStatus.cs @@ -1,15 +1,38 @@ namespace ReportPortal.Shared.Execution.Logging { /// - /// Status of logging scope. + /// Represents the status of a logging scope. /// public enum LogScopeStatus { + /// + /// The logging scope is in progress. + /// InProgress, + + /// + /// The logging scope has passed. + /// Passed, + + /// + /// The logging scope has failed. + /// Failed, + + /// + /// The logging scope has been skipped. + /// Skipped, + + /// + /// The logging scope has a warning. + /// Warn, + + /// + /// The logging scope has informational messages. + /// Info } } diff --git a/src/ReportPortal.Shared/Execution/Metadata/IMetaAttributesCollection.cs b/src/ReportPortal.Shared/Execution/Metadata/IMetaAttributesCollection.cs index 1fc8f266..16281382 100644 --- a/src/ReportPortal.Shared/Execution/Metadata/IMetaAttributesCollection.cs +++ b/src/ReportPortal.Shared/Execution/Metadata/IMetaAttributesCollection.cs @@ -2,8 +2,16 @@ namespace ReportPortal.Shared.Execution.Metadata { + /// + /// Represents a collection of meta attributes. + /// public interface IMetaAttributesCollection : ICollection { + /// + /// Adds a new meta attribute with the specified key and value to the collection. + /// + /// The key of the meta attribute. + /// The value of the meta attribute. void Add(string key, string value); } } diff --git a/src/ReportPortal.Shared/Execution/Metadata/MetaAttribute.cs b/src/ReportPortal.Shared/Execution/Metadata/MetaAttribute.cs index 07018a23..d573b0ab 100644 --- a/src/ReportPortal.Shared/Execution/Metadata/MetaAttribute.cs +++ b/src/ReportPortal.Shared/Execution/Metadata/MetaAttribute.cs @@ -3,23 +3,44 @@ namespace ReportPortal.Shared.Execution.Metadata { + /// + /// Represents a metadata attribute. + /// public class MetaAttribute : IEquatable { + /// + /// Initializes a new instance of the class. + /// + /// The attribute key. + /// The attribute value. + /// Thrown when the attribute value is null or empty. public MetaAttribute(string key, string value) { if (string.IsNullOrEmpty(value)) { - throw new ArgumentException("Attribute value cannot be null od empty.", nameof(value)); + throw new ArgumentException("Attribute value cannot be null or empty.", nameof(value)); } Key = key; Value = value; } + /// + /// Gets the attribute key. + /// public string Key { get; } + /// + /// Gets the attribute value. + /// public string Value { get; } + /// + /// Parses a string value into a object. + /// + /// The string value to parse. + /// A new instance of the class. + /// Thrown when the value is null or empty. public static MetaAttribute Parse(string value) { if (string.IsNullOrEmpty(value)) @@ -49,6 +70,11 @@ public static MetaAttribute Parse(string value) return new MetaAttribute(metaKey, metaValue); } + /// + /// Determines whether the current object is equal to another object. + /// + /// The object to compare with the current object. + /// true if the objects are equal; otherwise, false. public bool Equals(MetaAttribute other) { if (ReferenceEquals(this, other)) @@ -64,8 +90,18 @@ public bool Equals(MetaAttribute other) return string.Equals(Key, other.Key) && string.Equals(Value, other.Value); } + /// + /// Determines whether the current object is equal to another object. + /// + /// The object to compare with the current object. + /// true if the objects are equal; otherwise, false. public override bool Equals(object obj) => Equals(obj as MetaAttribute); + /// + /// Implicitly converts a object to an object. + /// + /// The object to convert. + /// An object. public static implicit operator ItemAttribute(MetaAttribute a) => new ItemAttribute { Key = a.Key, Value = a.Value }; } } diff --git a/src/ReportPortal.Shared/Execution/TestContext.cs b/src/ReportPortal.Shared/Execution/TestContext.cs index 51180b61..842f5e3f 100644 --- a/src/ReportPortal.Shared/Execution/TestContext.cs +++ b/src/ReportPortal.Shared/Execution/TestContext.cs @@ -5,12 +5,19 @@ namespace ReportPortal.Shared.Execution { + /// + /// Represents the context for a test execution. + /// public class TestContext : ITestContext { private readonly IExtensionManager _extensionManager; - private readonly CommandsSource _commadsSource; + /// + /// Initializes a new instance of the class. + /// + /// The extension manager. + /// The commands source. public TestContext(IExtensionManager extensionManager, CommandsSource commandsSource) { _extensionManager = extensionManager; @@ -19,11 +26,10 @@ public TestContext(IExtensionManager extensionManager, CommandsSource commandsSo } private readonly AsyncLocal _activeLogScope = new AsyncLocal(); - private readonly AsyncLocal _rootLogScope = new AsyncLocal(); /// - /// Returns current active LogScope which provides methods for logging. + /// Gets or sets the current active LogScope which provides methods for logging. /// public ILogScope Log { @@ -59,6 +65,9 @@ private ILogScope RootScope } } + /// + /// Gets the metadata emitter for the test context. + /// public ITestMetadataEmitter Metadata { get; private set; } } -} +} \ No newline at end of file diff --git a/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogMessageCommandArgs.cs b/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogMessageCommandArgs.cs index 564b9b2d..18018383 100644 --- a/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogMessageCommandArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogMessageCommandArgs.cs @@ -3,16 +3,30 @@ namespace ReportPortal.Shared.Extensibility.Commands.CommandArgs { + /// + /// Represents the arguments for a log message command. + /// public class LogMessageCommandArgs : EventArgs { + /// + /// Initializes a new instance of the class. + /// + /// The log scope. + /// The log message. public LogMessageCommandArgs(ILogScope logScope, ILogMessage logMessage) { LogScope = logScope; LogMessage = logMessage; } + /// + /// Gets the log scope. + /// public ILogScope LogScope { get; } + /// + /// Gets the log message. + /// public ILogMessage LogMessage { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogScopeCommandArgs.cs b/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogScopeCommandArgs.cs index 5b80618e..d59251b4 100644 --- a/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogScopeCommandArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/LogScopeCommandArgs.cs @@ -3,13 +3,23 @@ namespace ReportPortal.Shared.Extensibility.Commands.CommandArgs { + /// + /// Represents the arguments for a log scope command. + /// public class LogScopeCommandArgs : EventArgs { + /// + /// Initializes a new instance of the class with the specified log scope. + /// + /// The log scope. public LogScopeCommandArgs(ILogScope logScope) { LogScope = logScope; } + /// + /// Gets the log scope. + /// public ILogScope LogScope { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/TestAttributesCommandArgs.cs b/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/TestAttributesCommandArgs.cs index cf19ff27..680b6aeb 100644 --- a/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/TestAttributesCommandArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/Commands/CommandArgs/TestAttributesCommandArgs.cs @@ -4,13 +4,23 @@ namespace ReportPortal.Shared.Extensibility.Commands.CommandArgs { + /// + /// Represents the arguments for the TestAttributesCommand event. + /// public class TestAttributesCommandArgs : EventArgs { + /// + /// Initializes a new instance of the class. + /// + /// The collection of meta attributes. public TestAttributesCommandArgs(ICollection attributes) { Attributes = attributes ?? new List(); } + /// + /// Gets the collection of meta attributes. + /// public ICollection Attributes { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/Commands/ITestCommandsSource.cs b/src/ReportPortal.Shared/Extensibility/Commands/ITestCommandsSource.cs index 7d590869..836e692f 100644 --- a/src/ReportPortal.Shared/Extensibility/Commands/ITestCommandsSource.cs +++ b/src/ReportPortal.Shared/Extensibility/Commands/ITestCommandsSource.cs @@ -3,14 +3,32 @@ namespace ReportPortal.Shared.Extensibility.Commands { + /// + /// Represents a source of test commands. + /// public interface ITestCommandsSource { + /// + /// Occurs when a test command to get test attributes is raised. + /// event TestCommandHandler OnGetTestAttributes; + /// + /// Occurs when a test command to add test attributes is raised. + /// event TestCommandHandler OnAddTestAttributes; + /// + /// Occurs when a test command to remove test attributes is raised. + /// event TestCommandHandler OnRemoveTestAttributes; } + /// + /// Represents a delegate for handling test commands. + /// + /// The type of the command arguments. + /// The test context. + /// The command arguments. public delegate void TestCommandHandler(ITestContext testContext, TCommandArgs args); } diff --git a/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs b/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs index b8369d40..27b8750f 100644 --- a/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs +++ b/src/ReportPortal.Shared/Extensibility/ExtensionManager.cs @@ -6,6 +6,9 @@ namespace ReportPortal.Shared.Extensibility { + /// + /// Represents an extension manager for managing extensions. + /// public class ExtensionManager : IExtensionManager { private static readonly Internal.Logging.ITraceLogger _traceLogger = Internal.Logging.TraceLogManager.Instance.GetLogger(typeof(ExtensionManager)); @@ -29,6 +32,9 @@ public class ExtensionManager : IExtensionManager return ext; }); + /// + /// Gets the instance of the extension manager. + /// public static IExtensionManager Instance => _instance.Value; private readonly List _exploredPaths = new List(); @@ -37,6 +43,10 @@ public class ExtensionManager : IExtensionManager private static readonly object _lockObj = new object(); + /// + /// Explores the specified path for extensions. + /// + /// The path to explore. public void Explore(string path) { if (!_exploredPaths.Contains(path)) @@ -121,8 +131,14 @@ public void Explore(string path) } } + /// + /// Gets the list of report event observers. + /// public IList ReportEventObservers { get; } = new List(); + /// + /// Gets the list of commands listeners. + /// public IList CommandsListeners { get; } = new List(); } } diff --git a/src/ReportPortal.Shared/Extensibility/ICommandsListener.cs b/src/ReportPortal.Shared/Extensibility/ICommandsListener.cs index 18b10b3d..0ebcd03e 100644 --- a/src/ReportPortal.Shared/Extensibility/ICommandsListener.cs +++ b/src/ReportPortal.Shared/Extensibility/ICommandsListener.cs @@ -2,8 +2,15 @@ namespace ReportPortal.Shared.Extensibility { + /// + /// Represents an interface for a commands listener. + /// public interface ICommandsListener { + /// + /// Initializes the commands listener with the specified commands source. + /// + /// The commands source to initialize with. void Initialize(ICommandsSource commandsSource); } } diff --git a/src/ReportPortal.Shared/Extensibility/IExtensionManager.cs b/src/ReportPortal.Shared/Extensibility/IExtensionManager.cs index 3688a89f..7808b528 100644 --- a/src/ReportPortal.Shared/Extensibility/IExtensionManager.cs +++ b/src/ReportPortal.Shared/Extensibility/IExtensionManager.cs @@ -2,12 +2,25 @@ namespace ReportPortal.Shared.Extensibility { + /// + /// Represents an interface for managing extensions. + /// public interface IExtensionManager { + /// + /// Explores the specified path for extensions. + /// + /// The path to explore. void Explore(string path); + /// + /// Gets the list of report event observers. + /// IList ReportEventObservers { get; } + /// + /// Gets the list of commands listeners. + /// IList CommandsListeners { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/IReportEventsObserver.cs b/src/ReportPortal.Shared/Extensibility/IReportEventsObserver.cs index 10d4e23c..8557a527 100644 --- a/src/ReportPortal.Shared/Extensibility/IReportEventsObserver.cs +++ b/src/ReportPortal.Shared/Extensibility/IReportEventsObserver.cs @@ -2,10 +2,15 @@ namespace ReportPortal.Shared.Extensibility { + /// + /// Represents an interface for observing report events. + /// public interface IReportEventsObserver { + /// + /// Initializes the report events observer with the specified report events source. + /// + /// The report events source to initialize with. void Initialize(IReportEventsSource reportEventsSource); } - - } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchFinishedEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchFinishedEventArgs.cs index e593e70a..92a5f2f4 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchFinishedEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchFinishedEventArgs.cs @@ -3,8 +3,16 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the AfterLaunchFinished event. + /// public class AfterLaunchFinishedEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. public AfterLaunchFinishedEventArgs(IClientService clientService, IConfiguration configuration) : base(clientService, configuration) { diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchStartedEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchStartedEventArgs.cs index 32688a1c..a4c49044 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchStartedEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLaunchStartedEventArgs.cs @@ -3,8 +3,16 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the AfterLaunchStarted event. + /// public class AfterLaunchStartedEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. public AfterLaunchStartedEventArgs(IClientService clientService, IConfiguration configuration) : base(clientService, configuration) { diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLogsSentEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLogsSentEventArgs.cs index 2141a7d7..26a71625 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLogsSentEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterLogsSentEventArgs.cs @@ -5,15 +5,27 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the AfterLogsSent event. + /// public class AfterLogsSentEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. + /// The list of log item requests. public AfterLogsSentEventArgs(IClientService clientService, - IConfiguration configuration, - IReadOnlyList createLogItemRequests) : base(clientService, configuration) + IConfiguration configuration, + IReadOnlyList createLogItemRequests) : base(clientService, configuration) { CreateLogItemRequests = createLogItemRequests; } + /// + /// Gets the list of log item requests. + /// public IReadOnlyList CreateLogItemRequests { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestFinishedEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestFinishedEventArgs.cs index 5166667e..966a553f 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestFinishedEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestFinishedEventArgs.cs @@ -3,8 +3,16 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the AfterTestFinished event. + /// public class AfterTestFinishedEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. public AfterTestFinishedEventArgs(IClientService clientService, IConfiguration configuration) : base(clientService, configuration) { diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestStartedEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestStartedEventArgs.cs index 82a85a9b..7d9b8ada 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestStartedEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/AfterTestStartedEventArgs.cs @@ -3,8 +3,16 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the AfterTestStarted event. + /// public class AfterTestStartedEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. public AfterTestStartedEventArgs(IClientService clientService, IConfiguration configuration) : base(clientService, configuration) { diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchFinishingEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchFinishingEventArgs.cs index 54d5b516..986135c3 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchFinishingEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchFinishingEventArgs.cs @@ -4,13 +4,25 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the BeforeLaunchFinishing event. + /// public class BeforeLaunchFinishingEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. + /// The finish launch request. public BeforeLaunchFinishingEventArgs(IClientService clientService, IConfiguration configuration, FinishLaunchRequest finishLaunchRequest) : base(clientService, configuration) { FinishLaunchRequest = finishLaunchRequest; } + /// + /// Gets the finish launch request. + /// public FinishLaunchRequest FinishLaunchRequest { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchStartingEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchStartingEventArgs.cs index 8cd80e9c..d1b5684d 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchStartingEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLaunchStartingEventArgs.cs @@ -4,13 +4,25 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the BeforeLaunchStarting event. + /// public class BeforeLaunchStartingEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. + /// The start launch request. public BeforeLaunchStartingEventArgs(IClientService clientService, IConfiguration configuration, StartLaunchRequest startLaunchRequest) : base(clientService, configuration) { StartLaunchRequest = startLaunchRequest; } + /// + /// Gets the start launch request. + /// public StartLaunchRequest StartLaunchRequest { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLogsSendingEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLogsSendingEventArgs.cs index e4c495e7..2919450c 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLogsSendingEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeLogsSendingEventArgs.cs @@ -5,8 +5,17 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the BeforeLogsSending event. + /// public class BeforeLogsSendingEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. + /// The list of create log item requests. public BeforeLogsSendingEventArgs(IClientService clientService, IConfiguration configuration, IList createLogItemRequests) : base(clientService, configuration) @@ -14,6 +23,9 @@ public BeforeLogsSendingEventArgs(IClientService clientService, CreateLogItemRequests = createLogItemRequests; } + /// + /// Gets the list of create log item requests. + /// public IList CreateLogItemRequests { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestFinishingEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestFinishingEventArgs.cs index 04a83c05..1099a1c9 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestFinishingEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestFinishingEventArgs.cs @@ -4,13 +4,25 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the BeforeTestFinishing event. + /// public class BeforeTestFinishingEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. + /// The finish test item request. public BeforeTestFinishingEventArgs(IClientService clientService, IConfiguration configuration, FinishTestItemRequest finishTestItemRequest) : base(clientService, configuration) { FinishTestItemRequest = finishTestItemRequest; } + /// + /// Gets the finish test item request. + /// public FinishTestItemRequest FinishTestItemRequest { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestStartingEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestStartingEventArgs.cs index 2658899b..65fceff1 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestStartingEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/BeforeTestStartingEventArgs.cs @@ -4,13 +4,25 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the "BeforeTestStarting" event. + /// public class BeforeTestStartingEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. + /// The start test item request. public BeforeTestStartingEventArgs(IClientService clientService, IConfiguration configuration, StartTestItemRequest startTestItemRequest) : base(clientService, configuration) { StartTestItemRequest = startTestItemRequest; } + /// + /// Gets the start test item request. + /// public StartTestItemRequest StartTestItemRequest { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/LaunchInitializingEventArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/LaunchInitializingEventArgs.cs index f43cb529..30f6561c 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/LaunchInitializingEventArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/LaunchInitializingEventArgs.cs @@ -3,8 +3,16 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Represents the event arguments for the launch initializing event. + /// public class LaunchInitializingEventArgs : ReportEventBaseArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. public LaunchInitializingEventArgs(IClientService clientService, IConfiguration configuration) : base(clientService, configuration) { diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/ReportEventBaseArgs.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/ReportEventBaseArgs.cs index e506e1c9..d9cb93cb 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/ReportEventBaseArgs.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/EventArgs/ReportEventBaseArgs.cs @@ -3,16 +3,30 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents.EventArgs { + /// + /// Base class for report event arguments. + /// public abstract class ReportEventBaseArgs : System.EventArgs { + /// + /// Initializes a new instance of the class. + /// + /// The client service. + /// The configuration. public ReportEventBaseArgs(IClientService clientService, IConfiguration configuration) { ClientService = clientService; Configuration = configuration; } + /// + /// Gets the client service. + /// public IClientService ClientService { get; } + /// + /// Gets the configuration. + /// public IConfiguration Configuration { get; } } } diff --git a/src/ReportPortal.Shared/Extensibility/ReportEvents/IReportEventsSource.cs b/src/ReportPortal.Shared/Extensibility/ReportEvents/IReportEventsSource.cs index 8a87242f..1e1ab27d 100644 --- a/src/ReportPortal.Shared/Extensibility/ReportEvents/IReportEventsSource.cs +++ b/src/ReportPortal.Shared/Extensibility/ReportEvents/IReportEventsSource.cs @@ -3,35 +3,88 @@ namespace ReportPortal.Shared.Extensibility.ReportEvents { + /// + /// Represents the interface for a source of report events. + /// public interface IReportEventsSource { + /// + /// Occurs when the launch is initializing. + /// event LaunchEventHandler OnLaunchInitializing; + /// + /// Occurs before the launch is starting. + /// event LaunchEventHandler OnBeforeLaunchStarting; + /// + /// Occurs after the launch has started. + /// event LaunchEventHandler OnAfterLaunchStarted; + /// + /// Occurs before the launch is finishing. + /// event LaunchEventHandler OnBeforeLaunchFinishing; + /// + /// Occurs after the launch has finished. + /// event LaunchEventHandler OnAfterLaunchFinished; - + /// + /// Occurs before a test is starting. + /// event TestEventHandler OnBeforeTestStarting; + /// + /// Occurs after a test has started. + /// event TestEventHandler OnAfterTestStarted; + /// + /// Occurs before a test is finishing. + /// event TestEventHandler OnBeforeTestFinishing; + /// + /// Occurs after a test has finished. + /// event TestEventHandler OnAfterTestFinished; - + /// + /// Occurs before logs are sending. + /// event LogsEventHandler OnBeforeLogsSending; + + /// + /// Occurs after logs are sent. + /// event LogsEventHandler OnAfterLogsSent; } + /// + /// Represents the delegate for handling launch events. + /// + /// The type of the event arguments. + /// The launch reporter. + /// The event arguments. public delegate void LaunchEventHandler(ILaunchReporter launchReporter, TEventArgs args); - public delegate void TestEventHandler(ITestReporter testReporter, TEventAgrs args); + /// + /// Represents the delegate for handling test events. + /// + /// The type of the event arguments. + /// The test reporter. + /// The event arguments. + public delegate void TestEventHandler(ITestReporter testReporter, TEventArgs args); - public delegate void LogsEventHandler(ILogsReporter logsReporter, TEventAgrs args); + /// + /// Represents the delegate for handling logs events. + /// + /// The type of the event arguments. + /// The logs reporter. + /// The event arguments. + public delegate void LogsEventHandler(ILogsReporter logsReporter, TEventArgs args); } diff --git a/src/ReportPortal.Shared/Reporter/Http/ClientServiceBuilder.cs b/src/ReportPortal.Shared/Reporter/Http/ClientServiceBuilder.cs index fca6e183..60fdbcb3 100644 --- a/src/ReportPortal.Shared/Reporter/Http/ClientServiceBuilder.cs +++ b/src/ReportPortal.Shared/Reporter/Http/ClientServiceBuilder.cs @@ -67,7 +67,9 @@ public IClientService Build() var apiKey = _configuration.GetValue(ConfigurationPath.ServerAuthenticationKey, null); if (apiKey is null) { +#pragma warning disable CS0618 // Type or member is obsolete apiKey = _configuration.GetValue(ConfigurationPath.ServerAuthenticationUuid, null); +#pragma warning restore CS0618 // Type or member is obsolete if (apiKey is null) { // Trigger proper exception throwing or use 'null'. @@ -75,8 +77,10 @@ public IClientService Build() } else { +#pragma warning disable CS0618 // Type or member is obsolete TraceLogger.Warn($"Configuration parameter '${ConfigurationPath.ServerAuthenticationUuid}' is deprecated. " + $"Use '${ConfigurationPath.ServerAuthenticationKey}' instead."); +#pragma warning restore CS0618 // Type or member is obsolete } } diff --git a/src/ReportPortal.Shared/Reporter/Http/HttpClientFactory.cs b/src/ReportPortal.Shared/Reporter/Http/HttpClientFactory.cs index a959b7d2..ecf58f29 100644 --- a/src/ReportPortal.Shared/Reporter/Http/HttpClientFactory.cs +++ b/src/ReportPortal.Shared/Reporter/Http/HttpClientFactory.cs @@ -52,7 +52,9 @@ public virtual HttpClient Create() var apiKey = Configuration.GetValue(ConfigurationPath.ServerAuthenticationKey, null); if (apiKey is null) { +#pragma warning disable CS0618 // Type or member is obsolete apiKey = Configuration.GetValue(ConfigurationPath.ServerAuthenticationUuid, null); +#pragma warning restore CS0618 // Type or member is obsolete if (apiKey is null) { // Trigger proper exception throwing or use 'null'. @@ -60,8 +62,10 @@ public virtual HttpClient Create() } else { +#pragma warning disable CS0618 // Type or member is obsolete TraceLogger.Warn($"Configuration parameter '${ConfigurationPath.ServerAuthenticationUuid}' is deprecated. " + $"Use '${ConfigurationPath.ServerAuthenticationKey}' instead."); +#pragma warning restore CS0618 // Type or member is obsolete } } diff --git a/src/ReportPortal.Shared/Reporter/ILaunchReporter.cs b/src/ReportPortal.Shared/Reporter/ILaunchReporter.cs index 989bfb54..ed293eab 100644 --- a/src/ReportPortal.Shared/Reporter/ILaunchReporter.cs +++ b/src/ReportPortal.Shared/Reporter/ILaunchReporter.cs @@ -3,18 +3,44 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents a reporter for a launch in the ReportPortal system. + /// public interface ILaunchReporter : IReporter { + /// + /// Gets the information about the launch reporter. + /// ILaunchReporterInfo Info { get; } + /// + /// Starts a new launch with the specified start launch request. + /// + /// The start launch request. void Start(StartLaunchRequest startLaunchRequest); + /// + /// Finishes the current launch with the specified finish launch request. + /// + /// The finish launch request. void Finish(FinishLaunchRequest finishLaunchRequest); + /// + /// Starts a child test reporter with the specified start test item request. + /// + /// The start test item request. + /// The child test reporter. ITestReporter StartChildTestReporter(StartTestItemRequest startTestItemRequest); + /// + /// Gets the list of child test reporters. + /// IList ChildTestReporters { get; } + /// + /// Logs a new log item with the specified create log item request. + /// + /// The create log item request. void Log(CreateLogItemRequest createLogItemRequest); } } diff --git a/src/ReportPortal.Shared/Reporter/ILaunchReporterInfo.cs b/src/ReportPortal.Shared/Reporter/ILaunchReporterInfo.cs index a386c1a5..676810c7 100644 --- a/src/ReportPortal.Shared/Reporter/ILaunchReporterInfo.cs +++ b/src/ReportPortal.Shared/Reporter/ILaunchReporterInfo.cs @@ -1,7 +1,13 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents the interface for launch reporter information. + /// public interface ILaunchReporterInfo : IReporterInfo { + /// + /// Gets or sets the URL of the launch reporter. + /// string Url { get; set; } } } diff --git a/src/ReportPortal.Shared/Reporter/ILogRequestAmender.cs b/src/ReportPortal.Shared/Reporter/ILogRequestAmender.cs index 58163f36..069d29f6 100644 --- a/src/ReportPortal.Shared/Reporter/ILogRequestAmender.cs +++ b/src/ReportPortal.Shared/Reporter/ILogRequestAmender.cs @@ -2,8 +2,15 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents an interface for amending log requests. + /// public interface ILogRequestAmender { + /// + /// Amends the specified log request. + /// + /// The log request to be amended. void Amend(CreateLogItemRequest request); } } diff --git a/src/ReportPortal.Shared/Reporter/ILogsReporter.cs b/src/ReportPortal.Shared/Reporter/ILogsReporter.cs index f17baa01..3cefb614 100644 --- a/src/ReportPortal.Shared/Reporter/ILogsReporter.cs +++ b/src/ReportPortal.Shared/Reporter/ILogsReporter.cs @@ -3,12 +3,25 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents an interface for reporting logs. + /// public interface ILogsReporter { + /// + /// Gets the processing task for the logs reporter. + /// Task ProcessingTask { get; } + /// + /// Logs a new log item. + /// + /// The log item to be logged. void Log(CreateLogItemRequest logRequest); + /// + /// Synchronizes the logs. + /// void Sync(); } -} \ No newline at end of file +} diff --git a/src/ReportPortal.Shared/Reporter/IReporter.cs b/src/ReportPortal.Shared/Reporter/IReporter.cs index 03a0a9a0..636a2f61 100644 --- a/src/ReportPortal.Shared/Reporter/IReporter.cs +++ b/src/ReportPortal.Shared/Reporter/IReporter.cs @@ -3,14 +3,29 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents an interface for a reporter. + /// public interface IReporter { + /// + /// Gets the task that represents the start of the reporter. + /// Task StartTask { get; } + /// + /// Gets the task that represents the finish of the reporter. + /// Task FinishTask { get; } + /// + /// Synchronizes the reporter. + /// void Sync(); + /// + /// Gets the statistics counter for the reporter. + /// ILaunchStatisticsCounter StatisticsCounter { get; } } } diff --git a/src/ReportPortal.Shared/Reporter/IReporterInfo.cs b/src/ReportPortal.Shared/Reporter/IReporterInfo.cs index 495d35fc..e77f4c9e 100644 --- a/src/ReportPortal.Shared/Reporter/IReporterInfo.cs +++ b/src/ReportPortal.Shared/Reporter/IReporterInfo.cs @@ -2,14 +2,29 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents the information about a reporter. + /// public interface IReporterInfo { + /// + /// Gets the unique identifier of the reporter. + /// string Uuid { get; } + /// + /// Gets the name of the reporter. + /// string Name { get; } + /// + /// Gets the start time of the reporter. + /// DateTime StartTime { get; } + /// + /// Gets the finish time of the reporter. + /// DateTime? FinishTime { get; } } } diff --git a/src/ReportPortal.Shared/Reporter/ITestReporter.cs b/src/ReportPortal.Shared/Reporter/ITestReporter.cs index 2dc94a83..06a6173d 100644 --- a/src/ReportPortal.Shared/Reporter/ITestReporter.cs +++ b/src/ReportPortal.Shared/Reporter/ITestReporter.cs @@ -3,22 +3,54 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents a test reporter that is responsible for reporting test results. + /// public interface ITestReporter : IReporter { + /// + /// Gets the information about the test reporter. + /// ITestReporterInfo Info { get; } + /// + /// Gets the parent test reporter. + /// ITestReporter ParentTestReporter { get; } + /// + /// Gets the launch reporter. + /// ILaunchReporter LaunchReporter { get; } + /// + /// Starts the test item. + /// + /// The request to start the test item. void Start(StartTestItemRequest startTestItemRequest); + /// + /// Finishes the test item. + /// + /// The request to finish the test item. void Finish(FinishTestItemRequest finishTestItemRequest); + /// + /// Starts a child test reporter. + /// + /// The request to start the child test item. + /// The child test reporter. ITestReporter StartChildTestReporter(StartTestItemRequest startTestItemRequest); + /// + /// Gets the list of child test reporters. + /// IList ChildTestReporters { get; } + /// + /// Logs a log item. + /// + /// The request to create the log item. void Log(CreateLogItemRequest createLogItemRequest); } } diff --git a/src/ReportPortal.Shared/Reporter/ITestReporterInfo.cs b/src/ReportPortal.Shared/Reporter/ITestReporterInfo.cs index d6defed9..5f19d160 100644 --- a/src/ReportPortal.Shared/Reporter/ITestReporterInfo.cs +++ b/src/ReportPortal.Shared/Reporter/ITestReporterInfo.cs @@ -1,5 +1,8 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents an interface for test reporter information. + /// public interface ITestReporterInfo : IReporterInfo { diff --git a/src/ReportPortal.Shared/Reporter/LaunchInfo.cs b/src/ReportPortal.Shared/Reporter/LaunchInfo.cs index 12750616..3a608695 100644 --- a/src/ReportPortal.Shared/Reporter/LaunchInfo.cs +++ b/src/ReportPortal.Shared/Reporter/LaunchInfo.cs @@ -2,16 +2,34 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents the information about a launch reporter. + /// public class LaunchInfo : ILaunchReporterInfo { + /// + /// Gets or sets the UUID of the launch. + /// public string Uuid { get; set; } + /// + /// Gets or sets the name of the launch. + /// public string Name { get; set; } + /// + /// Gets or sets the start time of the launch. + /// public DateTime StartTime { get; set; } + /// + /// Gets or sets the finish time of the launch. + /// public DateTime? FinishTime { get; set; } + /// + /// Gets or sets the URL of the launch. + /// public string Url { get; set; } } } diff --git a/src/ReportPortal.Shared/Reporter/ReportEventsSource.cs b/src/ReportPortal.Shared/Reporter/ReportEventsSource.cs index 310216cb..2a30779b 100644 --- a/src/ReportPortal.Shared/Reporter/ReportEventsSource.cs +++ b/src/ReportPortal.Shared/Reporter/ReportEventsSource.cs @@ -4,75 +4,184 @@ namespace ReportPortal.Shared.Reporter { + /// + /// Represents a source of report events. + /// public class ReportEventsSource : IReportEventsSource { private static Internal.Logging.ITraceLogger _traceLogger = Internal.Logging.TraceLogManager.Instance.GetLogger(); + /// + /// Event that is triggered when the launch is initializing. + /// public event LaunchEventHandler OnLaunchInitializing; + /// + /// Event that is triggered before the launch starts. + /// public event LaunchEventHandler OnBeforeLaunchStarting; + + /// + /// Event that is triggered after the launch has started. + /// public event LaunchEventHandler OnAfterLaunchStarted; + + /// + /// Event that is triggered before the launch finishes. + /// public event LaunchEventHandler OnBeforeLaunchFinishing; + + /// + /// Event that is triggered after the launch has finished. + /// public event LaunchEventHandler OnAfterLaunchFinished; + /// + /// Event that is triggered before a test starts. + /// public event TestEventHandler OnBeforeTestStarting; + + /// + /// Event that is triggered after a test has started. + /// public event TestEventHandler OnAfterTestStarted; + + /// + /// Event that is triggered before a test finishes. + /// public event TestEventHandler OnBeforeTestFinishing; + + /// + /// Event that is triggered after a test has finished. + /// public event TestEventHandler OnAfterTestFinished; + /// + /// Event that is triggered before logs are sent. + /// public event LogsEventHandler OnBeforeLogsSending; + + /// + /// Event that is triggered after logs have been sent. + /// public event LogsEventHandler OnAfterLogsSent; + /// + /// Raises the OnLaunchInitializing event. + /// + /// The source of the event. + /// The launch reporter. + /// The event arguments. public static void RaiseLaunchInitializing(ReportEventsSource source, ILaunchReporter launchReporter, LaunchInitializingEventArgs args) { RaiseSafe(source.OnLaunchInitializing, launchReporter, args); } + /// + /// Raises the OnBeforeLaunchStarting event. + /// + /// The source of the event. + /// The launch reporter. + /// The event arguments. public static void RaiseBeforeLaunchStarting(ReportEventsSource source, ILaunchReporter launchReporter, BeforeLaunchStartingEventArgs args) { RaiseSafe(source.OnBeforeLaunchStarting, launchReporter, args); } + /// + /// Raises the OnAfterLaunchStarted event. + /// + /// The source of the event. + /// The launch reporter. + /// The event arguments. public static void RaiseAfterLaunchStarted(ReportEventsSource source, ILaunchReporter launchReporter, AfterLaunchStartedEventArgs args) { RaiseSafe(source.OnAfterLaunchStarted, launchReporter, args); } + /// + /// Raises the OnBeforeLaunchFinishing event. + /// + /// The source of the event. + /// The launch reporter. + /// The event arguments. public static void RaiseBeforeLaunchFinishing(ReportEventsSource source, ILaunchReporter launchReporter, BeforeLaunchFinishingEventArgs args) { RaiseSafe(source.OnBeforeLaunchFinishing, launchReporter, args); } + /// + /// Raises the OnAfterLaunchFinished event. + /// + /// The source of the event. + /// The launch reporter. + /// The event arguments. public static void RaiseAfterLaunchFinished(ReportEventsSource source, ILaunchReporter launchReporter, AfterLaunchFinishedEventArgs args) { RaiseSafe(source.OnAfterLaunchFinished, launchReporter, args); } + /// + /// Raises the OnBeforeTestStarting event. + /// + /// The source of the event. + /// The test reporter. + /// The event arguments. public static void RaiseBeforeTestStarting(ReportEventsSource source, ITestReporter testReporter, BeforeTestStartingEventArgs args) { RaiseSafe(source.OnBeforeTestStarting, testReporter, args); } + /// + /// Raises the OnAfterTestStarted event. + /// + /// The source of the event. + /// The test reporter. + /// The event arguments. public static void RaiseAfterTestStarted(ReportEventsSource source, ITestReporter testReporter, AfterTestStartedEventArgs args) { RaiseSafe(source.OnAfterTestStarted, testReporter, args); } + /// + /// Raises the OnBeforeTestFinishing event. + /// + /// The source of the event. + /// The test reporter. + /// The event arguments. public static void RaiseBeforeTestFinishing(ReportEventsSource source, ITestReporter testReporter, BeforeTestFinishingEventArgs args) { RaiseSafe(source.OnBeforeTestFinishing, testReporter, args); } + /// + /// Raises the OnAfterTestFinished event. + /// + /// The source of the event. + /// The test reporter. + /// The event arguments. public static void RaiseAfterTestFinished(ReportEventsSource source, ITestReporter testReporter, AfterTestFinishedEventArgs args) { RaiseSafe(source.OnAfterTestFinished, testReporter, args); } + /// + /// Raises the OnBeforeLogsSending event. + /// + /// The source of the event. + /// The logs reporter. + /// The event arguments. public static void RaiseBeforeLogsSending(ReportEventsSource source, ILogsReporter logsReporter, BeforeLogsSendingEventArgs args) { RaiseSafe(source.OnBeforeLogsSending, logsReporter, args); } + /// + /// Raises the OnAfterLogsSent event. + /// + /// The source of the event. + /// The logs reporter. + /// The event arguments. public static void RaiseAfterLogsSent(ReportEventsSource source, ILogsReporter logsReporter, AfterLogsSentEventArgs args) { RaiseSafe(source.OnAfterLogsSent, logsReporter, args);