CLAP v3

CLAP is a magical .NET Command-Line Automatic Parser. It has plenty of features and is extremely easy to use. If you are new to CLAP – please see the short intro here.

CLAP has a new version and it brings some more cool features to the tons of already-existing ones.

New in this version, since v2:

  • Expression Validation
  • Support for Custom Types
  • File-Input
  • Interception
  • Multi-Parsers

Everything is fully documented in CLAP’s official web site:

http://adrianaisemberg.github.com/CLAP

Continue reading

Posted in .NET, CLAP, Command-Line | Tagged , | Leave a comment

CLAP has a new home with full documentation

Here:

http://adrianaisemberg.github.com/CLAP

Posted in CLAP, Command-Line | Tagged , | Leave a comment

Easy Windows-Phone 7 Navigation

Page navigation in WP7 is crappy:

  1. You must pass an instance of System.Uri which must be of UriKind.Relative
  2. You cannot pass any object but only strings. If you need to pass some object, you usually pass an id and find the object in the target page by the id, assuming you have access to the model, which is usually a public property of some static class.

Here is a sample navigation:

In the source page:

private void NavigateToSomePage()
{
    NavigationService.Navigate(
        new Uri("/SomePage.xaml?data_id=" + data.ID, UriKind.Relative));
}

In the target page:

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    base.OnNavigatedTo(e);

    var data =
        GetTheDataByTheID(NavigationContext.QueryString["data_id"]);

    // continue
}

A kick-ass solution for kick-ass coders

First, a sample navigation using the solution:

In the source page:

private void NavigateToSomePage()
{
    NavigationService.Navigate<SomePage>(data);
}

Continue reading

Posted in .NET, WP7 | Tagged , , | Leave a comment