private IModule CreateAnyImplementation(Type interfaceType, ModuleConfigLink configLink)
        {
            IModule behaviour = FindBehaviourImplementation(interfaceType);

            if (behaviour != null)
            {
                if (behaviour.GetType().GetCustomAttribute <ConfigurableAttribute>() != null)
                {
                    behaviour.GetType().GetMethod("SetConfig").Invoke(behaviour, new object[] { configLink });
                }
                return(behaviour);
            }
            else
            {
                return(FindPureImplementation(interfaceType, configLink));
            }
        }
Пример #2
0
 public void SetConfig(ModuleConfigLink configLink)
 {
     this.configLink = configLink;
 }
 public LocalizationManager(ModuleConfigLink configLink)
 {
     SetConfig(configLink);
 }