private static void BuildInternal(IBindingDependencyBuilder dependencyBuilder, IReadOnlyList <Assembly> assemblies) { var definations = FindDependenciesType(assemblies); foreach (var defination in definations.OrderBy(x => x.TypePriority)) { if (!Container.Contains(defination.Type)) { var func = dependencyBuilder.GetInstance <IHttpController>(defination.Type); Container.Bind(defination.Type).InTransientScope().ToMethod(func); } } }
private static void BuildInternal(IBindingDependencyBuilder dependencyBuilder, IEnumerable <Assembly> assemblies) { foreach (var type in from assembly in assemblies from type in assembly.GetExportableLoadableTypes() where IsViewModel(type) where !Container.Contains(type) select type) { dependencyBuilder.Bind(typeof(ViewModelBase), type, type.Name, LifetimeType.Singleton); } }