chore: move all files to file-scoped namespace

This commit is contained in:
Andrew Welker 2025-07-04 16:02:32 -05:00 committed by Neil Dorin
parent aaa5b0532b
commit 3ece4f0b7b
522 changed files with 39628 additions and 45678 deletions

View file

@ -2,29 +2,28 @@
using System;
using System.Collections.Generic;
namespace PepperDash.Essentials.Core
namespace PepperDash.Essentials.Core;
/// <summary>
/// Defines a class that is capable of loading device types
/// </summary>
public interface IDeviceFactory
{
/// <summary>
/// Defines the contract for IDeviceFactory
/// Gets the type of the factory associated with the current instance.
/// </summary>
public interface IDeviceFactory
{
/// <summary>
/// Gets the type of the factory associated with the current instance.
/// </summary>
Type FactoryType { get; }
Type FactoryType { get; }
/// <summary>
/// Gets a list of type names associated with the current plugin.
/// </summary>
List<string> TypeNames { get; }
/// <summary>
/// Gets a list of type names associated with the current plugin.
/// </summary>
List<string> TypeNames { get; }
/// <summary>
/// Builds and returns an <see cref="EssentialsDevice"/> instance based on the provided configuration.
/// </summary>
/// <param name="deviceConfig">The configuration settings used to initialize the device. This parameter cannot be null.</param>
/// <returns>An <see cref="EssentialsDevice"/> instance configured according to the specified <paramref
/// name="deviceConfig"/>.</returns>
EssentialsDevice BuildDevice(DeviceConfig deviceConfig);
}
/// <summary>
/// Builds and returns an <see cref="EssentialsDevice"/> instance based on the provided configuration.
/// </summary>
/// <param name="deviceConfig">The configuration settings used to initialize the device. This parameter cannot be null.</param>
/// <returns>An <see cref="EssentialsDevice"/> instance configured according to the specified <paramref
/// name="deviceConfig"/>.</returns>
EssentialsDevice BuildDevice(DeviceConfig deviceConfig);
}

View file

@ -4,16 +4,17 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PepperDash.Essentials.Core
namespace PepperDash.Essentials.Core;
/// <summary>
/// Defines the contract for IProcessorExtensionDeviceFactory
/// </summary>
public interface IProcessorExtensionDeviceFactory
{
/// <summary>
/// Defines the contract for IProcessorExtensionDeviceFactory
/// Loads all the extension factories to the ProcessorExtensionDeviceFactory
/// </summary>
public interface IProcessorExtensionDeviceFactory
{
/// <summary>
/// Loads all the extension factories to the ProcessorExtensionDeviceFactory
/// </summary>
void LoadFactories();
}
void LoadFactories();
}

View file

@ -7,8 +7,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace PepperDash.Essentials.Core
{
namespace PepperDash.Essentials.Core;
/// <summary>
/// Represents a ProcessorExtensionDeviceFactory
@ -164,8 +164,6 @@ namespace PepperDash.Essentials.Core
Debug.LogMessage(LogEventLevel.Verbose, "{0}", ex.InnerException.StackTrace);
return null;
}
}
}
}

View file

@ -1,45 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core
/// <summary>
/// Represents a IsReadyEventArgs
/// </summary>
public class IsReadyEventArgs : EventArgs
{
/// <summary>
/// Represents a IsReadyEventArgs
/// Gets or sets the IsReady
/// </summary>
public class IsReadyEventArgs : EventArgs
{
/// <summary>
/// Gets or sets the IsReady
/// </summary>
public bool IsReady { get; set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="data">indicates if the object is ready</param>
public IsReadyEventArgs(bool data)
{
IsReady = data;
}
}
public bool IsReady { get; set; }
/// <summary>
/// Defines the contract for IHasReady
/// Constructor
/// </summary>
public interface IHasReady
/// <param name="data">indicates if the object is ready</param>
public IsReadyEventArgs(bool data)
{
/// <summary>
/// Fires when the IsReady property changes
/// </summary>
event EventHandler<IsReadyEventArgs> IsReadyEvent;
/// <summary>
/// indicates whether the object is ready
/// </summary>
bool IsReady { get; }
IsReady = data;
}
}
/// <summary>
/// Defines the contract for IHasReady
/// </summary>
public interface IHasReady
{
/// <summary>
/// Fires when the IsReady property changes
/// </summary>
event EventHandler<IsReadyEventArgs> IsReadyEvent;
/// <summary>
/// indicates whether the object is ready
/// </summary>
bool IsReady { get; }
}