Updated README.md
This commit is contained in:
@ -34,7 +34,7 @@ namespace PMF.Managers
|
|||||||
var json = JsonConvert.SerializeObject(PackageManager.PackageList);
|
var json = JsonConvert.SerializeObject(PackageManager.PackageList);
|
||||||
File.WriteAllText(Config.ManifestFileName, json);
|
File.WriteAllText(Config.ManifestFileName, json);
|
||||||
Directory.Delete(Config.TemporaryFolder, true);
|
Directory.Delete(Config.TemporaryFolder, true);
|
||||||
PMF.InvokePackageMessageEvent("Successfully cleaned PMF");
|
// PMF.InvokePackageMessageEvent("Successfully cleaned PMF");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void validateManifestFile()
|
public static void validateManifestFile()
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
using System;
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace PMF
|
namespace PMF
|
||||||
{
|
{
|
||||||
@ -20,11 +22,13 @@ namespace PMF
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Type of dependency
|
/// Type of dependency
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))] // This converts enum to string and vice versa when generating or parsing json
|
||||||
public DependencyType Type { get; set; }
|
public DependencyType Type { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the dependency if type is Package
|
/// Version of the dependency if type is Package
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(VersionConverter))] // This ensures the version object is correctly converted
|
||||||
public Version Version { get; set; }
|
public Version Version { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
38
README.md
38
README.md
@ -125,22 +125,32 @@ This is the basic information a package would have
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"ID": "something_cool",
|
"ID": "something_cool",
|
||||||
"Type": 1,
|
"Type": "Plugin",
|
||||||
"Name": "Im Something cool",
|
"Name": "Im Something cool",
|
||||||
"Description": "This is a package that makes you cool and awesome",
|
"Description": "This is a package that makes you cool and awesome",
|
||||||
"Assets": [{
|
"Assets": [
|
||||||
"Version": "0.0.1",
|
{
|
||||||
"SdkVersion": "0.0.5",
|
"Version": "0.0.1",
|
||||||
"Checksum": "somethingCoolWithLettersAndNumbers",
|
"SdkVersion": "0.0.5",
|
||||||
"FileName": "name.zip",
|
"Checksum": "somethingCoolWithLettersAndNumbers",
|
||||||
"Url": "somewhereElseDoesntNeedToBeYourServer.zip",
|
"FileName": "name.zip",
|
||||||
"Dependencies": [{
|
"Url": "somewhereElseDoesntNeedToBeYourServer.zip",
|
||||||
"ID": "Inner Spirit",
|
"Dependencies": [
|
||||||
"Checksum": "somethingHere",
|
{
|
||||||
"FileName": "zipped.zip",
|
"ID": "Inner Spirit",
|
||||||
"Url": "somewhereElseDoesntNeedToBeYourServer.zip"
|
"Checksum": "somethingHere",
|
||||||
}]
|
"Type": "Standalone",
|
||||||
}]
|
"FileName": "zipped.zip",
|
||||||
|
"Url": "somewhereElseDoesntNeedToBeYourServer.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ID": "Other package id",
|
||||||
|
"Checksum": "somethingHere",
|
||||||
|
"Type": "Package",
|
||||||
|
"Version": "0.2.3"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user