root/UnityWeb/UnityWeb/Modules/Common/PresenterScanner.cs

User picture

Author: marisic.net

Revision: 112 («Previous)


File Size: 585 Bytes

(February 02, 2009 07:47 UTC) Over 3 years ago


  

 
Show/hide line numbers
#region Using Statements

using System;
using Modules.Common.View;
using StructureMap;
using StructureMap.Graph;

#endregion

namespace Modules.Common
{
    public class PresenterScanner : ITypeScanner
    {
        #region ITypeScanner Members

        public void Process(Type type, PluginGraph graph)
        {
            Type interfaceType = type.FindInterfaceThatCloses(typeof (IPresenter<>));
            if (interfaceType != null)
            {
                graph.AddType(interfaceType, type);
            }
        }

        #endregion
    }
}