Dev changes (#3)

* Fixed dependency

* Updates to NeoDictionary

* Changes to NeoDictionary

* Started working on a Git implementation to integrate into Game Engines in the future

* Added commit functionality to the git library

* New changes

* Added select for NeoDictionary.cs

* Fixed issue with previous new method

* Added a Benchmarking Tool to be used mostly in game engines

* Added IndexOf to NeoDictionary.cs

* Added new method for BenchmarkUtility.cs

* added an instacedobject class

* Added a new shuffle method for lists

* fixed return type

* Added new Changelog generator
This commit was merged in pull request #3.
This commit is contained in:
2025-02-18 21:09:25 +00:00
committed by GitHub
parent 8f249d2567
commit 7b6115da21
22 changed files with 759 additions and 3 deletions
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using LibGit2Sharp;
namespace OmegaLeo.HelperLib.Git.Models
{
public class ChangeFolder
{
public string FolderName { get; set; }
public List<ChangeFolder> SubFolders { get; set; }
public IEnumerable<TreeEntryChanges> ChangesInFolder { get; set; }
public ChangeFolder()
{
FolderName = "";
SubFolders = new List<ChangeFolder>();
ChangesInFolder = new List<TreeEntryChanges>();
}
public ChangeFolder RecursiveGet(List<string> paths)
{
if (!paths.Any()) return null;
var tempPaths = paths;
var pathToCheck = tempPaths.FirstOrDefault();
ChangeFolder folder = new ChangeFolder();
if (FolderName.Equals(pathToCheck, StringComparison.OrdinalIgnoreCase))
{
folder = this;
}
else if (SubFolders.Any(x => x.FolderName.Equals(pathToCheck)))
{
folder = SubFolders.FirstOrDefault(x => x.FolderName.Equals(pathToCheck))!;
}
else
{
folder.FolderName = pathToCheck;
SubFolders.Add(folder);
}
tempPaths.RemoveAt(0);
if (tempPaths.Any())
{
return folder.RecursiveGet(tempPaths);
}
else
{
return folder;
}
}
}
}