public BindingConditionSetter ToSingle(string identifier) { if (_contractType.DerivesFrom(typeof(MonoBehaviour))) { throw new ZenjectBindException( "Should not use ToSingle for Monobehaviours (when binding type '{0}'), you probably want either ToLookup or ToSingleFromPrefab or ToSingleGameObject" .Fmt(_contractType.Name())); } return(ToProvider(_singletonMap.CreateProviderFromType(identifier, _contractType))); }
public BindingConditionSetter ToSingle(string concreteIdentifier) { #if !ZEN_NOT_UNITY3D if (ContractType.DerivesFrom(typeof(Component))) { throw new ZenjectBindException( "Should not use ToSingle for Monobehaviours (when binding type '{0}'), you probably want either ToLookup or ToSinglePrefab or ToSingleGameObject" .Fmt(ContractType.Name())); } #endif return(ToProvider(_singletonMap.CreateProviderFromType(concreteIdentifier, ContractType))); }