* Added colors from the style guide to :root so they're available globally. Also switched out hex codes for named variables in .dark-palette and .light-palette wherever possible.
* feat: add success and danger colors to root
First on constant variable issue:
This will not compile:
[Plugin(MyPluginName)] // Won't compile because MyPluginName isn't const
[Plugin(MyConstPluginName)] // OK
[Plugin("My Cool Plugin")] // OK
In order to access properties on the static class, it must specify the name of the class before the properties name as proposed on this change:
[Plugin(Variables.MyPluginName)] // Won't compile because MyPluginName isn't const
[Plugin(Variables.MyConstPluginName)] // OK
[Plugin("My Cool Plugin")] // OK
Second on access on attribute properties:
In order to access plugin.Name on this code:
var type = typeof(MyPlugin); // Returns a Type object representing our MyPlugin class
var attributes = System.Attribute.GetCustomAttributes(type); // Returns an Attribute[]
foreach (var a in attributes)
{
if (a is PluginAttribute plugin)
Console.WriteLine($"Plugin Name: {plugin.Name}");
}
You need to cast if first to the right class, then access the properties, as the above code will generate a compile-time error:
var type = typeof(PluginAttribute); // Returns a Type object representing our PluginAttribute class
var attributes = System.Attribute.GetCustomAttributes(type); // Returns an Attribute[]
foreach (var a in attributes)
{
if (a is PluginAttribute)
{
PluginAttribute plug = (PluginAttribute)a; //Cast it first to PluginAttribute class before you can access all accessible properties
Console.WriteLine($"Plugin Name: {plug.Name}");
}
}
* Add link to boilerplate Glitch file
The boilerplate link is hard to see in the previous "introduction" page. I was using the old Glitch project link, and was confused.
When I googled for a solution, it was clear than others had also been quite confused. I believe this additional instruction will help many people.
* Direct people back to introduction page
Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* Remove unnecessary indentation
Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* Remove spaces on empty line
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
* Remove spaces on empty line
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
* Add empty line to fix markdown link
Markdown link needs a blank line to render correctly
* fix: add extra line to prevent linting error
* fix/remove-bullet-points
Co-authored-by: Randell Dawson <rdawson@onepathtech.com>
Co-authored-by: Tom <tmondloch01@gmail.com>
* [Update-guide] Added link of a hands-on tutorial
Added link of a hands-on tutorial which is a great way to learn more about Haskell.
* [Update] Added more content about Haskell
Added reasons for learning Haskell and link with project ideas.
* fix: removed non-secure links