SDMS - Source base update attribute

The vision statement for Solution Development Management System (http://www.CodePlex.com/SDMS) code base updates (Unity, CompositeWPF, etc) follows:

When a new release of base source is available we'll check in all source code, check out the entire project and then unpack the new release overwriting existing code.  Next we'll run all unit test (SDMS will be a TDD solution) to ensure nothing broke and if we don't have to roll-back the update we'll check-in the project updates.

In a perfect world the above would be all that is required but the problem is we may be forced to update our code base...   In preparation for this we have created the following attribute:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace Unity.Interface.Attributes

{

 

    public class SourceBaseUpdateAttribute : Attribute

    {

        private string _developer;

        private string _reason;

        private string _date;

        private int _priority;

 

        public string Date { get { return _date; } }

        public string Reason { get { return _reason; } }

        public string Developer { get { return _Developer; } }

        public int Priority { get { return _priority; } }

 

        /// <summary>

        /// Base source code update, e.g. Unity, CompositeWPF, etc.  Reason for

        /// the update and priority where Priority is on a scale of 1 to 10 with

        /// anything less than 2 being throw away (on base code updates).

        /// UPDATES SHOULD BE KEPT TO A MINIMUM!

        /// </summary>

        /// <param name="Reason"></param>

        /// <param name="Priority"></param>

        public SourceBaseUpdateAttribute(

            string reason,

            int priority,

            string developer,

            string date)

        {

            _reason = reason;

            _priority = priority;

            _developer = developer;

            _date = date;

        }

 

    }

}

An example of it's usage follows:

        [SuppressMessage("Microsoft.Design",

             "CA1062:ValidateArgumentsOfPublicMethods")]

        // FxCop suppression: Lifetime manager is passed to container to dispose.

        [SuppressMessage("Microsoft.Reliability",

             "CA2000:DisposeObjectsBeforeLosingScope")]

 ==>    [SourceBaseUpdate("Implement logging for types being resolved",

              5, "BillKrat", "2008.08.30")]

        public void Configure(IUnityContainer container)

        {

            Guard.ArgumentNotNull(container, "container");

            LifetimeManager lifetimeManager = null;

            if(Lifetime != null)

                lifetimeManager = Lifetime.CreateLifetimeManager();

This requires us to modify our upgrade plan to include running a "SourceBaseUpdate" report to show all changes made to the base as our first step; we can then rollback the specific files (if code compare reveals our changes were the only ones since last release) or copy/paste updates from a change repository (a feature we would have to write) to the affected files.

 


Tags: ,
Categories:


Actions: E-mail | Permalink |  Grammar/Typo/Better way? Please let me know