Click here to Skip to main content
15,884,176 members
Articles / Programming Languages / XSLT

Customize Applications with XML Fragments: Part 2

Rate me:
Please Sign up or sign in to vote.
3.00/5 (2 votes)
19 Jun 20073 min read 21.9K   111   9  
An advanced discussion of customizing applications with XML fragments
using System;

namespace Bulasoft.Common.Elements
{
    public class OwnedElement<Owner> : Element where Owner : Element
    {
        protected override void ValidateNewContainer(IElement container) {
            if ((container != null) && !(container is Owner))
                throw new Exception(string.Format("Container %s instead of %s expected", typeof(Owner).Name, container.GetType().Name));
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions