Click here to Skip to main content
15,896,527 members
Articles / Web Development / HTML

Transformalizing NorthWind

Rate me:
Please Sign up or sign in to vote.
4.95/5 (29 votes)
24 Jul 2014GPL37 min read 57.8K   341   53  
Combining de-normalization, transformation, replication, and awesome-ness.
#region License
// /*
// See license included in this library folder.
// */
#endregion
#region Using Directives

using System;
using System.Collections.Generic;
using Transformalize.Libs.Ninject.Planning.Directives;

#endregion

namespace Transformalize.Libs.Ninject.Planning
{
    /// <summary>
    ///     Describes the means by which a type should be activated.
    /// </summary>
    public interface IPlan
    {
        /// <summary>
        ///     Gets the type that the plan describes.
        /// </summary>
        Type Type { get; }

        /// <summary>
        ///     Adds the specified directive to the plan.
        /// </summary>
        /// <param name="directive">The directive.</param>
        void Add(IDirective directive);

        /// <summary>
        ///     Determines whether the plan contains one or more directives of the specified type.
        /// </summary>
        /// <typeparam name="TDirective">The type of directive.</typeparam>
        /// <returns>
        ///     <c>True</c> if the plan has one or more directives of the type; otherwise, <c>false</c>.
        /// </returns>
        bool Has<TDirective>() where TDirective : IDirective;

        /// <summary>
        ///     Gets the first directive of the specified type from the plan.
        /// </summary>
        /// <typeparam name="TDirective">The type of directive.</typeparam>
        /// <returns>
        ///     The first directive, or <see langword="null" /> if no matching directives exist.
        /// </returns>
        TDirective GetOne<TDirective>() where TDirective : IDirective;

        /// <summary>
        ///     Gets all directives of the specified type that exist in the plan.
        /// </summary>
        /// <typeparam name="TDirective">The type of directive.</typeparam>
        /// <returns>A series of directives of the specified type.</returns>
        IEnumerable<TDirective> GetAll<TDirective>() where TDirective : IDirective;
    }
}

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.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions