Extensions.cs 1.0.1

.NET Framework 4.8
There is a newer version of this package available.
See the version list below for details.
Install-Package Extensions.cs -Version 1.0.1
dotnet add package Extensions.cs --version 1.0.1
<PackageReference Include="Extensions.cs" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Extensions.cs --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Extensions.cs, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Extensions.cs as a Cake Addin
#addin nuget:?package=Extensions.cs&version=1.0.1

// Install Extensions.cs as a Cake Tool
#tool nuget:?package=Extensions.cs&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Extensions.dll contains extension methods that enhance existing C# classes thus making life easier for developers.

Product Versions
.NET Framework net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has 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
3.2.500 826 3/5/2021
3.1.500 162 2/26/2021
3.0.500 159 2/19/2021
2.3.500 140 2/12/2021
2.2.480 179 2/5/2021
2.1.480 151 2/1/2021
2.0.1 202 1/22/2021
1.1.28 164 1/15/2021
1.0.1 225 1/8/2021

Elevate()
     Restarts the current process with elevated permissions.
     For example:
     System.Diagnostics.Process.GetCurrentProcess().Elevate(args)
     will restart the current console app in admin mode.

     GetUrlRoot()
     Get the URL root for the given string object containing a URL.
     For example:
     "https://cjvandyk.sharepoint.com/".GetUrlRoot()
     will return
     "https://cjvandyk.sharepoint.com/"
     whereas
     "https://cjvandyk.sharepoint.com/sites/Approval".GetUrlRoot()
     will also return
     "https://cjvandyk.sharepoint.com/".

     IsAlphabetic()
     Validates that the given string object contains all alphabetic
     characters (a-z and A-Z) returning True if it does and False if
     it doesn't.
     For example:
     "abcXYZ".IsAlphabetic()
     will return True whereas
     "abc123".IsAlphabetic()
     will return False.

     IsNumeric()
     Validates that the given string object contains all numeric
     characters (0-9) returning True if it does and False  if it
     doesn't.
     For example:
     "123456".IsNumeric()
     will return True whereas
     "abc123".IsNumeric()
     will return False.

     IsAlphaNumeric()
     Validates that the given string object contains all alphabetic
     and/or numeric characters (a-z and A-Z and 0-9) returning True if it
     does and False  if it doesn't.
     For example:
     "abc123".IsAlphaNumeric()
     will return True whereas
     "abcxyz".IsAlphaNumeric()
     will also return True and
     "123456".IsAlphaNumeric()
     will also return True but
     "abc!@#".IsAlphaNumeric()
     will return False.

     IsChar()
     This method takes a char[] as one of its arguments against which the
     given string object is validated.  If the given string object contains
     only characters found in the char[] it will return True, otherwise it
     will return False.

     IsUrlRoot()
     Check if the given string object containing a URL, is that of the
     URL root only.  Returns True if so, False if not.  For example:
     "https://cjvandyk.sharepoint.com/".IsUrlRootOnly()
     will return True whereas
     "https://cjvandyk.sharepoint.com/sites/Approval".IsUrlRootOnly()
     will return False.

     Lines()
     This method returns the number of lines/sentences in the given string
     object.

     LoremIpsum()
     Poplates the given string with a given number of paragraphs of dummy
     text in the lorem ipsum style e.g.
     "".LoremIpsum(2)
     would yield
     "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
     aliquam arcu rhoncus erat consectetur, quis rutrum augue tincidunt.
     Suspendisse elit ipsum, lobortis lobortis tellus eu, vulputate
     fringilla lorem. Cras molestie nibh sed turpis dapibus sollicitudin
     ut a nulla. Suspendisse blandit suscipit egestas. Nunc et ante mattis
     nulla vehicula rhoncus. Vivamus commodo nunc id ultricies accumsan.
     Mauris vitae ante ut justo venenatis tempus.

     Nunc posuere, nisi eu convallis convallis, quam urna sagittis ipsum,
     et tempor ante libero ac ex. Aenean lacus mi, blandit non eros luctus,
     ultrices consectetur nunc. Vivamus suscipit justo odio, a porta massa
     posuere ac. Aenean varius leo non ipsum porttitor eleifend. Phasellus
     accumsan ultrices massa et finibus. Nunc vestibulum augue ut bibendum
     facilisis. Donec est massa, lobortis quis molestie at, placerat a
     neque. Donec quis bibendum leo. Pellentesque ultricies ac odio id
     pharetra. Nulla enim massa, lacinia nec nunc nec, egestas pulvinar
     odio. Sed pulvinar molestie justo, eu hendrerit nunc blandit eu.
     Suspendisse et sapien quis ipsum scelerisque rutrum."

     ReplaceTokens()
     Takes a given string object and replaces 1 to n tokens in the string
     with replacement tokens as defined in the given Dictionary of strings.

     Words()
     This method returns the number of words used in the given string
     object.
     For example:
     "This is my test".Words()
     will return 4 whereas
     "ThisIsMyTest".Words()
     will return 1.