using System; using System.Collections.Generic; #if !NOT_UNITY3D using UnityEngine; #endif namespace Zenject { [NoReflectionBaking] public class FromBinderNonGeneric : FromBinder { public FromBinderNonGeneric( DiContainer bindContainer, BindInfo bindInfo, BindStatement bindStatement) : base(bindContainer, bindInfo, bindStatement) { } // Shortcut for FromIFactory and also for backwards compatibility public ScopeConcreteIdArgConditionCopyNonLazyBinder FromFactory() where TFactory : IFactory { return FromIFactory(x => x.To().AsCached()); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromIFactory( Action>> factoryBindGenerator) { return FromIFactoryBase(factoryBindGenerator); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromMethod(Func method) { return FromMethodBase(method); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromMethodMultiple(Func> method) { BindingUtil.AssertIsDerivedFromTypes(typeof(TConcrete), AllParentTypes); return FromMethodMultipleBase(method); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResolveGetter(Func method) { return FromResolveGetter(null, method); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResolveGetter(object identifier, Func method) { return FromResolveGetter(identifier, method, InjectSources.Any); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResolveGetter(object identifier, Func method, InjectSources source) { return FromResolveGetterBase(identifier, method, source, false); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResolveAllGetter(Func method) { return FromResolveAllGetter(null, method); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResolveAllGetter(object identifier, Func method) { return FromResolveAllGetter(identifier, method, InjectSources.Any); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResolveAllGetter(object identifier, Func method, InjectSources source) { return FromResolveGetterBase(identifier, method, source, true); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromInstance(object instance) { return FromInstanceBase(instance); } #if !NOT_UNITY3D public ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentsInChildren( Func predicate, bool includeInactive = true) { return FromComponentsInChildren(false, predicate, includeInactive); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentsInChildren( bool excludeSelf = false, Func predicate = null, bool includeInactive = true) { return FromComponentsInChildrenBase(excludeSelf, predicate, includeInactive); } public ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentsInHierarchy( Func predicate = null, bool includeInactive = true) { return FromComponentsInHierarchyBase(predicate, includeInactive); } #endif } }