Skip to content

Commit

Permalink
chore: add documentation comments
Browse files Browse the repository at this point in the history
Signed-off-by: russkyc <[email protected]>
  • Loading branch information
russkyc committed Jun 10, 2023
1 parent 40006b7 commit 6bbd46e
Show file tree
Hide file tree
Showing 33 changed files with 408 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace GroomWise.Models.Commands;

public class SynchronizeCollectionCommand<T, TCollection> : Interfaces.ICommand
public class SynchronizeCollectionCommand<T, TCollection> : Interfaces.Types.ICommand
where TCollection : SynchronizedObservableCollection<T>
where T : IEntity
{
Expand Down
12 changes: 0 additions & 12 deletions Russkyc.GroomWise/Models/Interfaces/ICommand.cs

This file was deleted.

21 changes: 0 additions & 21 deletions Russkyc.GroomWise/Models/Interfaces/IConfigProvider.cs

This file was deleted.

12 changes: 0 additions & 12 deletions Russkyc.GroomWise/Models/Interfaces/IGenericCommand.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// Application Service
/// </summary>
public interface IApplicationService
{
SynchronizedObservableCollection<NavItem>? NavItems { get; set; }


/// <summary>
/// Builds the nav items collection(App Navigation)
/// </summary>
Expand Down
73 changes: 73 additions & 0 deletions Russkyc.GroomWise/Models/Interfaces/Service/IConfigProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright (C) 2023 Russell Camo (Russkyc).- All Rights Reserved
//
// Unauthorized copying or redistribution of all files, in source and binary forms via any medium
// without written, signed consent from the author is strictly prohibited.

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// Configuration Provider.
/// </summary>
public interface IConfigProvider
{
// App

/// <summary>
/// Gets or sets a value indicating whether the application should be in dark mode.
/// </summary>
bool DarkMode { get; set; }

/// <summary>
/// Gets or sets the color theme of the application.
/// </summary>
string ColorTheme { get; set; }

/// <summary>
/// Gets or sets the version of the application.
/// </summary>
string Version { get; set; }

// Database

/// <summary>
/// Gets or sets the path to the database.
/// </summary>
string Path { get; set; }

/// <summary>
/// Gets or sets the name of the database.
/// </summary>
string Database { get; set; }

/// <summary>
/// Gets or sets the username to use when connecting to the database.
/// </summary>
string Username { get; set; }

/// <summary>
/// Gets or sets the password to use when connecting to the database.
/// </summary>
string Password { get; set; }

/// <summary>
/// Gets or sets the path to the database migrations.
/// </summary>
string MigrationsPath { get; set; }

/// <summary>
/// Gets or sets a value indicating whether database migrations should be run on startup.
/// </summary>
bool RunMigrations { get; set; }

// Debug

/// <summary>
/// Gets or sets the path to the log file.
/// </summary>
string LogPath { get; set; }

/// <summary>
/// Gets or sets a value indicating whether logging is enabled.
/// </summary>
bool Logging { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// Contains Functions for Connection sources
/// </summary>
public interface IConnectionSourceProvider
{
/// <summary>
/// Builds and returns a connection string
/// </summary>
/// <param name="connectionSource">Connection source object containing database information</param>
/// <param name="provider">Database provider to build connection string for</param>
/// <returns></returns>
string Build(ConnectionSource connectionSource, DbProvider provider);
}
11 changes: 0 additions & 11 deletions Russkyc.GroomWise/Models/Interfaces/Service/IContextManager.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Copyright (C) 2023 Russell Camo (Russkyc).- All Rights Reserved
//
//
// Unauthorized copying or redistribution of all files, in source and binary forms via any medium
// without written, signed consent from the author is strictly prohibited.

namespace GroomWise.Models.Interfaces.Service;

public interface IDatabaseServiceAsync : IDbAccessAsync
{
}
/// <summary>
/// Handles calls to database
/// </summary>
public interface IDatabaseServiceAsync : IDbAccessAsync { }
13 changes: 13 additions & 0 deletions Russkyc.GroomWise/Models/Interfaces/Service/ILogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// Logger service
/// </summary>
public interface ILogger
{
/// <summary>
/// Logs the specified message.
/// </summary>
/// <param name="message">The message to be logged.</param>
void Log(string message);

/// <summary>
/// Logs the specified message, along with the sender of the message.
/// </summary>
/// <param name="sender">The object that is the source of the message.</param>
/// <param name="message">The message to be logged.</param>
void Log(object sender, string message);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// Scheduler service
/// </summary>
public interface ISchedulerService
{
/// <summary>
/// Schedules an action to run periodically at the specified interval.
/// </summary>
/// <param name="action">The action to run.</param>
/// <param name="interval">The interval at which to run the action.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the operation.</param>
void RunPeriodically(
Action action,
TimeSpan interval,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,24 @@

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// User session manager service
/// </summary>
public interface ISessionManagerService
{
public Session? Session { get; set; }
/// <summary>
/// Gets or sets the current session.
/// </summary>
Session? Session { get; set; }

/// <summary>
/// Starts a new session for the specified employee.
/// </summary>
/// <param name="employee">The employee to start the session for.</param>
void StartSession(Session employee);

/// <summary>
/// Ends the current session.
/// </summary>
void EndSession();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,42 @@

namespace GroomWise.Models.Interfaces.Service;

/// <summary>
/// Theme Manager service
/// </summary>
public interface IThemeManagerService
{
/// <summary>
/// Gets or sets a value indicating whether dark mode is enabled.
/// </summary>
bool DarkMode { get; set; }

/// <summary>
/// Gets or sets the name of the current color theme.
/// </summary>
string ColorTheme { get; set; }

/// <summary>
/// Sets the dark mode to the specified value.
/// </summary>
/// <param name="night">True to enable dark mode, false to disable it.</param>
void UseDarkTheme(bool night);

/// <summary>
/// Sets the color theme to the one with the specified name.
/// </summary>
/// <param name="color">The name of the color theme to use.</param>
void UseColorTheme(string color);

/// <summary>
/// Gets a list of available color themes.
/// </summary>
/// <returns>A list of strings representing the names of the available color themes.</returns>
IList<string> GetColorThemes();

/// <summary>
/// Gets a list of available base themes.
/// </summary>
/// <returns>A list of strings representing the names of the available base themes.</returns>
IList<string> GetBaseThemes();
void Reset();
}
Loading

0 comments on commit 6bbd46e

Please sign in to comment.