mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
docs: update XML comments for Essentials Core
This commit is contained in:
parent
0764685c51
commit
f88bb13367
260 changed files with 7018 additions and 1318 deletions
|
|
@ -22,6 +22,9 @@ using Serilog.Events;
|
|||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Global static class for Essentials
|
||||
/// </summary>
|
||||
public static class Global
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -34,6 +37,9 @@ namespace PepperDash.Essentials.Core
|
|||
/// </summary>
|
||||
public static eDevicePlatform Platform { get { return CrestronEnvironment.DevicePlatform; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of Ethernet Adapter Info
|
||||
/// </summary>
|
||||
public static Dictionary<short, EthernetAdapterInfo> EthernetAdapterInfoCollection { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -47,6 +53,9 @@ namespace PepperDash.Essentials.Core
|
|||
public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } }
|
||||
|
||||
// TODO: consider making this configurable later
|
||||
/// <summary>
|
||||
/// The CultureInfo for formatting
|
||||
/// </summary>
|
||||
public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US");
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -182,6 +191,13 @@ namespace PepperDash.Essentials.Core
|
|||
AssemblyVersion = assemblyVersion;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if the running version is in the list of development versions. If so, checks to see if it meets the minimum version requirement.
|
||||
/// If not in the list, returns false. For beta versions (0.xx.yy), will always return true.
|
||||
/// </summary>
|
||||
/// <param name="developmentVersions">list of development versions</param>
|
||||
/// <param name="minimumVersion">minimum version</param>
|
||||
/// <returns></returns>
|
||||
public static bool IsRunningDevelopmentVersion(List<string> developmentVersions, string minimumVersion)
|
||||
{
|
||||
if (Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*).*").Groups[1].Value == "0")
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ using Crestron.SimplSharp;
|
|||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a JobTimer
|
||||
/// </summary>
|
||||
public static class JobTimer
|
||||
{
|
||||
static CTimer MinuteTimer;
|
||||
|
|
@ -13,25 +16,18 @@ namespace PepperDash.Essentials.Core
|
|||
static List<JobTimerItem> Items = new List<JobTimerItem>();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="act"></param>
|
||||
/// <summary>
|
||||
/// AddAction method
|
||||
/// </summary>
|
||||
/// AddAction method
|
||||
/// </summary>
|
||||
/// <param name="act">action to add</param>
|
||||
public static void AddAction(Action act)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// AddJobTimerItem method
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="act"></param>
|
||||
/// <summary>
|
||||
/// AddJobTimerItem method
|
||||
/// </summary>
|
||||
/// <param name="item">JobTimerItem to add</param>
|
||||
public static void AddJobTimerItem(JobTimerItem item)
|
||||
{
|
||||
var existing = Items.FirstOrDefault(i => i.Key == item.Key);
|
||||
|
|
@ -62,25 +58,61 @@ namespace PepperDash.Essentials.Core
|
|||
/// </summary>
|
||||
public class JobTimerItem
|
||||
{
|
||||
public string Key { get; private set; }
|
||||
public Action JobAction { get; private set; }
|
||||
public eJobTimerCycleTypes CycleType { get; private set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// Key property
|
||||
/// </summary>
|
||||
public string Key { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// JobAction property
|
||||
/// </summary>
|
||||
public Action JobAction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// CycleType property
|
||||
/// </summary>
|
||||
public eJobTimerCycleTypes CycleType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// RunNextAt property
|
||||
/// </summary>
|
||||
public DateTime RunNextAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="key">item key</param>
|
||||
/// <param name="cycle">cycle type</param>
|
||||
/// <param name="act">action to run</param>
|
||||
public JobTimerItem(string key, eJobTimerCycleTypes cycle, Action act)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// JobTimerCycleTypes enum
|
||||
/// </summary>
|
||||
public enum eJobTimerCycleTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// RunEveryDay property
|
||||
/// </summary>
|
||||
RunEveryDay,
|
||||
|
||||
/// <summary>
|
||||
/// RunEveryHour property
|
||||
/// </summary>
|
||||
RunEveryHour,
|
||||
|
||||
/// <summary>
|
||||
/// RunEveryHalfHour property
|
||||
/// </summary>
|
||||
RunEveryHalfHour,
|
||||
|
||||
/// <summary>
|
||||
/// RunEveryMinute property
|
||||
/// </summary>
|
||||
RunEveryMinute
|
||||
}
|
||||
}
|
||||
|
|
@ -138,6 +138,11 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays}
|
|||
EventGroups.Remove(eventGroup.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the event group by key
|
||||
/// </summary>
|
||||
/// <param name="key">key of the event group</param>
|
||||
/// <returns></returns>
|
||||
public static ScheduledEventGroup GetEventGroup(string key)
|
||||
{
|
||||
ScheduledEventGroup returnValue;
|
||||
|
|
@ -146,6 +151,9 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays}
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SchedulerUtilities class
|
||||
/// </summary>
|
||||
public static class SchedulerUtilities
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue