Updated README.md

This commit is contained in:
The Doctor
2020-07-09 09:36:59 +01:00
parent 4703f6e078
commit 76646fd05b
3 changed files with 30 additions and 16 deletions

View File

@ -34,7 +34,7 @@ namespace PMF.Managers
var json = JsonConvert.SerializeObject(PackageManager.PackageList);
File.WriteAllText(Config.ManifestFileName, json);
Directory.Delete(Config.TemporaryFolder, true);
PMF.InvokePackageMessageEvent("Successfully cleaned PMF");
// PMF.InvokePackageMessageEvent("Successfully cleaned PMF");
}
public static void validateManifestFile()

View File

@ -1,4 +1,6 @@
using System;
using Newtonsoft.Json.Converters;
using System;
using System.Text.Json.Serialization;
namespace PMF
{
@ -20,11 +22,13 @@ namespace PMF
/// <summary>
/// Type of dependency
/// </summary>
[JsonConverter(typeof(StringEnumConverter))] // This converts enum to string and vice versa when generating or parsing json
public DependencyType Type { get; set; }
/// <summary>
/// Version of the dependency if type is Package
/// </summary>
[JsonConverter(typeof(VersionConverter))] // This ensures the version object is correctly converted
public Version Version { get; set; }
/// <summary>

View File

@ -125,22 +125,32 @@ This is the basic information a package would have
```json
{
"ID": "something_cool",
"Type": 1,
"Type": "Plugin",
"Name": "Im Something cool",
"Description": "This is a package that makes you cool and awesome",
"Assets": [{
"Assets": [
{
"Version": "0.0.1",
"SdkVersion": "0.0.5",
"Checksum": "somethingCoolWithLettersAndNumbers",
"FileName": "name.zip",
"Url": "somewhereElseDoesntNeedToBeYourServer.zip",
"Dependencies": [{
"Dependencies": [
{
"ID": "Inner Spirit",
"Checksum": "somethingHere",
"Type": "Standalone",
"FileName": "zipped.zip",
"Url": "somewhereElseDoesntNeedToBeYourServer.zip"
},
{
"ID": "Other package id",
"Checksum": "somethingHere",
"Type": "Package",
"Version": "0.2.3"
}]
}]
}
]
}
```