Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Sprague 11 posts 31 karma points
    Aug 15, 2012 @ 14:25
    Chris Sprague
    0

    4.7.2 Breaking Change for Razor Macros

    4.7.2 apparently introduces a thing called DynamicBackingItem, which is the new implementation behind a few things such as .ChildrenAsList, defined as:

            public List<DynamicBackingItem> ChildrenAsList
            {
                get { if (n == nullreturn nullreturn n.ChildrenAsList; }
            }

    This will break any code which doesn't use implicit typing or which departs from DLR, for example:

    IEnumerable<DynamicNode> Children = Model.ChildrenAsList;
    

    The reasons for doing this are many (and, quite frankly, not the concern of the library developer.) I'm frustrated at the amount of breaking changes in Razor which seem to be un-documented. I haven't searched around the forums for this, but quite frankly shouldn't have to. A minor release should not change interfaces in a way which requires developers to devote time adapting a site for the upgrade, and if they do, should be done for good reason and indicated up-front.

     

Please Sign in or register to post replies

Write your reply to:

Draft