mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-11 19:44:44 +00:00
Added In JsonToSimplFileMaster and JsonToSimplPortalFileMaster - Made 'ActualFilePath' a public property, created a new event type (JsonActualFileChange) and raise the event whenever ActualFilePath is determined
This commit is contained in:
@@ -11,12 +11,14 @@ namespace PepperDash.Core.JsonToSimpl
|
||||
/// </summary>
|
||||
public class JsonToSimplConstants
|
||||
{
|
||||
public const ushort JsonIsValidBoolChange = 2;
|
||||
public const ushort JsonIsValidBoolChange = 2;
|
||||
|
||||
|
||||
public const ushort BoolValueChange = 1;
|
||||
public const ushort UshortValueChange = 101;
|
||||
public const ushort StringValueChange = 201;
|
||||
public const ushort FullPathToArrayChange = 202;
|
||||
public const ushort FullPathToArrayChange = 202;
|
||||
public const ushort JsonActualFileChange = 203;
|
||||
}
|
||||
|
||||
//**************************************************************************************************//
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace PepperDash.Core.JsonToSimpl
|
||||
/// </summary>
|
||||
public string Filepath { get; private set; }
|
||||
|
||||
string ActualFilePath;
|
||||
public string ActualFilePath { get; private set; }
|
||||
|
||||
/*****************************************************************************************/
|
||||
/** Privates **/
|
||||
@@ -67,7 +67,8 @@ namespace PepperDash.Core.JsonToSimpl
|
||||
return;
|
||||
}
|
||||
//var actualFileName = actualFile.FullName;
|
||||
ActualFilePath = actualFile.FullName;
|
||||
ActualFilePath = actualFile.FullName;
|
||||
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.JsonActualFileChange);
|
||||
Debug.Console(1, "Actual JSON file is {0}", ActualFilePath);
|
||||
|
||||
string json = File.ReadToEnd(ActualFilePath, System.Text.Encoding.ASCII);
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace PepperDash.Core.JsonToSimpl
|
||||
/// <summary>
|
||||
/// Sets the filepath as well as registers this with the Global.Masters list
|
||||
/// </summary>
|
||||
public string PortalFilepath { get; private set; }
|
||||
|
||||
string ActualFilePath;
|
||||
public string PortalFilepath { get; private set; }
|
||||
|
||||
public string ActualFilePath { get; private set; }
|
||||
|
||||
/*****************************************************************************************/
|
||||
/** Privates **/
|
||||
@@ -61,7 +61,8 @@ namespace PepperDash.Core.JsonToSimpl
|
||||
|
||||
if (actualLocalFile != null)
|
||||
{
|
||||
ActualFilePath = actualLocalFile.FullName;
|
||||
ActualFilePath = actualLocalFile.FullName;
|
||||
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.JsonActualFileChange);
|
||||
}
|
||||
// If the local file does not exist, then read the portal file xyz.json
|
||||
// and create the local.
|
||||
|
||||
Reference in New Issue
Block a user