private PolicyDefinition AddElement <T, TElement>( string name, LifetimeManager lifetimeManager, InjectionMember[] injectionMembers, UpdateElements update) where TElement : T { return(AddElement <T>(typeof(TElement), name, lifetimeManager, injectionMembers, update)); }
private PolicyDefinition AddElement <T>(T instance, UpdateElements update) { Guard.ArgumentNotNull(instance, "instance"); string newName = NewName(); Container.RegisterInstance(newName, instance); return(update(newName)); }
private PolicyDefinition AddElement <T>( Type type, string name, LifetimeManager lifetimeManager, InjectionMember[] injectionMembers, UpdateElements update) { Guard.ArgumentNotNullOrEmpty(name, "name"); Guard.ArgumentNotNull(type, "type"); Guard.TypeIsAssignable(typeof(T), type, "type"); Guard.ArgumentNotNull(injectionMembers, "injectionMembers"); Container.RegisterType(typeof(T), type, name, (ITypeLifetimeManager)lifetimeManager, injectionMembers); return(update(name)); }
/// LateUpdate is called once per frame after all regular calculations. /// The order of events in code and the fact that they are all in one method guarantees /// right execution order of integrity checks. void LateUpdate() { UpdateElements?.Invoke(); UpdateConstructions?.Invoke(); UpdateStructures?.Invoke(); }
private PolicyDefinition AddElement <T>(string name, UpdateElements update) { Guard.ArgumentNotNull(name, "name"); return(update(name)); }