Пример #1
0
 public FieldProvider(IFormProvider formProvider, IFieldCreator fieldCreator)
 {
     FieldsByFormId = formProvider.GetAll().ToDictionary(
         f => f.Id,
         f => f.Type
         .GetProperties()
         .Where(p => p.GetGetMethod() != null && p.GetSetMethod() != null)
         .Select(fieldCreator.Create)
         );
 }
Пример #2
0
        private void Awake()
        {
            _anim = GetComponent <IGameAnimations>();

            if (_anim != null)
            {
                _animIsNull = false;
            }

            _fieldCreator = GetComponentInChildren <IFieldCreator>();

            if (_fieldCreator == null)
            {
                throw new System.NullReferenceException("[DrawController] FieldCreator not found");
            }

            ServiceContainer.RegisterService <IDrawController>(this, true);
        }