Posts for category 'Software'

.Net Configuration Section Documentation Generator

Today I'm releasing another small tool that I created for personal use that I believe others might find of use. The tool is the .Net Configuration Section Documentation Generator (more proof that I should not be put in charge of naming things), which does what it says on the tin: it generates documentation for configuration sections defined using .Net's ConfigurationSection class.

Basically, it can generate an XSD schema from a ConfigurationSection, to which you can then add annotations to document the elements and attributes of the section, and then generate an HTML documentation file from that schema. The tool can be used with Microsoft .Net and Mono.

As an example, check out the schema for the documentation generator's own configuration section as generated by the documentation generator, and with added annotations. And finally, the documentation file generated from the annotated schema. This is only a very trivial configuration section, but it gives you an idea of what the output of the documentation generator looks like.

More information and downloads here.

Categories: Software, Programming
Posted on: 2013-06-08 10:42 UTC. Show comments (3)

Ookii.CommandLine 2.2

Yes, I realise this blog is all but dead. However, I will soon finally complete my Ph.D. at the University of Tokyo (so, yay me!), and as a result I can now finally release a few things that had been put on hold while I was writing my Ph.D. thesis. In addition, I will probably release a few projects related to my research that may hopefully be of interest to some people.

First up is a small update to Ookii.CommandLine. This update adds command line argument aliases, some updates for usage help generation, and code snippets to help with creating argument classes.

In addition, I used NuGet to create a symbols package and published it on SymbolSource, which you should apparently be able to use as a symbol server in Visual Studio without manually downloading the symbols.

Get the release from CodePlex or using NuGet.

Categories: Software, Programming
Posted on: 2013-02-06 12:11 UTC. Show comments (2)

FormatC 2.0 (syntax highlighting) now available

With the release of .Net 4.0 I have updated the FormatC syntax highlighter (used for all code samples on ookii.org) to support new keywords introduced in Visual Basic 10.0 and C# 4.0.

That's not the only update, however. FormatC 2.0 also has the ability to escape contextual keywords (previously, it would treat them as keywords regardless of the context), type name highlighting support for Visual Basic and improved XML literal support in Visual Basic.

PowerShell support is also improved; FormatC will try to use the parser included with PowerShell 2.0 to parse the code. Unfortunately, this web server does not have PowerShell 2.0 installed, so the online version of the highlighter will still use regular expressions to highlight PowerShell code.

If you have any feedback about FormatC, please leave it as a comment on this blog post.

Sample C# code highlighted using FormatC:

public static int SumAuthorPrices(IEnumerable<Book> books, string author)
{
    if( books == null )
        throw new ArgumentNullException("books");

    return (from b in books
            where b.Author == author
            select b.Price).Sum();
}

Sample Visual Basic code highlighted using FormatC:

Public Shared Function ConvertToXml(ByVal books As IEnumerable(Of Book)) As XDocument
    If books Is Nothing Then
        Throw New ArgumentNullException("books")
    End If

    Return <?xml version="1.0"?>
           <Books>
               <%= From b In Books
                   Select <Book Author=<%= b.Author %> Price=<%= b.Price %>>
                              <%= b.Title %>
                          </Book> %>
           </Books>
End Function

Sample XML code highlighted using FormatC:

<?xml version="1.0"?>
<Books>
  <Book Author="Peter F. Hamilton" Price="18.99">
    The Evolutionary Void
  </Book>
</Books>

Sample T-SQL code highlighted using FormatC:

SELECT title, author, publisherName FROM Books b
  INNER JOIN Publisher p
  ON b.publisherId = p.id
WHERE b.price >= 10

Sample PowerShell code highlighted using FormatC (this used the parser-based method, not regular expressions):

foreach ($file in Get-ChildItem)
{
    if ($file.Length -gt 100kb) 
    {
        Write-Host -ForegroundColor Green $file
        Write-Host $file.Length
        Write-Host $file.LastAccessTime
    }
}

Categories: Software, Programming
Posted on: 2010-08-07 05:23 UTC. Show comments (1)

Windows 7 ISO Verifier

Windows 7 is about to hit RTM, and many of you might want to verify that the ISO image you downloaded hasn't been tampered with or was damaged as the result of some error in the download process. Of course you can use existing checksum tools and compare the result to published values, but it can be a bit of a hassle.

At the request of Long Zheng I created a small application that makes this process easier. Simply drag and drop your ISO file onto the application (or start the application and browse to the ISO file) and it will verify the EXE and tell you which build you have from a list of known builds. It downloads this list from the web automatically, so you don't need to re-download the application after Windows 7 RTM is released.

The Windows 7 ISO Verifier can be downloaded from Long's website.

Categories: Software, General computing
Posted on: 2009-07-06 08:50 UTC. Show comments (5)

New download: Ookii.Dialogs

I have made available a new download: Ookii.Dialogs.

Ookii.Dialogs is a class library that provides a number of common dialogs for use in .Net applications. The dialogs provided are the task dialog, progress dialog, credential dialog, input dialog and Vista-style common file dialogs.

The download contains two class libraries, one for Windows Forms and one for Windows Presentation Foundation (WPF). The contents are nearly identical; only the input dialog is not available for WPF. Some utility classes are provided for Windows Forms; these are not available for WPF either.

Most of these dialogs are wrappers around Windows API functionality. The TaskDialog class wraps the task dialog API provided in Windows Vista and later. The ProgressDialog class wraps the IProgressDialog API available since Windows 2000. The CredentialDialog class wraps the CredUI API introduced in Windows XP, and the VistaOpenFileDialog, VistaSaveFileDialog and VistaFolderBrowserDialog classes wrap the IFileDialog API introduced in Windows Vista. Only the InputDialog is not a wrapper; this is a custom dialog that performs the same functionality as the old Visual Basic InputBox function. Visit the link above for more details on each dialog.

Each class has been designed to be not merely a wrapper around their respective native API, but to provide a programming interface that is natural to .Net developers, with full support for the component designer. The complete source code of the class libraries, as well as documentation and a sample application are provided.

The classes aim to give the best experience possible on each OS, where applicable. In the case of the CredentialDialog class, this means that the new Vista-style dialog is automatically used on operating systems that support it (Vista and newer). The Vista-style file dialog classes will automatically fall back to the old style dialogs when using Windows XP. This is also true of the VistaFolderBrowserDialog class for WPF, even though WPF itself doesn't provide a folder browser dialog; the VistaFolderBrowserDialog class is a full folder browser dialog implementation for WPF supporting XP and newer.

This library replaces the Ookii.VistaDialogs library, which contained only the Vista-style file dialogs and didn't offer any support for WPF.

This library is a collection of classes that I have developed for personal use over the years. Because of the difference in age of some of the code, and the many modifications made over time, there may be some inconsistencies.

Let me know what you think of it, if you use it.

Categories: Software, General computing, Programming
Posted on: 2009-01-28 11:54 UTC. Show comments (52)

Latest posts

Categories

Archive

Syndication

RSS Subscribe

;