Browse Source

Fixed some access permissions

Fixed doc generation
pull/13/head
Anairkoen Schno 5 years ago
parent
commit
5d2d3ee1ba
7 changed files with 39 additions and 9 deletions
  1. +10
    -1
      BSIPA-ModList/Plugin.cs
  2. +17
    -2
      BSIPA-ModList/UI/ViewControllers/MarkdownView.cs
  3. +1
    -1
      IPA.Injector/Backups/BackupManager.cs
  4. +1
    -1
      IPA.Injector/Backups/BackupUnit.cs
  5. +5
    -2
      IPA.Injector/Injector.cs
  6. +2
    -1
      appveyor.yml
  7. +3
    -1
      docs/docfx.json

+ 10
- 1
BSIPA-ModList/Plugin.cs View File

@ -17,8 +17,17 @@ namespace BSIPA_ModList
internal static IPALogger md => log.GetChildLogger("MarkDown"); internal static IPALogger md => log.GetChildLogger("MarkDown");
} }
public class Plugin : IBeatSaberPlugin
/// <summary>
/// The main plugin type for the in-game mod list mod.
/// </summary>
internal class Plugin : IBeatSaberPlugin
{ {
/// <summary>
/// Initializes the plugin with certain parameters. Is only called once.
///
/// This is called by the plugin loader in BSIPA, and thus must be <see langword="public"/>.
/// </summary>
/// <param name="logger">a logger to initialize the plugin with</param>
public void Init(IPALogger logger) public void Init(IPALogger logger)
{ {
Logger.log = logger; Logger.log = logger;


+ 17
- 2
BSIPA-ModList/UI/ViewControllers/MarkdownView.cs View File

@ -18,6 +18,9 @@ using System.Text.RegularExpressions;
namespace BSIPA_ModList.UI.ViewControllers namespace BSIPA_ModList.UI.ViewControllers
{ {
/// <summary>
/// A UI component that renders Markdown in-game.
/// </summary>
[RequireComponent(typeof(RectTransform))] [RequireComponent(typeof(RectTransform))]
public class MarkdownView : MonoBehaviour public class MarkdownView : MonoBehaviour
{ {
@ -42,6 +45,10 @@ namespace BSIPA_ModList.UI.ViewControllers
} }
} }
/// <summary>
/// A convenience property to access the <see cref="RectTransform"/> on the <see cref="GameObject"/> this is on.
/// </summary>
/// <value>the <see cref="RectTransform"/> associated with this component</value>
public RectTransform rectTransform => GetComponent<RectTransform>(); public RectTransform rectTransform => GetComponent<RectTransform>();
private ScrollView scrView; private ScrollView scrView;
@ -49,6 +56,10 @@ namespace BSIPA_ModList.UI.ViewControllers
private RectTransform viewport; private RectTransform viewport;
private CommonMarkSettings settings; private CommonMarkSettings settings;
/// <summary>
/// Creates a new <see cref="MarkdownView"/>. Should never be called correctly. Instead, use <see cref="GameObject.AddComponent{T}"/>.
/// </summary>
public MarkdownView() public MarkdownView()
{ {
settings = CommonMarkSettings.Default.Clone(); settings = CommonMarkSettings.Default.Clone();
@ -57,6 +68,10 @@ namespace BSIPA_ModList.UI.ViewControllers
settings.UriResolver = ResolveUri; settings.UriResolver = ResolveUri;
} }
/// <summary>
/// This function will be called whenever attempting to resolve an image URI, to ensure that the image exists in the embedded assembly.
/// </summary>
/// <value>a delegate for the function to call</value>
public Func<string, bool> HasEmbeddedImage; public Func<string, bool> HasEmbeddedImage;
private string ResolveUri(string arg) private string ResolveUri(string arg)
@ -156,7 +171,7 @@ namespace BSIPA_ModList.UI.ViewControllers
Logger.md.Debug("Font loaded"); Logger.md.Debug("Font loaded");
} }
protected void Awake()
internal void Awake()
{ {
if (Consolas == null) if (Consolas == null)
Logger.md.Error($"Loading of Consolas font failed"); Logger.md.Error($"Loading of Consolas font failed");
@ -265,7 +280,7 @@ namespace BSIPA_ModList.UI.ViewControllers
private byte tbreakSettings = 0; private byte tbreakSettings = 0;
#endif #endif
#endif #endif
public void Update()
internal void Update()
{ {
#if DEBUG && UI_CONFIGURE_MARKDOWN_THEMATIC_BREAK #if DEBUG && UI_CONFIGURE_MARKDOWN_THEMATIC_BREAK
if (Input.GetKeyDown(KeyCode.K)) if (Input.GetKeyDown(KeyCode.K))


+ 1
- 1
IPA.Injector/Backups/BackupManager.cs View File

@ -3,7 +3,7 @@ using System.Linq;
namespace IPA.Injector.Backups namespace IPA.Injector.Backups
{ {
public static class BackupManager
internal static class BackupManager
{ {
public static BackupUnit FindLatestBackup(string dir) public static BackupUnit FindLatestBackup(string dir)
{ {


+ 1
- 1
IPA.Injector/Backups/BackupUnit.cs View File

@ -7,7 +7,7 @@ namespace IPA.Injector.Backups
/// <summary> /// <summary>
/// A unit for backup. WIP. /// A unit for backup. WIP.
/// </summary> /// </summary>
public class BackupUnit
internal class BackupUnit
{ {
public string Name { get; private set; } public string Name { get; private set; }


+ 5
- 2
IPA.Injector/Injector.cs View File

@ -15,14 +15,17 @@ using MethodAttributes = Mono.Cecil.MethodAttributes;
namespace IPA.Injector namespace IPA.Injector
{ {
/// <summary>
/// The entry point type for BSIPA's Doorstop injector.
/// </summary>
// ReSharper disable once UnusedMember.Global // ReSharper disable once UnusedMember.Global
public static class Injector
internal static class Injector
{ {
private static Task pluginAsyncLoadTask; private static Task pluginAsyncLoadTask;
private static Task permissionFixTask; private static Task permissionFixTask;
// ReSharper disable once UnusedParameter.Global // ReSharper disable once UnusedParameter.Global
public static void Main(string[] args)
internal static void Main(string[] args)
{ // entry point for doorstop { // entry point for doorstop
// At this point, literally nothing but mscorlib is loaded, // At this point, literally nothing but mscorlib is loaded,
// and since this class doesn't have any static fields that // and since this class doesn't have any static fields that


+ 2
- 1
appveyor.yml View File

@ -49,7 +49,8 @@ after_deploy:
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -eq 'master') if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -eq 'master')
{ {
cd docs cd docs
& docfx docfx.json
& docfx metadata
& docfx build
if ($lastexitcode -ne 0){ if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode." throw [System.Exception] "docfx build failed with exit code $lastexitcode."
} }


+ 3
- 1
docs/docfx.json View File

@ -9,7 +9,9 @@
], ],
"exclude": [ "exclude": [
"**/IPA.csproj", "**/IPA.csproj",
"**/IPA.Tests.csproj"
"**/IPA.Tests.csproj",
"BuildTools/**.csproj",
"Doorstop/**.csproj"
] ]
} }
], ],


Loading…
Cancel
Save