Ejemplo n.º 1
0
        public static void TaskSetImplementations(LineBase bl)
        {
            EntityBase eb = bl as EntityBase;

            if (eb != null)
            {
                PropertyRoute route = bl.PropertyRoute;

                if (bl.Type.IsMList())
                {
                    route = route.Add("Item");
                }

                if (route.Type.CleanType().IsIEntity())
                {
                    IImplementationsFinder finder = typeof(ModelEntity).IsAssignableFrom(route.RootType) ?
                                                    (IImplementationsFinder)Navigator.EntitySettings(route.RootType) : Schema.Current;

                    eb.Implementations = finder.FindImplementations(route);

                    if (eb.Implementations.Value.IsByAll)
                    {
                        EntityLine el = eb as EntityLine;
                        if (el != null)
                        {
                            el.Autocomplete = false;
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public ServicesGenerator(ITypeIsClassValidator typeIsClassValidator, IImplementationsFinder implementationsFinder, IServiceGenerator serviceGenerator)
 {
     TypeIsClassValidator  = typeIsClassValidator;
     ImplementationsFinder = implementationsFinder;
     ServiceGenerator      = serviceGenerator;
 }
 public ServiceCollectionPopulator(ITypeCache typeCache, IImplementationsFinder implementationsFinder, IServiceTypeNameFilter serviceTypeNameFilter)
 {
     _typeCache             = typeCache;
     _implementationsFinder = implementationsFinder;
     _serviceTypeNameFilter = serviceTypeNameFilter;
 }