Skip to content

Commit

Permalink
UpdateProjectFiles Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ljlclark committed Mar 24, 2024
1 parent 5d96aac commit 12b7f9c
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ public Solutions GetCollection(List<Solution> list)
public Solution Add(SolutionParentKey parentKey, string name, int sequence
, string path = null)
{
Solution retValue;

string message = "";
NetString.AddMissingArgument(message, parentKey);
AddMissingValues(message, parentKey);
NetString.AddMissingArgument(message, name);
NetString.ThrowInvalidArgument(message);

retValue = LJCRetrieve(parentKey, name);
var retValue = LJCRetrieve(parentKey, name);
if (null == retValue)
{
retValue = new Solution()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,14 @@ public string GetFileSpec(string codeLineName, string codeGroupName
}

// Get Solution path.
var solutionParentKey = new SolutionParentKey()
{
CodeLine = codeLineName,
CodeGroup = codeGroupName
};
var solutionParentKey = SolutionParentKey(codeLineName, codeGroupName);
var solutionPath = SolutionPath(solutionParentKey
, solutionName);
retValue = Path.Combine(retValue, solutionPath);

// Get Project path.
var projectParentKey = new ProjectParentKey()
{
CodeLine = codeLineName,
CodeGroup = codeGroupName,
Solution = solutionName
};
var projectParentKey = ProjectParentKey(codeLineName, codeGroupName
, solutionName);
var projectPath = ProjectPath(projectParentKey
, projectName);
retValue = Path.Combine(retValue, projectPath);
Expand Down Expand Up @@ -519,9 +511,13 @@ public string SolutionPath(SolutionParentKey parentKey
public ProjectParentKey ProjectParentKey(string codeLineName
, string codeGroupName, string solutionName)
{
ProjectParentKey retValue = null;
string message = "";
NetString.AddMissingArgument(message, codeLineName);
NetString.AddMissingArgument(message, codeGroupName);
NetString.AddMissingArgument(message, solutionName);
NetString.ThrowInvalidArgument(message);

retValue = new ProjectParentKey()
var retValue = new ProjectParentKey()
{
CodeLine = codeLineName,
CodeGroup = codeGroupName,
Expand All @@ -540,9 +536,12 @@ public ProjectParentKey ProjectParentKey(string codeLineName
public SolutionParentKey SolutionParentKey(string codeLineName
, string codeGroupName)
{
SolutionParentKey retValue = null;
string message = "";
NetString.AddMissingArgument(message, codeLineName);
NetString.AddMissingArgument(message, codeGroupName);
NetString.ThrowInvalidArgument(message);

retValue = new SolutionParentKey()
var retValue = new SolutionParentKey()
{
CodeLine = codeLineName,
CodeGroup = codeGroupName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<Compile Include="Manager\ProjectManager.cs" />
<Compile Include="Manager\SolutionManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ValuesUpdateProjectFiles.cs" />
<Compile Include="ValuesProjectFiles.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private void SetManagers()
{
if (null == mManagers)
{
var values = ValuesUpdateProjectFiles.Instance;
var values = ValuesProjectFiles.Instance;
mManagers = values.Managers;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

namespace ProjectFilesDAL
{
public sealed class ValuesUpdateProjectFiles
public sealed class ValuesProjectFiles
{
#region Constructors

// Initializes an object instance.
public ValuesUpdateProjectFiles()
public ValuesProjectFiles()
{
SetConfigFileSpec("UpdateProjectFiles.exe.config");
}
Expand Down Expand Up @@ -78,7 +78,7 @@ public void SetProperties(string fileSpec)
public Color EndColor { get; private set; }

// Gets the singleton instance.
public static ValuesUpdateProjectFiles Instance
public static ValuesProjectFiles Instance
{
get { return mInstance; }
}
Expand All @@ -93,8 +93,8 @@ public static ValuesUpdateProjectFiles Instance
#region Class Data

// The singleton instance.
private static readonly ValuesUpdateProjectFiles mInstance
= new ValuesUpdateProjectFiles();
private static readonly ValuesProjectFiles mInstance
= new ValuesProjectFiles();
#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private void InitializeControls()
{
// Get singleton values.
Cursor = Cursors.WaitCursor;
var values = ValuesUpdateProjectFiles.Instance;
var values = ValuesProjectFiles.Instance;
// *** Begin *** Add - Data
Data = values.Data;
CodeGroups = Data.CodeGroups;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private void InitializeControls()
{
// Get singleton values.
Cursor = Cursors.WaitCursor;
var values = ValuesUpdateProjectFiles.Instance;
var values = ValuesProjectFiles.Instance;
// *** Begin *** Add - Data
Data = values.Data;
CodeLines = Data.CodeLines;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal CodeManagerList()
InitializeComponent();

// Set default class data.
var configValues = ValuesUpdateProjectFiles.Instance;
var configValues = ValuesProjectFiles.Instance;
Text += $" - {configValues.FileSpec}";
Cursor = Cursors.Default;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private void ControlSetup()
// Initialize the Class Data.
private void InitializeClassData()
{
ConfigValues = ValuesUpdateProjectFiles.Instance;
ConfigValues = ValuesProjectFiles.Instance;
Data = ConfigValues.Data;
Managers = ConfigValues.Managers;
}
Expand Down Expand Up @@ -379,7 +379,7 @@ private void SetFocusTab(MouseEventArgs e)
internal ManagersProjectFiles Managers { get; set; }

// The Configuration Settings.
private ValuesUpdateProjectFiles ConfigValues { get; set; }
private ValuesProjectFiles ConfigValues { get; set; }
#endregion

#region Class Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private void InitializeControls()
{
// Get singleton values.
Cursor = Cursors.WaitCursor;
var values = ValuesUpdateProjectFiles.Instance;
var values = ValuesProjectFiles.Instance;
// *** Begin *** Add - Data
Data = values.Data;
Projects = Data.Projects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ private void InitializeControls()
{
// Get singleton values.
Cursor = Cursors.WaitCursor;
var values = ValuesUpdateProjectFiles.Instance;
var values = ValuesProjectFiles.Instance;
// *** Begin *** Add - Data
Data = values.Data;
ProjectFiles = Data.ProjectFiles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private void InitializeControls()
{
// Get singleton values.
Cursor = Cursors.WaitCursor;
var values = ValuesUpdateProjectFiles.Instance;
var values = ValuesProjectFiles.Instance;
// *** Begin *** Add - Data
Data = values.Data;
Solutions = Data.Solutions;
Expand Down

0 comments on commit 12b7f9c

Please sign in to comment.