EddieBreeg.CoreExtensions 1.0.0-pre

This is a prerelease version of EddieBreeg.CoreExtensions.
There is a newer version of this package available.
See the version list below for details.
dotnet add package EddieBreeg.CoreExtensions --version 1.0.0-pre
NuGet\Install-Package EddieBreeg.CoreExtensions -Version 1.0.0-pre
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="EddieBreeg.CoreExtensions" Version="1.0.0-pre" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EddieBreeg.CoreExtensions --version 1.0.0-pre
#r "nuget: EddieBreeg.CoreExtensions, 1.0.0-pre"
#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 EddieBreeg.CoreExtensions as a Cake Addin
#addin nuget:?package=EddieBreeg.CoreExtensions&version=1.0.0-pre&prerelease

// Install EddieBreeg.CoreExtensions as a Cake Tool
#tool nuget:?package=EddieBreeg.CoreExtensions&version=1.0.0-pre&prerelease

CoreExtensions

CoreExtensions is a library which extends the core features of C#, using existing namespaces like System or System.Linq.

Version: 1.0.0 prerelease

Features List

  1. System.Core
  1. System.NumericalStringComparer
  1. System.Linq.ListExtensions
  1. System.InputHandler

Doc

Core

A class containing basic core features

SplitRange
SplitRange(int min, int max, int divider)
  • min: The inferiour boundry of the interval to split

  • max: The superior boundry of the interval to split

  • divider: The number of subintervals to compute

Creates an even subdivision of the interval [min;max]

Returns: An array containing the boundries of the subdivision

Range
Range(int limit)
  • limit: The extreme value at which the sequence stops

Generates a sequence from 0 to limit (excluded)

Returns: The sequence into a List object

Range
Range(int start, int limit)
  • start: The integer from which the sequence starts

  • limit: The extreme value at which the sequence stops

Generates a sequence from start to limit (excluded)

Returns: The sequence into a List object

Range
Range(int start, int limit, int step)
  • start: The integer from which the sequence starts

  • limit: The extreme value at which the sequence stops

  • step: The increment

Generates a sequence from start to limit (excluded), incrementng by step

Returns: The sequence into a List object

NumericalStringComparer

An IComparer class to compare to numerical strings

Compare

Returns: a.CompareNumerically(b);

Remarks: See the doc of the CompareNumerically extension method for more details

ListExtensions

A collection of extension methods for List objects

SplitList
SplitList(List lst, int count)

Splits the list into count sublists

  • count:

Returns:

InputHandler

A static class which contains useful methods to handle user inputs

KeyInput
KeyInput(string str, char[] choices, char defaultValue)

Prompts the user to press a key

  • str: The string to print out

  • defaultValue: Defines what will be returned if the user presses Enter

Returns: A char object representing the key

KeyInput
KeyInput(string str, char[] choices, char defaultValue='\0')
  • choices: The different options the user can choose from
LineInput
LineInput(string str, string defaultValue = "")

Prompts the user to enter a string of text

  • str: The string to print out

  • defaultValue: The value to return if the user hits enter

Returns: The string entered by the user

LineInput
LineInput(string str, string[] choices, string defaultValue)

Lets the user choose a string from a set of default values

  • choices: An array containing the options the user can choose from
IntInput
IntInput(string str, int defaultValue = 0)

Prompts the user to enter an integer

  • str: The string to print out

  • defaultValue: What the function returns if the user hits Enter

Returns: The integer the user entered

DoubleInput
IntInput(string str, int defaultValue = 0)

Prompts the user to enter a double

  • str: The string to print out

  • defaultValue: What the function returns if the user hits Enter

Returns: The double the user entered

ListInput
ListInput(string str, List defaultValue = null, Func condition = null)

Prompts the user to enter a list of text strings

  • str: The string to print out

  • defaultValue: The list to return if the user hits Enter

  • condition: The condition the resulting list must satisfy

Returns: The user input as a List object

Remarks: The values entered by the user should be separated by a ' '

IntListInput
IntListInput(string str, List defaultValue = null, Func condition = null)

Prompts the user to enter a list of integers

  • str: The string to print out

  • defaultValue: The list to return if the user hits Enter

  • condition: The condition the resulting list must satisfy

Returns: The user input as a List object

Remarks: The values entered by the user should be separated by a ' '

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 469 9/4/2020
1.0.0-pre 272 9/3/2020

Initial CoreExtensions prerelease. I didn't have time to run all the tests for now, and the doc isn't complete yet...