Added documentation.

Added more documentation.

Corrected doc.
This commit is contained in:
2020-04-04 17:35:06 -05:00
parent d541961007
commit 04f9aab10b
7 changed files with 96 additions and 0 deletions

View File

@@ -1,7 +1,18 @@
using System.Collections.Generic;
namespace RecrownedGTK.Persistence {
/// <summary>
/// Serializable preferences.
/// </summary>
public struct PreferencesInfo {
/// <summary>
/// Array of preferences.
/// </summary>
public PreferenceInfo[] preferences;
/// <summary>
/// Sets the serializable preference with a string string value pair dictionary.
/// </summary>
/// <param name="preferences">A dictionary of string and string pair.</param>
public void SetPreferences(Dictionary<string, string> preferences)
{
this.preferences = new PreferenceInfo[preferences.Count];
@@ -13,6 +24,10 @@ namespace RecrownedGTK.Persistence {
}
}
/// <summary>
/// Return a dictionary containing a string string key value pair.
/// </summary>
/// <returns>Dictionary with a string value and string key representing a preference option.</returns>
public Dictionary<string, string> GetPreferences() {
Dictionary<string, string> res = new Dictionary<string, string>();
for (int prefID = 0; prefID < preferences.Length; prefID++) {
@@ -21,7 +36,13 @@ namespace RecrownedGTK.Persistence {
return res;
}
/// <summary>
/// Serializable preference option.
/// </summary>
public struct PreferenceInfo {
/// <summary>
/// The key and value of the option in the preferences.
/// </summary>
public string key, value;
public PreferenceInfo(string key, string value) {