From a381eb884c61ce6661f6490f88e4af7430754dca Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Mon, 10 Feb 2020 10:26:28 +0100 Subject: [PATCH 1/3] add-some-xml-documentation --- .../Configuration/IConfigurationFactory.cs | 25 +++++++++++++++++++ .../Plugins/IServerEntryPoint.cs | 10 ++++++-- .../Services/ApiMemberAttribute.cs | 3 +++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs index 9b4ed772db..2b4b9b082c 100644 --- a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs +++ b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs @@ -6,20 +6,45 @@ using System.Collections.Generic; namespace MediaBrowser.Common.Configuration { + /// + /// Provides an interface to retrieve a configuration store. Classes with this interface are scanned for at + /// application start to dynamically register configuration for various modules/plugins. + /// public interface IConfigurationFactory { + /// + /// Get the configuration store for this module. + /// + /// The configuration store. IEnumerable GetConfigurations(); } + /// + /// Describes a single entry in the application configuration. + /// public class ConfigurationStore { + /// + /// Gets or sets the unique identifier for the configuration. + /// public string Key { get; set; } + /// + /// Gets or sets the type used to store the data for this configuration entry. + /// public Type ConfigurationType { get; set; } } + /// + /// A configuration store that can be validated. + /// public interface IValidatingConfiguration { + /// + /// Validation method to be invoked before saving the configuration. + /// + /// The old configuration. + /// The new configuration. void Validate(object oldConfig, object newConfig); } } diff --git a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs index e57929989a..5b3173ef6a 100644 --- a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs +++ b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs @@ -4,16 +4,22 @@ using System.Threading.Tasks; namespace MediaBrowser.Controller.Plugins { /// - /// Interface IServerEntryPoint + /// Represents an entry point for a module in the application. This interface is scanned for automatically and + /// provides a hook to initialize the module at application start. + /// The entry point can additionally be flagged as a pre-startup task by applying the + /// interface. /// public interface IServerEntryPoint : IDisposable { /// - /// Runs this instance. + /// Run the initialization for this module. This method is invoked at application start. /// Task RunAsync(); } + /// + /// Indicates that a should be invoked as a pre-startup task. + /// public interface IRunBeforeStartup { diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 7267fce247..06a6713ee3 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -5,6 +5,9 @@ using System; namespace MediaBrowser.Model.Services { + /// + /// Identifies a single API endpoint. + /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)] public class ApiMemberAttribute : Attribute { From 33761c3658c7c2867cb55fb1c96d441c24e81f89 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 12 Feb 2020 14:08:06 +0100 Subject: [PATCH 2/3] Use "implement" instead of "apply" when referring to an interface --- MediaBrowser.Controller/Plugins/IServerEntryPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs index 5b3173ef6a..1e8654c4dc 100644 --- a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs +++ b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs @@ -6,7 +6,7 @@ namespace MediaBrowser.Controller.Plugins /// /// Represents an entry point for a module in the application. This interface is scanned for automatically and /// provides a hook to initialize the module at application start. - /// The entry point can additionally be flagged as a pre-startup task by applying the + /// The entry point can additionally be flagged as a pre-startup task by implementing the /// interface. /// public interface IServerEntryPoint : IDisposable From 8ffb073ccb7f6661c04e64836d90d86228937962 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 12 Feb 2020 20:05:26 +0100 Subject: [PATCH 3/3] Enable documentation warnings for fully documented files --- MediaBrowser.Common/Configuration/IConfigurationFactory.cs | 3 --- MediaBrowser.Model/Services/ApiMemberAttribute.cs | 3 --- 2 files changed, 6 deletions(-) diff --git a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs index 2b4b9b082c..07ca2b58ba 100644 --- a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs +++ b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs @@ -1,6 +1,3 @@ -#pragma warning disable CS1591 -#pragma warning disable SA1600 - using System; using System.Collections.Generic; diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 06a6713ee3..8e50836f4d 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -1,6 +1,3 @@ -#pragma warning disable CS1591 -#pragma warning disable SA1600 - using System; namespace MediaBrowser.Model.Services