The Visual Studio Project - Sibz/YASEL GitHub Wiki
This page will help you understand the VS project.
First off you need to ensure references are set up: see Setting up VS
How It Works
The file structure/namespace usage is intended to be used with Yasel Exporter, which 'compiles' your code and copies it to clipboard, ready to be pasted in game.
Namespaces
- Each file has its own namespace, and the namespace is the name of the file.
- This way, when you want to use the code in another file, you can use the 'using' keyword to get type hinting.
- Only one namespace per file is supported
Using directives
- So Exporter knows to include a file, and to provide hinting, you use 'using' directives to include other code
- These should be inside the namespace
- The standard using directives at the top are ignored by YASEL Exporter.
Main Program
- Main program file should be put under the Programs folder
- It can be called anything but the namespace still needs to be the same as file name
- It should have only 1 class, and extended from Program.Program i.e.
class MyProgram : Program.Program
For an example see Example Program
Include Files
- Include files can be named anything and put anywhere, again namespace must be the file name
- Can only include classes, A C# constraint, only classes can be contained within a namespace
Extension Files
- Can include files to be extension methods
- Name the namespace and class the same as filename, and append the work Extensions