docs: update XML docs

This commit is contained in:
Andrew Welker
2025-07-04 13:07:21 -05:00
parent cc7e2ab675
commit 58a2a5c008
5 changed files with 883 additions and 780 deletions

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
@@ -16,8 +15,16 @@ namespace PepperDash.Essentials.Core
}
/// <summary>
/// Defines a factory for creating plugin development devices, including support for specific framework versions.
/// </summary>
/// <remarks>This interface extends <see cref="IPluginDeviceFactory"/> to provide additional functionality
/// specific to plugin development environments.</remarks>
public interface IPluginDevelopmentDeviceFactory : IPluginDeviceFactory
{
/// <summary>
/// Gets a list of Essentials versions that this device is compatible with.
/// </summary>
List<string> DevelopmentEssentialsFrameworkVersions { get; }
}
}

View File

@@ -0,0 +1,47 @@
using Newtonsoft.Json;
namespace PepperDash.Essentials;
/// <summary>
/// Represents a plugin that is incompatible with the current system or configuration.
/// </summary>
/// <remarks>This class provides details about an incompatible plugin, including its name, the reason for the
/// incompatibility, and the plugin that triggered the incompatibility. The triggering plugin can be updated dynamically
/// using the <see cref="UpdateTriggeringPlugin(string)"/> method.</remarks>
/// <param name="name"></param>
/// <param name="reason"></param>
/// <param name="triggeredBy"></param>
public class IncompatiblePlugin(string name, string reason, string triggeredBy = null)
{
/// <summary>
/// Gets the name associated with the object.
/// </summary>
[JsonProperty("name")]
public string Name { get; private set; } = name;
/// <summary>
/// Gets the reason associated with the current operation or response.
/// </summary>
[JsonProperty("reason")]
public string Reason { get; private set; } = reason;
/// <summary>
/// Gets the identifier of the entity or process that triggered the current operation.
/// </summary>
[JsonProperty("triggeredBy")]
public string TriggeredBy { get; private set; } = triggeredBy ?? "Direct load";
/// <summary>
/// Updates the name of the plugin that triggered the current operation.
/// </summary>
/// <param name="triggeringPlugin">The name of the triggering plugin. Must not be null or empty. If the value is null or empty, the operation is
/// ignored.</param>
public void UpdateTriggeringPlugin(string triggeringPlugin)
{
if (!string.IsNullOrEmpty(triggeringPlugin))
{
TriggeredBy = triggeringPlugin;
}
}
}

View File

@@ -0,0 +1,46 @@
using System.Reflection;
using Newtonsoft.Json;
namespace PepperDash.Essentials;
/// <summary>
/// Represents an assembly that has been loaded, including its name, version, and the associated <see
/// cref="System.Reflection.Assembly"/> instance.
/// </summary>
/// <remarks>This class provides information about a loaded assembly, including its name and version as strings,
/// and the associated <see cref="System.Reflection.Assembly"/> object. The assembly instance can be updated using the
/// <see cref="SetAssembly(Assembly)"/> method.</remarks>
/// <param name="name"></param>
/// <param name="version"></param>
/// <param name="assembly"></param>
public class LoadedAssembly(string name, string version, Assembly assembly)
{
/// <summary>
/// Gets the name associated with the object.
/// </summary>
[JsonProperty("name")]
public string Name { get; private set; } = name;
/// <summary>
/// Gets the version of the object as a string.
/// </summary>
[JsonProperty("version")]
public string Version { get; private set; } = version;
/// <summary>
/// Gets the assembly associated with the current instance.
/// </summary>
[JsonIgnore]
public Assembly Assembly { get; private set; } = assembly;
/// <summary>
/// Sets the assembly associated with the current instance.
/// </summary>
/// <param name="assembly">The <see cref="System.Reflection.Assembly"/> to associate with the current instance. Cannot be <see
/// langword="null"/>.</param>
public void SetAssembly(Assembly assembly)
{
Assembly = assembly;
}
}

View File

@@ -0,0 +1,20 @@
using System;
namespace PepperDash.Essentials;
/// <summary>
/// Indicates whether the assembly is compatible with .NET 8.
/// </summary>
/// <remarks>This attribute is used to specify compatibility with .NET 8 for an assembly. By default, the
/// assembly is considered compatible unless explicitly marked otherwise.</remarks>
/// <param name="isCompatible">A boolean value indicating whether the assembly is compatible with .NET 8. The default value is <see
/// langword="true"/>.</param>
[AttributeUsage(AttributeTargets.Assembly)]
public class Net8CompatibleAttribute(bool isCompatible = true) : Attribute
{
/// <summary>
/// Gets a value indicating whether the current object is compatible with the required conditions.
/// </summary>
public bool IsCompatible { get; } = isCompatible;
}

File diff suppressed because it is too large Load Diff