BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BrawlCrate.UI.APISubscription Class Reference
Inheritance diagram for BrawlCrate.UI.APISubscription:

Public Member Functions

 APISubscription (string repoOwner, string repoName, string path)
 
override string ToString ()
 

Properties

string Version [get]
 
string LastUpdateDate [get]
 
List< string > ManagedScripts [get]
 
string ReadMe [get]
 
string License [get]
 

Constructor & Destructor Documentation

◆ APISubscription()

BrawlCrate.UI.APISubscription.APISubscription ( string  repoOwner,
string  repoName,
string  path 
)
inline
570 {
571 Name = $"{repoOwner}/{repoName}";
572 ReadMe = "";
573 License = "";
574 if (File.Exists($"{path} README.txt"))
575 {
576 ReadMe = File.ReadAllText($"{path} README.txt");
577 }
578
579 if (File.Exists($"{path} LICENSE.txt"))
580 {
581 License = File.ReadAllText($"{path} LICENSE.txt");
582 }
583
584 string[] lines = File.ReadAllLines(path);
585 // Line 0: Release Tag. This is checked against to see if there is a new update for the repo.
586 // Line 1: Release Target Commitish. Used to allow continuous integration repos to work.
587 // Line 2: Update date (not used by updater, used instead to view info)
588 // Line 3+: Each line is a relative path to a file from the installation.
589 // This is used to delete relevant files when updating,
590 // in case a file is moved or deleted by the update intentionally.
591 Version = lines[0];
592 LastUpdateDate = lines[2];
593 ManagedScripts = new List<string>();
594 for (int i = 3; i < lines.Length; i++)
595 {
596 ManagedScripts.Add(lines[i]);
597 }
598
599 Text = ToString();
600 }
List< string > ManagedScripts
Definition: APISubscriptionManager.cs:565
string ReadMe
Definition: APISubscriptionManager.cs:566
string Version
Definition: APISubscriptionManager.cs:563
override string ToString()
Definition: APISubscriptionManager.cs:602
string LastUpdateDate
Definition: APISubscriptionManager.cs:564
string License
Definition: APISubscriptionManager.cs:567

Member Function Documentation

◆ ToString()

override string BrawlCrate.UI.APISubscription.ToString ( )
inline
603 {
604 return $"{Name} ({Version})";
605 }

Property Documentation

◆ LastUpdateDate

string BrawlCrate.UI.APISubscription.LastUpdateDate
get
564{ get; }

◆ License

string BrawlCrate.UI.APISubscription.License
get
567{ get; }

◆ ManagedScripts

List<string> BrawlCrate.UI.APISubscription.ManagedScripts
get
565{ get; }

◆ ReadMe

string BrawlCrate.UI.APISubscription.ReadMe
get
566{ get; }

◆ Version

string BrawlCrate.UI.APISubscription.Version
get
563{ get; }

The documentation for this class was generated from the following file: