private ITrigger CreateAutoTrigger(WorkflowStepData param) { WorkflowStepTrigger trigger = m_Instantiator.Instantiate <WorkflowStepTrigger>(); TimeCondition condition = m_Instantiator.Instantiate <TimeCondition>(); condition.time = TimeSpan.FromSeconds(param.durations[0]); trigger.AddCondition(condition, true); trigger.advance = true; trigger.mode = ConditionMode.and; m_DisposalService.Register(trigger, param.id); m_DisposalService.Register(condition, param.id); return(trigger); }
public static object Instantiate(this IInstantiator instantiator, Type concreteType) { return(instantiator.Instantiate(new InjectionContext { Container = instantiator.Container, DeclaringType = concreteType, })); }
public object Read(XmlNode node, NetReflectorTypeTable table) { object instance = instantiator.Instantiate(type); ReflectionPreprocessorAttribute.Invoke(instance, table, node); ReadMembers(node, instance, table); return(instance); }
public ISystem AddSystem(Type type, bool active = true) { Assert.IsNotNull(type); Assert.IsFalse(typeToSystem.ContainsKey(type)); var system = (ISystem)container.Instantiate(type); AddSystem(system, active); return(system); }
public object Get(InjectionContext context) { if (resolver.CanResolve(context)) { return(resolver.Resolve(context)); } else if (parent != null && parent.Resolver.CanResolve(context)) { return(parent.Resolver.Resolve(context)); } else if (instantiator.CanInstantiate(context)) { return(instantiator.Instantiate(context)); } else if (parent != null && parent.Instantiator.CanInstantiate(context)) { return(parent.Instantiator.Instantiate(context)); } else { return(null); } }
/// <summary> This method does not populate the component parent</summary> public virtual object Instantiate() { return(instantiator.Instantiate()); }
public static TConcrete Instantiate <TConcrete>(this IInstantiator instantiator) { return((TConcrete)instantiator.Instantiate(typeof(TConcrete))); }
public override AuraEffect BuildAuraEffect(IInstantiator instantiator) { return(instantiator.Instantiate <StatBuffAuraEffect>(new object[] { _statType, _amount })); }
public override AuraEffect BuildAuraEffect(IInstantiator instantiator) { return(instantiator.Instantiate <DamageOverTimeAuraEffect>(new object[] { _amount, _isHealing, _type })); }