Click here to Skip to main content
15,892,005 members
Articles / Desktop Programming / WPF

Catel - Part 1 of n: Data handling the way it should

Rate me:
Please Sign up or sign in to vote.
4.64/5 (21 votes)
25 Nov 2010CPOL20 min read 71.3K   923   56  
Catel is not just another Extension Methods library, nor just an MVVM-framework, but it is a combination of basic data handling, useful controls, and an MVVM-framework.
using System;
using System.Runtime.Serialization;
using Catel.Articles.Base.Data.Attributes;
using Catel.Data;
using Catel.Runtime.Serialization;

namespace Catel.Articles._01___Data_handling.Models
{
    /// <summary>
    /// RenamedObject Data object class which fully supports serialization, property changed notifications,
    /// backwards compatibility and error checking.
    /// </summary>
    [Example("Renamed object", "Shows how to allow object renaming without breaking serialization",
        SourceFileName = "/Models/RenamedObject.cs")]
    [Serializable]
    [RedirectType("Catel.Articles", "PreviousTypeName")]
    public class RenamedObject : DataObjectBase<RenamedObject>
    {
        #region Variables
        #endregion

        #region Constructor & destructor
        /// <summary>
        /// Initializes a new object from scratch.
        /// </summary>
        public RenamedObject() { }

        /// <summary>
        /// Initializes a new object based on <see cref="SerializationInfo"/>.
        /// </summary>
        /// <param name="info"><see cref="SerializationInfo"/> that contains the information.</param>
        /// <param name="context"><see cref="StreamingContext"/>.</param>
        protected RenamedObject(SerializationInfo info, StreamingContext context)
            : base(info, context) { }
        #endregion
    }
}

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
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions