DataJuggler.UltimateHelper 9.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DataJuggler.UltimateHelper --version 9.0.0                
NuGet\Install-Package DataJuggler.UltimateHelper -Version 9.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataJuggler.UltimateHelper" Version="9.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DataJuggler.UltimateHelper --version 9.0.0                
#r "nuget: DataJuggler.UltimateHelper, 9.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DataJuggler.UltimateHelper as a Cake Addin
#addin nuget:?package=DataJuggler.UltimateHelper&version=9.0.0

// Install DataJuggler.UltimateHelper as a Cake Tool
#tool nuget:?package=DataJuggler.UltimateHelper&version=9.0.0                

UltimateHelper

This library is a collection of helper classes that make working with C# much easier.

This package was originally for .Net Framework, then ported to .Net Core, .NET, .NET6, .NET 7 and now .NET8.

News

11.12.2024: I updated the project to .NET 9.

9.2.2024: I fixed a bug with GetTextLines in case the text just has \r, instead of \r\n for new lines.

8.14.2024: I changed NumericHelper.RoundDown and RoundUp to now take into account digits.

1.16.2024: The description was wrong for this project. I had forgot to change the description to, This project has been updated to .NET 8.

12.14.2023: I added a new method CloneLines to TextHelper. This method create a new List of TextLine objects, and copies the text from the source parameter. This is used by DataJuggler.RandomUSD.

11.20.2023: Added a new method to TextHelper - ExportWords. I also added a new property Index to Word and TextLine objects, and set the value for Index when GetWords and GetTextLines is called.

11.14.2023: This project has been updated to .NET 8.

8.29.2023: I added a new method to NumericHelper - DivideDoublesAsDecimals. .NET does not handle division by doubles very well, so this method casts the doubles given to decimals, and returns the quotient as a double.

8.14.2023 New Video

Create a Stock Predictor With C# and ML.NET Part I https://youtu.be/hF8LkvwOXQY

8.13.2023 - Added a new method to TextHelper - GetTextLinesFromFile. I also modified the method GetTextLines, to have an option to parse the words foreach line. The new method GetTextLinesFromFile reads the text from the file, and then calls GetTextLines with optional parameters to also get the words and pass in your own delimiter. I also added an icon (png) for the project.

8.11.2023 - Added a new method to DateHelper - ParseEightDigitDate.

Working Examples - Opensource Projects Using This Project

Blazor Gallery is a complete C# / SQL Server image portfolio site

Live Site https://blazorgallery.com

Code: https://github.com/DataJuggler/BlazorGallery

Video:

Is There 1 Brave C# Programmer In The World? https://youtu.be/HAMgeaCuvHY

8.11.2023: Blazor Gallery has not received a star yet.

Blazor Excelerate

Code Generate C# Classes From Excel Header Rows

Live Site https://excelerate.datajuggler.com

Code: https://github.com/DataJuggler/Blazor.Excelerate

Blazor Excelerate uses Nuget package DataJuggler.Excelerate, which allows you to load and save entire worksheets and workbooks with a few lines of code.

List of classes:

BooleanHelper

Parses booleans and allows you set to a default value.

CodeHelper

Used in formatting code. An example of this is in the live site https://codopy.com, which is an opensource project here: https://github.com/DataJuggler/Codopy Format C# Code From Visual Studio when pasting to Git Hub read me files, or the social media.

CodeLine

A code line is a line of C# code. This class is used in conjunction with TextLine.cs and CodeHelper.cs

ConfigurationHelper

This class reads app settings from an app.config or web.config. This was created for .NET Framework, but still works.

DateHelper

This class has methods to help parse dates safely.

EnumHelper

This class make it easier to parse and iterate enumerations.

EnvironmentVariableHelper

This class makes it simple to get and set values for System, User or Process Environment Variables.

FileHelper

This class has many method that help with dealing with files, such as get all files recursively from a folder, create a file name with a partial guid to ensure uniqueness in a folder and more.

ListHelper

This class is a must for anyone who deals with Lists or List<T>. My two favorite methods are HasOneOrMoreItems and HasXOrMoreItems.

NullHelper

Check if multiple objects at once with NullHelper.Exists(object1, object2, object3, object4, object5);

NumericHelper

This class started as a way to parse int's, double's and decimal's, however it has evolved since and has many helpful methods such as EnsureInRange and IsInRange and more.

TextHelper

This is one of my favorite classes. TextHelper.Exists(string1, string2, string3, string4) is much easier to write than if ((!String.IsNullOrEmpty(string1)) && ((!String.IsNullOrEmpty(string2)) && (!String.IsNullOrEmpty(string3)) && (!String.IsNullOrEmpty(string4))). Also there are methods such as CapitalizeFirstChar, GetTextLines, GetWords, StartsWithVowel, and more.

XmlPatternHelper

This class is used to encode and decode xml text if the file contains ampersands (&) or greater than or less than signs.

This class is used by Regionizer and Regionizer2022 Visual Studio Extensions, where the custom comment dictionary has to be able to save < > and &'s in Xml.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (20)

Showing the top 5 NuGet packages that depend on DataJuggler.UltimateHelper:

Package Downloads
DataJuggler.Blazor.Components

This project consists of an ImageButton, ProgressBar, Sprite, TextBoxComponent which can display as a TextBox, Multi-line TextBox or a CheckBox, a ComboBox, CheckedListComboBox, CheckedListBox, Grid, Label and a brand new Calendar Component. The CSS file DataJuggler.Blazor.Components.css contains many useful classes to help style and position objects. This version is for .Net 8.0.

DataJuggler.Excelerate

Excelerate has been updated for .NET9. Use an 8.x version for .NET8, a 7.x version for .NET7. Excelerate will change how you work with C# and Excel. Excelerate uses NPOI and it makes it easy to load Workbooks or Worksheets. Excelerate now has a code generation feature, you can create a C# class from a header row. Excelerate also has helper classes to allow you load and save entire workbooks or worksheets without ever having referring to a cell. Use my free site https://excelerate.datajuggler.com to code generate C# classes from Excel header rows. ExcelDataLoader will load a workbook by passing in a path or a Worksheet by passing in a a WorksheetInfo object to specify what to load. Background I have a couple of clients that I built programs that automate Excel processes. This project streamlines Excel development.

DataJuggler.Blazor.FileUpload

BlazorFileUpload makes it easy to upload files in Blazor projects. The 8.0 version is only for .NET8. Use 7.x version for .NET7, 6.x for .NET6. All new features / bug fixes are for .NET8 version onward. BlazorFileUpload now supports multiple file uploads!

DataJuggler.Cryptography

This version is for .NET9 and is a port of the Dot Net Core version of CryptographyHelper from my Dot Net Framework project DataJuggler.Core.UltimateHelper. The code is available here: https://github.com/DataJuggler/DataJuggler.Cryptography This project adds many Nuget dependencies to use Konscious.Security.Cryptography in a Dot Net Core project, so I choose to create a separate project rather than include it in the Dot Net Core version of UltimateHelper, DataJuggler.Net.UltimateHelper.Core. To view the documentation, visit: https://github.com/DataJuggler/DataJuggler.Cryptography/blob/master/README.md

DataJuggler.Win.Controls

This package contains a series of controls such as a LabelTextBoxControl, LabelComboBoxControl, LabelCheckBox, etc. This package was originally for .Net Framework, but has been ported to .Net 8. Use a 7.x version for .NET 7, Use a 6.x version for .NET 6, a 5.x for .NET 5.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.2 41 11/22/2024
9.0.1 35 11/20/2024
9.0.0 171 11/12/2024
8.1.3 1,110 9/3/2024
8.1.2 93 9/3/2024
8.1.1 235 8/14/2024
8.1.0 130 8/13/2024
8.0.11 198 7/24/2024
8.0.10 106 7/24/2024
8.0.8 1,777 5/12/2024
8.0.7 103 5/11/2024
8.0.6 1,017 1/16/2024
8.0.5 1,909 12/14/2023
8.0.4 153 12/14/2023
8.0.3 208 11/20/2023
8.0.2 140 11/20/2023
8.0.1 269 11/20/2023
8.0.0 1,798 11/14/2023
7.2.4 598 8/30/2023
7.2.3 175 8/30/2023
7.2.2 1,825 8/14/2023
7.2.1 570 8/13/2023
7.2.0 168 8/13/2023
7.1.7 452 8/12/2023
7.1.6 156 8/12/2023
7.1.5 170 8/12/2023
7.1.4 173 7/30/2023
7.1.3 1,904 6/21/2023
7.1.2 4,855 3/13/2023
7.1.1 836 2/24/2023
7.1.0 447 2/24/2023
7.0.0 22,714 11/8/2022
7.0.0-rc1 1,032 10/19/2022
6.0.6 5,005 6/17/2022
6.0.4 1,253 5/4/2022
6.0.3 429 5/3/2022
6.0.2 5,508 1/23/2022
6.0.1 342 1/4/2022
6.0.0 1,088 12/11/2021
1.7.1 3,721 11/11/2021
1.7.0 362 11/11/2021
1.6.9 2,700 11/7/2021
1.6.8 3,561 10/31/2021
1.6.7 6,958 9/10/2021
1.6.6 415 9/9/2021
1.6.4 365 9/2/2021
1.6.3 369 9/1/2021
1.6.2 394 9/1/2021
1.6.1 343 9/1/2021
1.6.0 2,627 8/10/2021
1.5.12 412 8/10/2021
1.5.11 390 8/9/2021
1.5.8 407 8/4/2021
1.5.7 445 8/3/2021
1.5.6 447 8/3/2021
1.5.5 1,045 1/29/2021
1.5.4 366 1/29/2021
1.5.1 1,052 11/29/2020
1.3.1 4,808 11/13/2020
1.3.0 415 11/13/2020

# 11.20.2023: Added a new method to TextHelper - ExportWords.
I updated to version 8.0.2, with the addition of Index added to Word and TextLine objects.
These values are now set in GetTextLines and GetWords method of TextHelper.

# 11.14.2023: This project has been updated to .NET8!

# 8.14.2023 New Video

Create a Stock Predictor With C# and ML.NET Part I
https://youtu.be/hF8LkvwOXQY

8.13.2023 - Added a new method to TextHelper - GetTextLinesFromFile. I also modified the method
GetTextLines, to have an option to parse the words foreach line. The new method GetTextLinesFromFile
reads the text from the file, and then calls GetTextLines with optional parameters to also get the words
and pass in your own delimiter. I added an Icon for the project.

8:11.2023 - Added a new method to DateHelper - ParseEightDigitDate.
Parses a date in the fromat yyyymmdd.

6.21.2023: I added FileHelper.RemovePartialGuid method, and I updated the ReadMe file
with some sample projects that use this project. I also realized the ReadMe was not being packed
with the package and have now fixed this.

3.13.2023: I added System.Configuration Nuget package. I thought this was already present, but wasn't.
I also updated EnvironmentVariableHelper to have a Set method and now the GetEnvironmentVariable
and SetEnvironmentVariable now have a target parameter (Machine, User or Process).

2.23.2023: I added a new CodeHelper to help with formatting code (C# code for now).
Version 7.1.1 Fixes an issue where in a web project, new lines are not added, only \n.

10.19.2022: First release for .NET 7. The only reason this version has a -rc is so it doesn't show up
in Nuget package feeds until .NET 7 is released next month.

5.4.2022
Version 6.0.5: Last and final override for NullHelper.IsNull and Exists methods.

5.3.2022
Version 6.0.4: I added a couple of overrides for IsNull and Exists methods for NullHelper.cs

Version 6.0.0: This version is for 6.0.

Version 1.7.1: I updated Nuget Packages for this release, and System.Configuration was updated recently, so I
updated.

Version 1.7.0: I updated the package to multi-target .Net5.0 and .Net6.0

Version 1.6.9: Boolean Helper Upgrade described below had some flaws. Hopefully fixed now.

Version 1.6.8 - After 11 years, BooleanHelper got an upgrade.

Version 1.6.7 - I added a couple of read only properties for IsComment, IsPartialComment, PartialCommentText, PartialCommentCode.

Version 1.6.6 - I added a GetWordsAsStrings, because sometimes you just need a list of strings.

Version 1.6.5 - After years of writing this, I found a safer way of getting the FileNameWithoutExtension. My previous method failed if a fileName passed in doesn't have an extension.

Version 1.6.4 - I added a new method FileHelper.Exists. System.IO.File.Exists will return true if you pass in an empty string. My version will return true only if the string exists and the File exists on disk.

Version 1.6.3 - I updated FileHelper.CreateFileNameWithPartialGuid method to have a couple of optional
parameters to set whether includeExtension is true or fileNameOnly.

Version 1.6.2 - I changed FileHelper.CreateFileNameWithPartialGuid method, to have an optional parameter to return the fileName only.

Version 1.6.1 - I realized my method FileHelper.CreateFileNameWithPartialGuid had a hard coded number of
characters (bad enough) but also had .png extension hard coded. I am guilty of a specific use method here, sorry.
It did work for .png's I tested.

Version 1.6.0 - I removed SQLParameterHelper, which had a dependency on System.Data.SQLClient.
I moved SQLParameterHelper to its own project DataJuggler.UltimateHelper.SQL
I also added another override for the CheckInRange and the EnsureInRange to NumericHelper, where
you can now pass in a list of integers, doubles or decimals to work with sets of numbers.

Version 1.5.12 - I added a new method IsInRange to NumericHelper.

Version 1.5.11 - I added a new method EnsureInRange to NumericHelper.

Version 1.5.8 - I added a couple of methods to DateHelper to get the month names and GetDateShortText

Version 1.5.7 - Oops. I forgot to make the new ExportTextLines static.

Version 1.5.6 - I did two things. One I got rid of WordParser, even though it breaks many of my own apps.
TextHelper has the exact two methods for GetTextLines and GetWords.
The other thing I added was a new method called ExportTextLines, to make it easy to reassemble a List of
TextLines back into a File or block.

Version 1.5.5 - I had been working on a method in the Word Parser, and I had to make a change to parse some text that didn't end in new line characters. I fixed and checked it right back in, so hopefully
no one downloaded this package in the last 5 minutes.

Version 1.5.4 - Remove the code that create the symbols package, as someone updated the project with
it and I didn't ask for it and it didn't work to allow you to step through the code.

Download the code from Git Hub if you need to debug.

Version 1.5.3 - I am trying to be somewhat consistent, and the 5 stand for .Net 5.

Version 1.5.1 - I am trying to be somewhat consistent, and the 5 stand for .Net 5.

Version 1.3.1 - I realized I had forgotten to drop the .Core.

The new namespace is just DataJuggler.UltimateHelper (no .Net or .Core Yay!).

Version 1.5.3 - Brought over EnumHelper from .Net Framework version now that I am converting DB Compare
to .Net 5, I needed this.

Version 1.5.0 - .Net 5 Port.

Version 1.3.0 - Converted to .Net 5.0 and dropped the .Core name.

Version 1.2.6 - Not sure if a publish was needed for this, but the project file now has Source Link enabled, so source stepping should be possible.

Version 1.2.5 - I changed NumericHelper.IsNumeric to include 3 new optional parameters.
bool RemoveDash, true by default. - numbers are removed for this test.
double defaultValue, -2,000,000 default value.
double errorValue, -2,000,001 default value.

If the number parses to greater than, it is numeric.
My old way didn't work for negative numbers, and I need them now.

Version 1.2.4 - I added a 5th parameter override to NullHelper.Exists and NullHelper.IsNull

Version 1.2.3 - I accidently had LastIndexOf instead of Index of when I created a new file name in CreateFileNameWithPartialGuid method.

Version 1.2.2 - I added a new method to FileHelper, CreateFileName with PartialGuid.

Version 1.2.1
I brought over WordParser.cs.

Version 1.2.0 This is my first attempt at Multi-Targeting so this application is availaable to .Net Core 3.1 and .Net Standard 2.1.