AvocadoSoftware.com

Software For Hardcore Developers
Welcome to AvocadoSoftware.com Sign in | Join | Help
in Search

Derick Baileys old blog archives - go to derickbailey.com for new contents

Test Post with Code Formatting

How does this code look:

        private PropertyRulesValidationService<TeamMember> GetValidationRules()
        {
            PropertyRulesValidationService<TeamMember> validationService = new PropertyRulesValidationService<TeamMember>();

            RuleValidationDelegate<TeamMember> validateFirstName = new RuleValidationDelegate<TeamMember>
                (teamMember => { return !string.IsNullOrEmpty(teamMember.FirstName); });

            validationService.AddRule("Require First Name", "First Name is required for a Team Member.", validateFirstName, "FirstName");

            RuleValidationDelegate<TeamMember> validateLastName = new RuleValidationDelegate<TeamMember>
                (teamMember => { return !string.IsNullOrEmpty(teamMember.LastName); });

            validationService.AddRule("Require Last Name", "Last Name is required for a Team Member.", validateLastName, "LastName");

            return ValidationService;
        }
.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

Not too shabby...

I'm using Windows Live Writer with the "Insert Code" plugin.

Published Friday, February 01, 2008 6:29 AM by dredge
New Comments to this post are disabled

This Blog

Post Calendar

<February 2008>
SuMoTuWeThFrSa
272829303112
3456789
10111213141516
17181920212223
2425262728291
2345678

Advertisement

News

this is my old blog archives - go to http://derickbailey.com for updates

Syndication

Advertisement

Powered by Community Server, by Telligent Systems