Enter your email address:

Delivered by FeedBurner

Twitter Updates

    follow me on Twitter

    « Nerd Crib | Main | Living with your Microsoft VMs "in the cloud" on a Mac »

    December 01, 2009

    TrackBack

    TrackBack URL for this entry:
    http://www.typepad.com/services/trackback/6a00d83420db0253ef0120a6f31dae970b

    Listed below are links to weblogs that reference CodeRush Template for CSLA Properties [Updated]:

    Comments

    Mark Miller

    Jamie,

    A few suggestions:

    1. Try using the "TypeLink" TextCommand instead of the "Link" TextCommand to support the "?" character in links.

    2. You can be even more efficient if you combine the field generation with the property generation into a single template. You can chain from one template to another by right-clicking the template editor and selecting "Insert Alias...". You can use this to call your field creation template from your property template.

    3. The "rp" name conflicts with the "r?Type?" templates used to create read-only properties (e.g., rp creates a read-only property returning a point by default). This suggestion might be considered a bit crazy, but you might rename this template to k?Type? ("k" isn't used as a template verb yet, and the "k" appears in both Rocky's first and last name, so there is some mnemonic value there). Then inside your template when you need the type specified by the template, you can use "«?Get(Type)»". Then "ki" would give you a CSLA property of type int, "ks" would give you a CSLA property of type string, etc. Super efficient, and all you're left with is typing in the name of the property.

    4. When you need to remove a setter or a getter, the most efficient way is to place the caret on the "set" or "get" keyword and press the Cut key (e.g., Ctrl+X or Shift+Delete). This will cut the setter or getter to the clipboard, so if you don't want to lose what's on the clipboard the second most efficent way is to place the caret on the "set" or "get" keyword and press the Selection Increase key (Ctrl+W or Num+), followed by the Delete key.

    Verify your Comment

    Previewing your Comment

    This is only a preview. Your comment has not yet been posted.

    Working...
    Your comment could not be posted. Error type:
    Your comment has been posted. Post another comment

    The letters and numbers you entered did not match the image. Please try again.

    As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

    Having trouble reading this image? View an alternate.

    Working...

    Post a comment