public void GenerateSubjects(TypeContext typeContext) { var types = typeContext.ClassMethodList.Keys; var invokerObjects = new ObjectFactory().GenerateObjects(typeof(SubjectAttribute), types); _subjects = invokerObjects.Select(SubjectProxy.Create).ToList(); }
public void GenerateObserver(TypeContext typeContext) { var registerMethods = typeContext.OnlyMethodsWithAttribute(typeof(RegisterObserverAttribute)); var observerInterfaces = new List<Type>(); registerMethods.ClassMethodList.Values.ToList().ForEach(m => { var parameterType = m.First().GetParameters().First().ParameterType; if (!parameterType.IsInterface) throw new ArgumentException("Parameter is no interface"); observerInterfaces.Add(parameterType); }); _observerProxies = observerInterfaces.Select(ObserverProxy.Create).ToList(); }
public void GenerateCommands(TypeContext typeContext) { var onlyMethodsWithAttribute = typeContext.OnlyMethodsWithAttribute(typeof (InvokeCommandAttribute)); var invokerInterfaces = new List<Type>(); onlyMethodsWithAttribute.ClassMethodList.Values.ToList().ForEach(m => { var parameterType = m.First().GetParameters().First().ParameterType; if(!parameterType.IsInterface) throw new ArgumentException("Parameter is no interface"); invokerInterfaces.Add(parameterType); }); _commands = invokerInterfaces.Select(CommandProxy.Create).ToList(); }
public CommandSteps(TypeContext typeContext, CommandDriver commandDriver) : base(typeContext) { _typeContext = typeContext; _commandDriver = commandDriver; }
public ObserverSteps(ObserverDriver observerContext, TypeContext typeContext) : base(typeContext) { _observerContext = observerContext; _typeContext = typeContext; }
public TypeContextSteps(TypeContext typeContext) { _typeContext = typeContext; }
public void GenerateSingletons(TypeContext typeContext) { _singletons = typeContext.ClassMethodList.Keys.Select(SingletonProxy.Generate).ToList(); }
public SingletonSteps(SingletonDriver singletonDriver, TypeContext typeContext) : base(typeContext) { _singletonDriver = singletonDriver; _typeContext = typeContext; }