コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
        }