when beginning Type generation. This prevents "invalid"
`#endregion`s; if the CodeGenerator instance is reused for multiple
types, the last member of the first type has an EndDirective, then
the EndDirectvies will be generated before any members of the 2nd
type. Don't do that.
* Test/System.CodeDom.Compiler/CodeGeneratorTest.cs: Add some testing
for CodeRegionDirectives.
svn path=/trunk/mcs/; revision=155321
* Codegenerator.cs: I noticed an `unreachable code' warning while
building Mono:
System.CodeDom.Compiler/CodeGenerator.cs(1229,42): warning CS0162:
Unreachable code detected
This turned out to be in the method
CodeGenerator.IsValidLanguageIndependentIdentifier, which was
broken.
The following patch contains a unit test to demonstrate the
problem (checked against MS.NET), and a fix to CodeGenerator.cs.
svn path=/trunk/mcs/; revision=73782
tests. Added enum, interface and delegate tests.
* CodeTypeDelegateTest.cs: Added tests for BaseTypes and ReturnType.
* CodeGeneratorTest.cs: Removed duplicate import of NUNit.Framework namespace.
* CodeGeneratorFromTypeTestBase.cs: Added BaseTypes and TypeConstructor tests.
* CodeGeneratorFromTypeTest.cs: Added BaseTypes and TypeConstructor
tests. Enabled enum, interface and delegate tests.
* CSharpCodeGenerator.cs: Fixed generated code for enums, interfaces
and delegates to match MS.NET.
* CodeTypeReference.cs: Added internal IsInterface property.
* CodeTypeDelegate.cs: System.Delegate is base type, and make sure
ReturnType is initialized.
* System_test.dll.sources: Added CodeTypeDelegateTest.cs from System.CodeDom.
* CodeGenerator.cs: Threat delegates like any other type.
* VBCodeGenerator.cs: Fixed generated code for enums, interfaces and
delegates to match MS.NET.
svn path=/trunk/mcs/; revision=47604