protected override void GenerateEnum(CodeGenerationContext codeGenerationContext, TypeDefinitionExpression expression)
        {
            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".h"))
            {
                var enumFileExpression = EnumHeaderExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(enumFileExpression);
            }
        }
        protected override void GenerateEnum(CodeGenerationContext codeGenerationContext, TypeDefinitionExpression expression)
        {
            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".h"))
            {
                var enumFileExpression = EnumHeaderExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(enumFileExpression);
            }
        }
        protected override void GenerateClass(CodeGenerationContext codeGenerationContext, TypeDefinitionExpression expression)
        {
            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".h"))
            {
                var headerFileExpression = ClassHeaderExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(headerFileExpression);
            }

            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".m"))
            {
                var classFileExpression = ClassSourceExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(classFileExpression);
            }
        }
        protected override void GenerateClass(CodeGenerationContext codeGenerationContext, TypeDefinitionExpression expression)
        {
            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".h"))
            {
                var headerFileExpression = ClassHeaderExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(headerFileExpression);
            }

            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".m"))
            {
                var classFileExpression = ClassSourceExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(classFileExpression);
            }
        }
        protected override void GenerateGateway(CodeGenerationContext codeGenerationContext, TypeDefinitionExpression expression)
        {
            List <Expression> methods;

            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".m"))
            {
                var classFileExpression = GatewaySourceExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                methods = ExpressionGatherer.Gather(classFileExpression, ServiceExpressionType.MethodDefinition);

                codeGenerator.Generate(classFileExpression);
            }

            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".h"))
            {
                var headerFileExpression = GatewayHeaderExpressionBinder.Bind(codeGenerationContext, expression, methods.Cast <MethodDefinitionExpression>().ToList());

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(headerFileExpression);
            }
        }
        protected override void GenerateGateway(CodeGenerationContext codeGenerationContext, TypeDefinitionExpression expression)
        {
            List<Expression> methods;

            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".m"))
            {
                var classFileExpression = GatewaySourceExpressionBinder.Bind(codeGenerationContext, expression);

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                methods = ExpressionGatherer.Gather(classFileExpression, ServiceExpressionType.MethodDefinition);

                codeGenerator.Generate(classFileExpression);
            }

            using (var writer = this.GetTextWriterForFile(expression.Type.Name + ".h"))
            {
                var headerFileExpression = GatewayHeaderExpressionBinder.Bind(codeGenerationContext, expression, methods.Cast<MethodDefinitionExpression>().ToList());

                var codeGenerator = new ObjectiveCodeGenerator(writer);

                codeGenerator.Generate(headerFileExpression);
            }
        }