public void GenerateCode(Type[] types) { var actorTypes = types.Where(t => Utility.IsActorInterface(t)).ToArray(); var observerTypes = types.Where(t => Utility.IsObserverInterface(t)).ToArray(); var actorCodeGen = new InterfacedActorCodeGenerator() { Options = Options }; foreach (var type in actorTypes) { actorCodeGen.GenerateCode(type, CodeWriter); } var observerCodeGen = new InterfacedObserverCodeGenerator() { Options = Options }; foreach (var type in observerTypes) { observerCodeGen.GenerateCode(type, CodeWriter); } }
public void GenerateCode(Type[] types) { var actorTypes = types.Where(t => Utility.IsActorInterface(t)).ToArray(); var observerTypes = types.Where(t => Utility.IsObserverInterface(t)).ToArray(); var actorCodeGen = new InterfacedActorCodeGenerator() { Options = Options }; foreach (var type in actorTypes) actorCodeGen.GenerateCode(type, CodeWriter); var observerCodeGen = new InterfacedObserverCodeGenerator() { Options = Options }; foreach (var type in observerTypes) observerCodeGen.GenerateCode(type, CodeWriter); }