August 2003 - Posts

We (That's me and Christian Nordbakk) have released a new build of AylarSolutions.Highlight. The download URL is the same as for the previous release, but for those who don't feel like digging through old posts for information, you can get it here

The biggest change you will encounter, is the fact that the default location for the configuration file is now in the running application's \bin folder, and the config file has changed name from Languages.xml to Definitions.xml. This name change was done to make sure the component is as generic as possible.
Another constructor for the Highlighter class has been added. This new constructor takes a XmlDocument as a parameter, which means you can eg. load the configuration from a MS SQL server into an XmlDocument object and pass it into the constructor.
The last major change is that we changed the PerformCodeHighlight method to Highlight, and that we removed the OutputType parameter from the method. This parameter is now a class level property of the Highlighter class

Enjoy!

The design phase for some of the new features you can expect to see in AylarSolutions.Highlight 1.1 is well under way.
Perhaps one of the most exciting new features is built-in support for inline code. That means if you highlight an ASP.NET page, the component will highlight any code inside 'SCRIPT' blocks.
Because we add support for this, you can of course also expect to see support for markup languages. This will be available through a new pattern type, which will most likely end up being called 'Markup' (More detailed info to come)

After getting a request for a sample of my component in use, I made this very simple demo:
http://aspalliance.com/aylar/highlight/tester.aspx

If you want the source for this, it can be found here:
http://aspalliance.com/aylar/highlight/tester.aspx.txt
(Note: most browsers tries to parse this as actual xml, so do a 'View Source' or similar to get the actual code.)

I have finally finished it! The first public release of AylarSolutions.Highlight (formerly known as CodeHighlight) is actually available. Go here to get it:

http://aspalliance.com/aylar/highlight/aylarsolutions.highlight-1.0.zip

Currently there is one known bug and that is with keywords that contains a space, i.e. VB.net's 'End Class', which by definition isn't a word, but rather a collection of words. I have solved this by adding an 'End' keyword to the VB.NET language definition.

Now, you are perhaps asking yourself, what is this AylarSolutions.Highlight thing Thomas is talking about, and what can it do for me?
Well, AylarSolutions.Highlight is a .NET component written in C#, that allows you to very easily get HTML marked-up code. All you need to do is to pass your code source through Highlighter.PerformCodeHighlight method and au voila, it spits out a marked-up version.

Currently the language definition file (Languages.xml), contains definitions for C#, VB.NET, J# and T-SQL. You can easily extend this small definition collection, either by altering the XML file by hand, or by taking advantage of the Configurator class that is shipped with the component (Note: the Configurator class is currently not working 100% due to some changes to the structure of the configuration file. This will be fixed in a couple of days).

For the future, I have planned to add support to generate XML and RTF marked-up code, as well as release a web and windows configuration application to allow you to more easily configure the component's configuration file.

Please give me some feedback on the control, either by adding comments to this post or emailing me at  aylar AT aspalliance DOT com.

Update: I had forgotten to zip down the Languages.xml file, this is now fixed. This file should either be placed in the root of the application where you are running the component from, or specify its location using a web.config file or the ConfigurationFile property.

Ok, I've finally gotten around to finishing up a few bits and pieces in AylarSolutions.Highlight (formerly known as CodeHighlight), that I felt needed to be in place before the first public release.
I will hopefully release the sourcecode in a very few hours! So stayed tuned ;)

I am *so* incredibly tired now! Been working more or less non stop for 12 hours today, trying to finish the last bits and pieces for the grand opening of TechEd 2003 Australia tomorrow/today.
This is gonna be one *incredible* event! Lots of really talented speakers, cool topics, awesome goodie bags/backpacks and more!

Anyone that's attending and would like to meet up with me, please drop me a few lines at aylar@aspalliance.com

More Posts