Marked all service implementations as internal

Core - Enabled XML docs
Modules - Added DI to module VMs
This commit is contained in:
Robert committed 2020-08-19 19:45:22 +02:00
1 parent ae9bdecef1
commit a06ad8f011
29 files changed
+134 -46

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@ using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Abstract.DataModels;
using Artemis.Core.Plugins.Abstract.DataModels.Attributes;
using Artemis.Core.Plugins.Abstract.ViewModels;
using Artemis.Core.Plugins.ModuleActivationRequirements;
using Artemis.Core.Plugins.Modules;
using Artemis.Storage.Entities.Module;
using SkiaSharp;
@@ -134,10 +134,10 @@ namespace Artemis.Core.Plugins.Abstract
public abstract void Render(double deltaTime, ArtemisSurface surface, SKCanvas canvas, SKImageInfo canvasInfo);
/// <summary>
/// Called when the module's view model is being show, return view models here to create tabs for them
/// Called when the module's view model is being show, return a list of module tabs here if you want them to show up in the UI
/// </summary>
/// <returns></returns>
public abstract IEnumerable<ModuleViewModel> GetViewModels();
public abstract IEnumerable<ModuleTab> GetModuleTabs();
/// <summary>
/// Called when the <see cref="ActivationRequirements" /> are met
@@ -0,0 +1,43 @@
using System;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Abstract.ViewModels;
namespace Artemis.Core.Plugins.Modules
{
/// <inheritdoc />
public class ModuleTab<T> : ModuleTab where T : ModuleViewModel
{
/// <summary>
/// Initializes a new instance of the <see cref="ModuleTab{T}" /> class
/// </summary>
/// <param name="title">The title of the tab</param>
public ModuleTab(string title)
{
Title = title;
}
/// <inheritdoc />
public override Type Type => typeof(T);
}
/// <summary>
/// Describes a UI tab for a specific module
/// </summary>
public abstract class ModuleTab
{
/// <summary>
/// The module this tab belongs to
/// </summary>
internal Module Module { get; set; }
/// <summary>
/// The title of the tab
/// </summary>
public string Title { get; protected set; }
/// <summary>
/// The type of view model the tab contains
/// </summary>
public abstract Type Type { get; }
}
}
@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using Artemis.Core.Extensions;
namespace Artemis.Core.Plugins.ModuleActivationRequirements
namespace Artemis.Core.Plugins.Modules
{
public class ProcessActivationRequirement : IModuleActivationRequirement
{