mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 13:14:49 +00:00
Merged in feature/JsonFilePathOut (pull request #26)
Add new feature - JsonFilenameOut
This commit is contained in:
@@ -13,10 +13,12 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
{
|
{
|
||||||
public const ushort JsonIsValidBoolChange = 2;
|
public const ushort JsonIsValidBoolChange = 2;
|
||||||
|
|
||||||
|
|
||||||
public const ushort BoolValueChange = 1;
|
public const ushort BoolValueChange = 1;
|
||||||
public const ushort UshortValueChange = 101;
|
public const ushort UshortValueChange = 101;
|
||||||
public const ushort StringValueChange = 201;
|
public const ushort StringValueChange = 201;
|
||||||
public const ushort FullPathToArrayChange = 202;
|
public const ushort FullPathToArrayChange = 202;
|
||||||
|
public const ushort ActualFilePathChange = 203;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************//
|
//**************************************************************************************************//
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Filepath { get; private set; }
|
public string Filepath { get; private set; }
|
||||||
|
|
||||||
string ActualFilePath;
|
public string ActualFilePath { get; private set; }
|
||||||
|
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
/** Privates **/
|
/** Privates **/
|
||||||
@@ -68,6 +68,7 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
}
|
}
|
||||||
//var actualFileName = actualFile.FullName;
|
//var actualFileName = actualFile.FullName;
|
||||||
ActualFilePath = actualFile.FullName;
|
ActualFilePath = actualFile.FullName;
|
||||||
|
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.ActualFilePathChange);
|
||||||
Debug.Console(1, "Actual JSON file is {0}", ActualFilePath);
|
Debug.Console(1, "Actual JSON file is {0}", ActualFilePath);
|
||||||
|
|
||||||
string json = File.ReadToEnd(ActualFilePath, System.Text.Encoding.ASCII);
|
string json = File.ReadToEnd(ActualFilePath, System.Text.Encoding.ASCII);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string PortalFilepath { get; private set; }
|
public string PortalFilepath { get; private set; }
|
||||||
|
|
||||||
string ActualFilePath;
|
public string ActualFilePath { get; private set; }
|
||||||
|
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
/** Privates **/
|
/** Privates **/
|
||||||
@@ -62,6 +62,7 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
if (actualLocalFile != null)
|
if (actualLocalFile != null)
|
||||||
{
|
{
|
||||||
ActualFilePath = actualLocalFile.FullName;
|
ActualFilePath = actualLocalFile.FullName;
|
||||||
|
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.ActualFilePathChange);
|
||||||
}
|
}
|
||||||
// If the local file does not exist, then read the portal file xyz.json
|
// If the local file does not exist, then read the portal file xyz.json
|
||||||
// and create the local.
|
// and create the local.
|
||||||
@@ -75,6 +76,7 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
// got the portal file, hand off to the merge / save method
|
// got the portal file, hand off to the merge / save method
|
||||||
PortalConfigReader.ReadAndMergeFileIfNecessary(actualPortalFile.FullName, newLocalPath);
|
PortalConfigReader.ReadAndMergeFileIfNecessary(actualPortalFile.FullName, newLocalPath);
|
||||||
ActualFilePath = newLocalPath;
|
ActualFilePath = newLocalPath;
|
||||||
|
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.ActualFilePathChange);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user