GithubHelp home page GithubHelp logo

nextends's People

Contributors

bmoriniere avatar bricefrancois avatar gmouron avatar maxmg avatar nfaugout-lucca avatar poltuu avatar rducom avatar sylvainjourdan avatar thibautrappet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lanicon

nextends's Issues

Cleanup *Operand functions

In StringExtensions, all the Operand methods should be removed from NExtends.
We should only keep generic methods about strings.

Date vs DateTime

Je vous propose d'introduire un type Date, qui correspond à une Date sans notion d'heure. Ca n'existe pas en C#, alors que ça existe en SQL (via la précision d'une Date), et que ça existe dans la vie réelle (date de début de contrat n'a pas d'heure, alors que date de création en a une).

Ca permettra de tout de suite savoir si une date en C# est stockée en Date ou en DateTime en SQL, càd si elle a la précision des heures, et ainsi par ex éviter de lui initialiser des heures alors qu'elles seront ignorées et vice-versa.

EDIT : ça existe là par ex : https://github.com/supersonicclay/csharp-date

Ellipsis should be counted for the total number of characters in `Truncate`

Use case : I have a db column with 255 chars length. I therefore ensure that my string fits with doing mystring.truncate(255).

Problem : The addition of ellipsis being true by default, the current implementation truncate to 255 AND THEN add the ellipsis, making it 258 characters. The insert in my db fails.

public static String Truncate(this String text, int maxLength, bool useEllipsis = true, string ellipsis = DEFAULT_ELLIPSIS)

Solution : Taking into account the length of the ellipsis by truncating with (maxLength - sizeof(ellipsis)).

This does not break the api and won't affect negatively existing usage (I would even say would affect positively).

I can take care of the implementation if you agree.

Continuos Integration Tool

Does this project use any Continuous Integration Tool? If so, is it online? (TravisCI, CircleCI), or offline tool (Jenkins, Hudson).

Test & align ToShortDateTimeString

The implementation in Lucca differs from NExtends.

Need to test NExtends implementation comparer to Lucca, and decide if we can safely remove the Lucca version.

Migrate Period, ITimeblock & co from Lucca

If we want to migrate DateTime.GetQuarterRange( ), we need to first migrate Period, ITimeblock & associated classes.

Sylvain & his team have started such project during the last technical meeting, but I don't see any such branch

string.isEmail different from Lucca

This extension is implemented differently in Lucca.

We should take the best implementation, take some tests from Lucca to ensure no breaking change.

Then release a new version of NExtends and uses it in Lucca

Virer la référence à Json.Net

NExtends n'a que 2 dépendances :

  • DataAnnotations
  • Json.Net

La première est utilisé pour gérer les attributs de validation et les attributs au-dessus des Enums, donc on doit la garder.

La seconde en revanche n'est plus utilisée que dans des tests, donc on peut la virer.

Je propose de réduire au max le nb de dépendances de NExtends, car plus il a de dépendances, plus les projets qui dépendent de NExtends (Rdd, le monolithe) doivent eux-aussi changer de version de ces dépendances quand NExtends passent sur des versions supérieures.

Par ex cette PR anodine #62 a des répercutions galères sur le monolithe.

Delete GetRealTypeName()

This method is Lucca-legacy-specific ! I copied that method inside Lucca project, so we can safely remove it from NExtends

Lenteur de StringExtensions.Replace()

L'extension StringExtensions.Replace(this string originalString, string oldValue, string newValue, StringComparison comparisonType) est très lente lorsque la chaine à remplacer a un nombre important d'occurrences.

Par exemple :

string stringToReplace = "hello";
string source = String.Join(" blabla ", Enumerable.Range(0, 10000).Select(i => stringToReplace));

var sw = new Stopwatch();

sw.Start();	
source.Replace("whatever", "", StringComparison.InvariantCultureIgnoreCase);
sw.ElapsedMilliseconds.Dump(); // 0 occurrence => ~ 1 ms

sw.Restart();		
source.Replace(stringToReplace, "", StringComparison.InvariantCultureIgnoreCase);
sw.ElapsedMilliseconds.Dump(); // 10 000 occurrences => ~ 2 700 ms

sw.Restart();		
source.Replace(stringToReplace, "");
sw.ElapsedMilliseconds.Dump(); // fonction native avec 10 000 occurrences => ~ 0 ms

TimeSpanExtensions.ToHours( )

If we want to migrate this method from Lucca, we need to handle the way Lucca uses RESX to translate Domain_Generics.HOURS_INITIAL

Cleanup RequiredIfAttribute

Some minor changes on RequiredIfAttribute.cs :

  • proprtyvalue => propertyValue
  • return base.IsValid(...)
  • remove TODO

Generate docs for NExtends' API

Currently, the only way to know everything present in NExtends is to look at the code.
It would be nice to have a nice, automatically generated doc available

Regex usage

In String.extensions.cs, RemoveSpecialCaracters can be optimized.
General all the regex-based methods could be improved

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.