diff --git a/src/Orchard/Reports/ReportExtentions.cs b/src/Orchard/Reports/ReportExtentions.cs
index 05b898058..2ebb2ff01 100644
--- a/src/Orchard/Reports/ReportExtentions.cs
+++ b/src/Orchard/Reports/ReportExtentions.cs
@@ -2,12 +2,32 @@
using Orchard.Reports.Services;
public static class ReportExtentions {
+ ///
+ /// Adds a new report entry of type information to a report that was previously registered.
+ ///
+ ///
+ /// Key, i.e. technical name of the report. Should be the same as the one used when registering the report.
+ /// The message to include in the entry.
public static void Information(this IReportsCoordinator reportCoordinator, string reportKey, string message) {
reportCoordinator.Add(reportKey, ReportEntryType.Information, message);
}
+
+ ///
+ /// Adds a new report entry of type warning to a report that was previously registered.
+ ///
+ ///
+ /// Key, i.e. technical name of the report. Should be the same as the one used when registering the report.
+ /// The message to include in the entry.
public static void Warning(this IReportsCoordinator reportCoordinator, string reportKey, string message) {
reportCoordinator.Add(reportKey, ReportEntryType.Warning, message);
}
+
+ ///
+ /// Adds a new report entry of type error to a report that was previously registered.
+ ///
+ ///
+ /// Key, i.e. technical name of the report. Should be the same as the one used when registering the report.
+ /// The message to include in the entry.
public static void Error(this IReportsCoordinator reportCoordinator, string reportKey, string message) {
reportCoordinator.Add(reportKey, ReportEntryType.Error, message);
}
diff --git a/src/Orchard/Reports/Services/IReportsCoordinator.cs b/src/Orchard/Reports/Services/IReportsCoordinator.cs
index d8104b89b..659f86f91 100644
--- a/src/Orchard/Reports/Services/IReportsCoordinator.cs
+++ b/src/Orchard/Reports/Services/IReportsCoordinator.cs
@@ -1,6 +1,30 @@
namespace Orchard.Reports.Services {
+ ///
+ /// Exposes a simplified interface for creating reports. Reports provide user-accessible log-like functionality.
+ ///
+ ///
+ /// can be used too to create reports directly.
+ ///
public interface IReportsCoordinator : IDependency {
+ ///
+ /// Adds a new report entry to a report that was previously registered.
+ ///
+ ///
+ /// Entries can be only added to a report that was previously registered through Register().
+ ///
+ ///
+ /// Key, i.e. technical name of the report. Should be the same as the one used when registering the report.
+ /// Type of the entry.
+ /// The message to include in the entry.
void Add(string reportKey, ReportEntryType type, string message);
+
+ ///
+ /// Registers a new report so entries can be added to it.
+ ///
+ /// Key, i.e. technical name of the report.
+ /// Name of the activity the report is about (e.g. "Upgrade").
+ /// A title better describing what the report is about (e.g. "Migrating routes of Pages, Blog Posts").
+ /// The report's numerical ID.
int Register(string reportKey, string activityName, string title);
}
}
diff --git a/src/Orchard/Reports/Services/IReportsManager.cs b/src/Orchard/Reports/Services/IReportsManager.cs
index 36ff65038..f2006adf4 100644
--- a/src/Orchard/Reports/Services/IReportsManager.cs
+++ b/src/Orchard/Reports/Services/IReportsManager.cs
@@ -1,6 +1,12 @@
using System.Collections.Generic;
namespace Orchard.Reports.Services {
+ ///
+ /// Service for handling reports. Reports provide user-accessible log-like functionality.
+ ///
+ ///
+ /// You can use to create reports through a simplified interface.
+ ///
public interface IReportsManager : ISingletonDependency {
void Add(int reportId, ReportEntryType type, string message);
int CreateReport(string title, string activityName);
diff --git a/src/Orchard/Reports/Services/IReportsPersister.cs b/src/Orchard/Reports/Services/IReportsPersister.cs
index d1dd3238f..b79cd9e3b 100644
--- a/src/Orchard/Reports/Services/IReportsPersister.cs
+++ b/src/Orchard/Reports/Services/IReportsPersister.cs
@@ -1,6 +1,12 @@
using System.Collections.Generic;
namespace Orchard.Reports.Services {
+ ///
+ /// Defines a service that can be used to persist reports.
+ ///
+ ///
+ /// Implementations of this interface are commonly used from implementations.
+ ///
public interface IReportsPersister : IDependency {
IEnumerable Fetch();
void Save(IEnumerable reports);