From: <jer...@us...> - 2009-12-26 18:26:14
|
Revision: 299 http://structuremap.svn.sourceforge.net/structuremap/?rev=299&view=rev Author: jeremydmiller Date: 2009-12-26 18:26:08 +0000 (Sat, 26 Dec 2009) Log Message: ----------- eliminating an old file Removed Paths: ------------- trunk/Source/StructureMap/Graph/IHeavyweightTypeScanner.cs Deleted: trunk/Source/StructureMap/Graph/IHeavyweightTypeScanner.cs =================================================================== --- trunk/Source/StructureMap/Graph/IHeavyweightTypeScanner.cs 2009-12-26 18:18:44 UTC (rev 298) +++ trunk/Source/StructureMap/Graph/IHeavyweightTypeScanner.cs 2009-12-26 18:26:08 UTC (rev 299) @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using StructureMap.TypeRules; -using StructureMap.Util; - -namespace StructureMap.Graph -{ - [Obsolete] - public interface IHeavyweightTypeScanner - { - void Process(PluginGraph graph, IEnumerable<TypeMap> typeMaps); - } - - - public class TypeMap - { - internal TypeMap(Type pluginType, IList<Type> concreteTypes) - { - PluginType = pluginType; - ConcreteTypes = new ReadOnlyCollection<Type>(concreteTypes); - } - - public IList<Type> ConcreteTypes { get; private set; } - public Type PluginType { get; private set; } - } - - internal class TypeMapBuilder : ITypeScanner, IDisposable - { - private readonly Cache<Type, List<Type>> _implementations = new Cache<Type, List<Type>>(t => new List<Type>()); - - public void Dispose() - { - //throw new NotImplementedException(); - //_implementations.Clear(); - } - - public void Process(Type type, PluginGraph graph) - { - if (!type.IsConcrete() || !Constructor.HasConstructors(type)) return; - IEnumerable<Type> pluginTypes = FindPluginTypes(type); - - foreach (Type pluginType in pluginTypes) - { - _implementations[pluginType].Add(type); - } - } - - private IEnumerable<Type> FindPluginTypes(Type type) - { - return new Type[0]; - // lets not worry about abstract base classes for now - return type.GetInterfaces().Where(t => t.IsPublic); - } - - public IEnumerable<TypeMap> GetTypeMaps() - { - return new TypeMap[0]; - throw new NotImplementedException(); - //return _implementations.Contents().Select(pair => new TypeMap(pair.Key, pair.Value)); - } - } -} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |