Click here to Skip to main content
15,884,388 members
Articles / Web Development / ASP.NET

Signum Framework Principles

Rate me:
Please Sign up or sign in to vote.
4.74/5 (27 votes)
25 Jul 2011CPOL18 min read 98.8K   1.1K   86  
Explains the philosophy behind Signum Framework, an ORM with a full LINQ Provider that encourages an entities-first approach.
//---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation.  All rights reserved.
//
//---------------------------------------------------------------------------
using System;
using System.Windows;

namespace Signum.Windows.DateUtils
{
    /// <summary>
    /// The InvalidEntry event args, occurs when the datepicker can't parse user input string correctly
    /// </summary>
    public class InvalidEntryEventArgs : RoutedEventArgs
    {
        /// <summary>
        /// Constructor
        /// </summary>
        public InvalidEntryEventArgs(RoutedEvent id, string entry)
            : base()
        {
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }

            RoutedEvent = id;
            _entry = entry;
        }

        /// <summary>
        /// The input string
        /// </summary>
        public string Entry
        {
            get { return _entry; }
        }

        /// <summary>
        /// This method is used to perform the proper type casting in order to
        /// call the type-safe InvalidEntryEventHandler delegate for the InvalidEntry event.
        /// </summary>
        /// <param name="genericHandler">The handler to invoke.</param>
        /// <param name="genericTarget">The current object along the event's route.</param>
        protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
        {
            InvalidEntryEventHandler handler = (InvalidEntryEventHandler)genericHandler;
            handler(genericTarget, this);
        }

        private string _entry;
    }

    /// <summary>
    /// The delegate type for handling the InvalidEntry event
    /// </summary>
    public delegate void InvalidEntryEventHandler(object sender, InvalidEntryEventArgs e);

}

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 Code Project Open License (CPOL)


Written By
Software Developer (Senior) Signum Software
Spain Spain
I'm Computer Scientist, one of the founders of Signum Software, and the lead developer behind Signum Framework.

www.signumframework.com

I love programming in C#, Linq, Compilers, Algorithms, Functional Programming, Computer Graphics, Maths...

Comments and Discussions