Altinet
  • Home
  • Blog
  • Contact





Debugging code generation and custom metadata provider for RIA services

On 20 Jan, 2011
Uncategorized
By : Bruno Samardzic
No Comments
Views : 3385

I wasn’t very happy when i saw the default way RIA services handles validation. It’s either having attributes directly on your classes or it’s those clumsy metadata inner classes which have the same property names as the parent ones. I like the fluent approach, and that approach is explained here:

RIA Services Fluent Metadata API

I even used it and modified it in my example which i presented in the following codeproject:

Setting up Silverlight, RIA Services, NHibernate and Validators

It’s a good example of the same thing.
Anyway, i did some modifications to that code and i didn’t know how to test the thing, if it was working ok or not. It ended up being super simple, but i had to go through a lot of Reflector stuff to get to the core. The basic debugging would look like this:


        [TestMethod]
        public void TestMethod1()
        {
            var description =  DomainServiceDescription.GetDescription(typeof(AltiFinService));
        }

This is going to step you through your chained DescriptionProvider and you can see what’s actually happening while code generating. I did have 1 problem though which this kind of approach didn’t help much, but it was more or less assembly version issue.
HTH!



Previous Post Next Post 

About The Author

Bruno Samardzic


Number of Posts : 45
All Posts by : Bruno Samardzic

Leave a Comment

Click here to cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>





Recent Posts

  • Angular vs React: round 2
  • Why programming is hard
  • Orchard Workflows, undocumented gem
  • The React Redux
  • React.js invoicing CRUD application, part 2: Description

Recent Comments

  • Angshuman on Animation for starred grid rows and columns using xaml
  • Advanced Excel Training in Lucknow on Angular vs React: round 2
  • Reginald Sophomore on My example of Angularjs directive
  • Slobodan on Angular and Breeze – story so far.
  • Bruno Samardzic on Reaction to Ember-forged Durandal Angularly Knocking out my Backbone, or my JS MVC framework research conclusion.

Contact

Altinet d.o.o.

OIB: 97429091194

Čulinečka cesta 146, Zagreb

Tel: +385 (1) 2946 819

Mob: +385 (98) 210 756

IBAN: HR4323400091110406470

Latest tweets