FullCoder.com - Passion for Code
Login   Search
Skip Navigation Links
SystemExtension
Regular Expressions
About FullCoder
Tester Page
Doc and Source
Html2DataSet
Scroll up
Scroll down
About Author
Contact FullCoder
Guest Book
Scroll up
Scroll down


Skip Navigation Links>SystemExtension

SystemExtension Project

The first related project is System.Extension. This is an extension of the classes included in Frawework 2.0. It will contains lot of common used, open source classes and methods. Their implementations are normally inherited from the originals.

I'm working in the very first version implementing Default Format, a way to change the behavior of ToString(), adding an array of format rules. This will give you the chance to control how variables are displayed. For me, it is very usefull rendering GridViews.

Some rules implemented are:

  • MaxLenghtRule(int MaxLenght)
  • NullRule(string default)
  • NumericRule(enum StandardNumericFormat, int? decimals)
  • ToLowerRule()
  • ToUpperRule()
  • TrimRule()

For example:

StringExt text = new StringExt("   long text    ");
text.DefaultFormat = new System.Format.IFormatRule[] { new System.Format.NullRule("  null  "), new System.Format.TrimRule(), new MaxLengthRule(10, true), new ToUpperRule() };

The result of text.ToString() is: "long te..."

I will be checking projects like NetExtension, ApplicationBlocks, BlogEngine and PublicDomain to adopt common used methods. Your code snippets are welcome!!!
FullCoder.com - Passion for Code