Aqueduct.SitecoreLib.DataAccess.StructureMap.MapTemplatePathScanner.Process C# (CSharp) Метод

Process() публичный Метод

public Process ( Type type, Registry registry ) : void
type System.Type
registry Registry
Результат void
	    public void Process(Type type, Registry registry)
	    {
            // ignore interfaces and abstract classes
            if (type.IsConcrete() == false)
                return;

            Type baseType = type.BaseType;

            // IF type has basetype AND basetype is generic AND basetype is Map<> THEN
            if (baseType != null && baseType.IsGenericType && baseType.GetGenericTypeDefinition() == m_mapType)
            {
                var instance = Activator.CreateInstance(type);
                string instanceName = instance.GetType().GetProperty("TemplatePath").GetValue(instance, null).ToString();
                registry.AddType(typeof(IMap), type, instanceName.ToLower());
            }
	    }
MapTemplatePathScanner