scott-ainsworth / ainsworth.dotnet-extensions Goto Github PK
View Code? Open in Web Editor NEWVarious/random .NET extension methods
License: MIT License
Various/random .NET extension methods
License: MIT License
There are many useful static methods in the .NET String class. For example, String.IsNullOrEmpty
. While most String methods are used in object-oriented form (e.g., value.Substring
]), the half-dozen or so that are not seem out of place and somewhat awkward.
Create extension methods and unit test for the following String static methods:
Compare
CompareOrdinal
Concat
(does this make sense?)Format
Join
(maybe select variants)IsNullOrEmpty
IsNullOrWhiteSpace
There are several typos in ConversionExtensionsTests.cs
:
There are many useful static methods in the .NET Char class. For example, String.IsLetter
.
Create extension methods and unit test for the following String static methods:
ConvertFromUtf32
ConvertToUtf32
GetNumericValue
GetUnicodeCategory
IsAscii
IsAsciiDigit
IsAsciiHexDigit
IsAsciiHexDigitLower
IsAsciiHexDigitUpper
IsAsciiLetter
IsAsciiLetterLower
IsAsciiLetterOrDigit
IsAsciiLetterUpper
IsBetween
IsControl
IsDigit
IsHighSurrogate
IsLetter
IsLetterOrDigit
IsLower
IsLowSurrogate
IsNumber
IsPunctuation
IsSeparator
IsSurrogate
IsSurrogatePair
IsSymbol
IsUpper
IsWhiteSpace
Parse
ToLower
ToLowerInvariant
ToUpper
ToUpperInvariant
TryParse
The List<T>
methods that add items to lists do not allow chaining because they return void
instead of the list.
Implement extension methods that return the list for
List<t>.Add()
List<t>.AddRange()
List<t>.Clear()
List<t>.Insert()
List<t>.InsertRange()
List<t>.RemoveAt()
is specifically excluded to avoid methods with side effects.List<t>.RemoveRange()
is specifically excluded to avoid methods with side effects.List<t>.Reverse()
is specifically excluded to avoid methods with side effects.List<t>.Sort()
is specifically excluded to avoid methods with side effects.List<t>.TrimExcess()
is specifically excluded to avoid methods with side effects.List<t>.CopyTo()
is specifically excluded to avoid methods with side effects.List<t>.ForEach()
is specifically excluded to avoid methods with side effects.There are no unit tests for StreamExtensions
.
StreamExtensions.Readlines()
.The string.Format()
unit tests use invalid composite format strings. In particular, several contain old-style percent (%) format specifications.
The ConversionExtension
class contains a combination extension methods for existing static methods (e.g., Int32.ParseInt()
) and casts (e.g., ToLong()
). This organization does not entirely make sense.
CastExtensions
.CastExtensionsTests
.Test coverage is not computed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.