New test.
[mono.git] / mcs / class / System / Test / Microsoft.VisualBasic / CodeGeneratorFromTypeTest.cs
index 670f966fa0711dc6bf4e972d427cdd28e6b84d3b..ca21e5f485cced1338ff5c8d9c93ad1df169a9ad 100644 (file)
@@ -49,32 +49,32 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void DefaultTypeTest ()
                {
-                       string code = GenerateDefaultType ();
+                       string code = GenerateDefaultType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class {0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                [ExpectedException (typeof (NullReferenceException))]
                public override void NullTypeTest ()
                {
-                       GenerateNullType ();
+                       GenerateNullType (Options);
                }
 
                [Test]
                public override void SimpleTypeTest ()
                {
-                       string code = GenerateSimpleType ();
+                       string code = GenerateSimpleType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void DerivedTypeTest ()
                {
-                       string code = GenerateDerivedType ();
+                       string code = GenerateDerivedType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
 #if NET_2_0
                                "Friend MustInherit Class Test1{0}" +
@@ -83,48 +83,52 @@ namespace MonoTests.Microsoft.VisualBasic
 #endif
                                "    Inherits Integer{0}" +
                                "    Implements System.Security.Principal.IIdentity, String, System.Security.IPermission{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void AttributesAndTypeTest ()
                {
-                       string code = GenerateAttributesAndType ();
+                       string code = GenerateAttributesAndType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "<A(),  _{0}" +
                                " B()>  _{0}" +
                                "Public Class Test1{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest1 ()
                {
-                       string code = GenerateEventMembersType1 ();
+                       string code = GenerateEventMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
+#if NET_2_0
+                               "    Private Event __exception As System.Void{0}" +
+#else
                                "    Private Event  As System.Void{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+#endif
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest2 ()
                {
-                       string code = GenerateEventMembersType2 ();
+                       string code = GenerateEventMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Event Click As Integer{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypes ()
                {
-                       string code = GenerateEventImplementationTypes ();
+                       string code = GenerateEventImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -133,7 +137,7 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Friend Event Click As Integer{0}" +
 #endif
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -143,7 +147,7 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void EventPrivateImplementationType ()
                {
-                       string code = GenerateEventPrivateImplementationType ();
+                       string code = GenerateEventPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -152,7 +156,7 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Protected Event Click As Integer{0}" +
 #endif
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -162,7 +166,7 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void EventImplementationTypeOrder ()
                {
-                       string code = GenerateEventImplementationTypeOrder ();
+                       string code = GenerateEventImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -171,37 +175,53 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Public Event Click As Integer{0}" +
 #endif
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest1 ()
+               public override void FieldMembersAttributesTest ()
                {
-                       string code = GenerateFieldMembersType1 ();
+                       string code = GenerateFieldMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
+#if NET_2_0
+                               "    Private __exception As System.Void{0}" +
+#else
                                "    Private  As System.Void{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+#endif
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest2 ()
+               public override void FieldMembersTypeTest ()
                {
-                       string code = GenerateFieldMembersType2 ();
+                       string code = GenerateFieldMembersType (MemberAttributes.Public, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Name As Integer = 2{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void FieldNewSlotTest ()
+               {
+                       string code = GenerateFieldMembersType (MemberAttributes.Assembly |
+                               MemberAttributes.New, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Class Test1{0}" +
+                               "    {0}" +
+                               "    Friend Shadows Name As Integer = 2{0}" +
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest1 ()
                {
-                       string code = GeneratePropertyMembersAttributes ();
+                       string code = GeneratePropertyMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -213,14 +233,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Private Property  As System.Void{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest2 ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Public,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -230,14 +250,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Public Overridable Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, false);
+                               true, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -249,14 +269,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Get{0}" +
                                "        End Get{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeSetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, true);
+                               false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -268,14 +288,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Set{0}" +
                                "        End Set{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetSet ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, true);
+                               true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -289,7 +309,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Set{0}" +
                                "        End Set{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
 #if !NET_2_0
@@ -301,7 +321,7 @@ namespace MonoTests.Microsoft.VisualBasic
                public override void PropertyMembersTypeFamilyOrAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.FamilyOrAssembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -311,7 +331,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Protected Friend Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
 #if !NET_2_0
@@ -323,7 +343,7 @@ namespace MonoTests.Microsoft.VisualBasic
                public override void PropertyMembersTypeAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -333,7 +353,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Friend Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -343,26 +363,26 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void PropertyParametersTest ()
                {
-                       string code = GeneratePropertyParameters ();
+                       string code = GeneratePropertyParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Overridable Property Name(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest1 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, true);
+                               false, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Overridable Default Property iTem(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -373,7 +393,7 @@ namespace MonoTests.Microsoft.VisualBasic
                public override void PropertyIndexerTest2 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, false);
+                               false, false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -383,7 +403,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Public Overridable Property iTem As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -393,7 +413,7 @@ namespace MonoTests.Microsoft.VisualBasic
                public override void PropertyIndexerGetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               true, false, true);
+                               true, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -401,7 +421,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Get{0}" +
                                "        End Get{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -411,7 +431,7 @@ namespace MonoTests.Microsoft.VisualBasic
                public override void PropertyIndexerSetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               false, true, true);
+                               false, true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -419,13 +439,13 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Set{0}" +
                                "        End Set{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypes ()
                {
-                       string code = GeneratePropertyImplementationTypes ();
+                       string code = GeneratePropertyImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -435,7 +455,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Public Overridable Property Name As Integer Implements IPolicy.Name , IWhatever.Name{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -445,17 +465,17 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void PropertyOverloadsTest1 ()
                {
-                       string code = GeneratePropertyOverloads1 ();
+                       string code = GeneratePropertyOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
 #if NET_2_0
-                               "    Public Overloads Overridable Property Name() As Integer{0}" +
+                               "    Protected Overloads Overridable Property Name() As Integer{0}" +
 #else
-                               "    Public Overloads Overridable Property Name As Integer{0}" +
+                               "    Protected Overloads Overridable Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -465,7 +485,7 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void PropertyOverloadsTest2 ()
                {
-                       string code = GeneratePropertyOverloads2 ();
+                       string code = GeneratePropertyOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -478,7 +498,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Private Overloads Property Name(ByVal value1 As Object) As Integer{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -488,7 +508,7 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void PropertyOverloadsTest3 ()
                {
-                       string code = GeneratePropertyOverloads3 ();
+                       string code = GeneratePropertyOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -501,7 +521,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Property System_Int32_Name(ByVal value1 As Object) As Integer Implements Integer.Name{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -511,13 +531,13 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void PropertyPrivateImplementationType ()
                {
-                       string code = GeneratePropertyPrivateImplementationType ();
+                       string code = GeneratePropertyPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Overridable Property System_Int32_Item(ByVal value1 As Object) As Integer Implements Integer.Item{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -527,19 +547,40 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void PropertyImplementationTypeOrder ()
                {
-                       string code = GeneratePropertyImplementationTypeOrder ();
+                       string code = GeneratePropertyImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Overridable Property System_Int32_Item(ByVal value1 As Object) As Integer Implements IPolicy.Item{0}" +
                                "    End Property{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void PropertyNewSlotTest ()
+               {
+                       string code = GeneratePropertyMembersType (MemberAttributes.Private |
+                               MemberAttributes.New, true, true, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Class Test1{0}" +
+                               "    {0}" +
+#if NET_2_0
+                               "    Private Shadows Property Name() As Integer{0}" +
+#else
+                               "    Private Shadows Property Name As Integer{0}" +
+#endif
+                               "        Get{0}" +
+                               "        End Get{0}" +
+                               "        Set{0}" +
+                               "        End Set{0}" +
+                               "    End Property{0}" +
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest1 ()
                {
-                       string code = GenerateMethodMembersType1 ();
+                       string code = GenerateMethodMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -547,37 +588,41 @@ namespace MonoTests.Microsoft.VisualBasic
                                "     B()>  _{0}" +
                                "    Private Sub (){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest2 ()
                {
-                       string code = GenerateMethodMembersType2 ();
+                       string code = GenerateMethodMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Overridable Function Something(ByVal value1 As Object, ByVal value2 As Object, ByRef index As Integer, ByRef count As Integer) As Integer{0}" +
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest3 ()
                {
-                       string code = GenerateMethodMembersType3 ();
+                       string code = GenerateMethodMembersType3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
-                               "    Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer) As Integer{0}" +
+#if NET_2_0
+                               "    Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef __exception As Integer) As Integer{0}" +
+#else
+                               "    Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef  As Integer) As Integer{0}" +
+#endif
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypes ()
                {
-                       string code = GenerateMethodImplementationTypes ();
+                       string code = GenerateMethodImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -587,7 +632,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Friend Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" +
 #endif
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -597,13 +642,17 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void MethodOverloadsTest1 ()
                {
-                       string code = GenerateMethodOverloads1 ();
+                       string code = GenerateMethodOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
-                               "    Public Overloads Overridable Function Execute() As Integer{0}" +
+#if NET_2_0
+                               "    Friend Overloads Overridable Function Execute() As Integer{0}" +
+#else
+                               "    Friend Overloads Function Execute() As Integer{0}" +
+#endif
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -613,7 +662,7 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void MethodOverloadsTest2 ()
                {
-                       string code = GenerateMethodOverloads2 ();
+                       string code = GenerateMethodOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -622,7 +671,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Private Overloads Function Execute(ByVal value1 As Object) As Integer{0}" +
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -632,7 +681,7 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void MethodOverloadsTest3 ()
                {
-                       string code = GenerateMethodOverloads3 ();
+                       string code = GenerateMethodOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -641,7 +690,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements Integer.Execute{0}" +
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -651,13 +700,13 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void MethodPrivateImplementationType ()
                {
-                       string code = GenerateMethodPrivateImplementationType ();
+                       string code = GenerateMethodPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Overridable Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements Integer.Execute{0}" +
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                /// <summary>
@@ -667,19 +716,19 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void MethodImplementationTypeOrder ()
                {
-                       string code = GenerateMethodImplementationTypeOrder ();
+                       string code = GenerateMethodImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Overridable Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements IPolicy.Execute{0}" +
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodReturnTypeAttributes ()
                {
-                       string code = GenerateMethodReturnTypeAttributes ();
+                       string code = GenerateMethodReturnTypeAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -687,106 +736,121 @@ namespace MonoTests.Microsoft.VisualBasic
                                "     B()>  _{0}" +
                                "    Public Overridable Function Execute() As <C(A1:=false, A2:=true), D()> Integer{0}" +
                                "    End Function{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void MethodNewSlotTest ()
+               {
+                       string code = GenerateMethodNewSlot (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Class Test1{0}" +
+                               "    {0}" +
+                               "    Public Shadows Overridable Function Execute() As Integer{0}" +
+                               "    End Function{0}" +
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorAttributesTest ()
                {
-                       string code = GenerateConstructorAttributes ();
+                       // FIXME: updated to reflect mbas workaround
+                       string code = GenerateConstructorAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
                                "    Private Sub New(){0}" +
-                               "        MyBase.New{0}" +
+                               "        MyBase.New(){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParametersTest ()
                {
-                       string code = GenerateConstructorParameters ();
+                       // FIXME: updated to reflect mbas workaround
+                       string code = GenerateConstructorParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Sub New(ByVal value1 As Object, ByVal value2 As Object, ByRef index As Integer, ByRef count As Integer){0}" +
-                               "        MyBase.New{0}" +
+                               "        MyBase.New(){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParameterAttributesTest ()
                {
-                       string code = GenerateConstructorParameterAttributes ();
+                       // FIXME: updated to reflect mbas workaround
+                       string code = GenerateConstructorParameterAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
-                               "    Public Sub New(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer){0}" +
-                               "        MyBase.New{0}" +
+                               "    Private Sub New(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer){0}" +
+                               "        MyBase.New(){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorSingleArg ()
                {
-                       string code = GenerateBaseConstructor (false);
+                       string code = GenerateBaseConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
-                               "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
+                               "    Protected Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        MyBase.New(value1){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorMultipleArgs ()
                {
-                       string code = GenerateBaseConstructor (true);
+                       string code = GenerateBaseConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
-                               "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
+                               "    Protected Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        MyBase.New(value1, value2){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorSingleArg ()
                {
-                       string code = GenerateChainedConstructor (false);
+                       string code = GenerateChainedConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        Me.New(value1){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorMultipleArgs ()
                {
-                       string code = GenerateChainedConstructor (true);
+                       string code = GenerateChainedConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
                                "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        Me.New(value1, value2){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
                }
 
                [Test]
                public override void TypeConstructorTest ()
                {
-                       string code = GenerateTypeConstructor ();
+                       string code = GenerateTypeConstructor (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Class Test1{0}" +
                                "    {0}" +
@@ -796,7 +860,23 @@ namespace MonoTests.Microsoft.VisualBasic
 #endif
                                "    Shared Sub New(){0}" +
                                "    End Sub{0}" +
-                               "End Class{0}", Writer.NewLine), code);
+                               "End Class{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void EntryPointMethodTest ()
+               {
+                       string code = GenerateEntryPointMethod (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Class Test1{0}" +
+                               "    {0}" +
+#if NET_2_0
+                               "    <A()>  _{0}" +
+#endif
+                               "    Public Shared Sub Main(){0}" +
+                               "        Dim x As Test.InnerType{0}" +
+                               "    End Sub{0}" +
+                               "End Class{0}", NewLine), code);
                }
        }
 
@@ -829,32 +909,32 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void DefaultTypeTest ()
                {
-                       string code = GenerateDefaultType ();
+                       string code = GenerateDefaultType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub (){0}", Writer.NewLine), code);
+                               "Public Delegate Sub (){0}", NewLine), code);
                }
 
                [Test]
                [ExpectedException (typeof (NullReferenceException))]
                public override void NullTypeTest ()
                {
-                       GenerateNullType ();
+                       GenerateNullType (Options);
                }
 
                [Test]
                public override void SimpleTypeTest ()
                {
-                       string code = GenerateSimpleType ();
+                       string code = GenerateSimpleType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}", NewLine), code);
                }
 
                [Test]
                public override void DerivedTypeTest ()
                {
-                       string code = GenerateDerivedType ();
+                       string code = GenerateDerivedType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Delegate Sub Test1(){0}", Writer.NewLine), code);
+                               "Delegate Sub Test1(){0}", NewLine), code);
                }
 
                [Test]
@@ -865,35 +945,35 @@ namespace MonoTests.Microsoft.VisualBasic
 
                        _typeDeclaration = delegateDecl;
 
-                       string code = GenerateAttributesAndType ();
+                       string code = GenerateAttributesAndType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "<A(),  _{0}" +
                                " B()>  _{0}" +
-                               "Public Delegate Function Test1() As Integer{0}", Writer.NewLine), code);
+                               "Public Delegate Function Test1() As Integer{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest1 ()
                {
-                       string code = GenerateEventMembersType1 ();
+                       string code = GenerateEventMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest2 ()
                {
-                       string code = GenerateEventMembersType2 ();
+                       string code = GenerateEventMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypes ()
                {
-                       string code = GenerateEventImplementationTypes ();
+                       string code = GenerateEventImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                /// <summary>
@@ -903,9 +983,9 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void EventPrivateImplementationType ()
                {
-                       string code = GenerateEventPrivateImplementationType ();
+                       string code = GenerateEventPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                /// <summary>
@@ -915,323 +995,363 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void EventImplementationTypeOrder ()
                {
-                       string code = GenerateEventImplementationTypeOrder ();
+                       string code = GenerateEventImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest1 ()
+               public override void FieldMembersAttributesTest ()
                {
-                       string code = GenerateFieldMembersType1 ();
+                       string code = GenerateFieldMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest2 ()
+               public override void FieldMembersTypeTest ()
                {
-                       string code = GenerateFieldMembersType2 ();
+                       string code = GenerateFieldMembersType (MemberAttributes.Public, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void FieldNewSlotTest ()
+               {
+                       string code = GenerateFieldMembersType (MemberAttributes.Assembly |
+                               MemberAttributes.New, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest1 ()
                {
-                       string code = GeneratePropertyMembersAttributes ();
+                       string code = GeneratePropertyMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest2 ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Public,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, false);
+                               true, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeSetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, true);
+                               false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetSet ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, true);
+                               true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeFamilyOrAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.FamilyOrAssembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyParametersTest ()
                {
-                       string code = GeneratePropertyParameters ();
+                       string code = GeneratePropertyParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest1 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, true);
+                               false, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest2 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, false);
+                               false, false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerGetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               true, false, true);
+                               true, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerSetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               false, true, true);
+                               false, true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypes ()
                {
-                       string code = GeneratePropertyImplementationTypes ();
+                       string code = GeneratePropertyImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest1 ()
                {
-                       string code = GeneratePropertyOverloads1 ();
+                       string code = GeneratePropertyOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest2 ()
                {
-                       string code = GeneratePropertyOverloads2 ();
+                       string code = GeneratePropertyOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest3 ()
                {
-                       string code = GeneratePropertyOverloads3 ();
+                       string code = GeneratePropertyOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyPrivateImplementationType ()
                {
-                       string code = GeneratePropertyPrivateImplementationType ();
+                       string code = GeneratePropertyPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypeOrder ()
                {
-                       string code = GeneratePropertyImplementationTypeOrder ();
+                       string code = GeneratePropertyImplementationTypeOrder (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void PropertyNewSlotTest ()
+               {
+                       string code = GeneratePropertyMembersType (MemberAttributes.Private |
+                               MemberAttributes.New, true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest1 ()
                {
-                       string code = GenerateMethodMembersType1 ();
+                       string code = GenerateMethodMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest2 ()
                {
-                       string code = GenerateMethodMembersType2 ();
+                       string code = GenerateMethodMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest3 ()
                {
-                       string code = GenerateMethodMembersType3 ();
+                       string code = GenerateMethodMembersType3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypes ()
                {
-                       string code = GenerateMethodImplementationTypes ();
+                       string code = GenerateMethodImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest1 ()
                {
-                       string code = GenerateMethodOverloads1 ();
+                       string code = GenerateMethodOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest2 ()
                {
-                       string code = GenerateMethodOverloads2 ();
+                       string code = GenerateMethodOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest3 ()
                {
-                       string code = GenerateMethodOverloads3 ();
+                       string code = GenerateMethodOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodPrivateImplementationType ()
                {
-                       string code = GenerateMethodPrivateImplementationType ();
+                       string code = GenerateMethodPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypeOrder ()
                {
-                       string code = GenerateMethodImplementationTypeOrder ();
+                       string code = GenerateMethodImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodReturnTypeAttributes ()
                {
-                       string code = GenerateMethodReturnTypeAttributes ();
+                       string code = GenerateMethodReturnTypeAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void MethodNewSlotTest ()
+               {
+                       string code = GenerateMethodNewSlot (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorAttributesTest ()
                {
-                       string code = GenerateConstructorAttributes ();
+                       string code = GenerateConstructorAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParametersTest ()
                {
-                       string code = GenerateConstructorParameters ();
+                       string code = GenerateConstructorParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParameterAttributesTest ()
                {
-                       string code = GenerateConstructorParameterAttributes ();
+                       string code = GenerateConstructorParameterAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorSingleArg ()
                {
-                       string code = GenerateBaseConstructor (false);
+                       string code = GenerateBaseConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorMultipleArgs ()
                {
-                       string code = GenerateBaseConstructor (true);
+                       string code = GenerateBaseConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorSingleArg ()
                {
-                       string code = GenerateChainedConstructor (false);
+                       string code = GenerateChainedConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorMultipleArgs ()
                {
-                       string code = GenerateChainedConstructor (true);
+                       string code = GenerateChainedConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
                }
 
                [Test]
                public override void TypeConstructorTest ()
                {
-                       string code = GenerateTypeConstructor ();
+                       string code = GenerateTypeConstructor (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
-                               "Public Delegate Sub Test1(){0}{0}", Writer.NewLine), code);
+                               "Public Delegate Sub Test1(){0}{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void EntryPointMethodTest ()
+               {
+                       string code = GenerateEntryPointMethod (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Delegate Sub Test1(){0}{0}" +
+#if NET_2_0
+                               "<A()>  _{0}" +
+#endif
+                               "Public Shared Sub Main(){0}" +
+                               "    Dim x As Test.InnerType{0}" +
+                               "End Sub{0}", NewLine), code);
                }
        }
 
@@ -1265,32 +1385,32 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void DefaultTypeTest ()
                {
-                       string code = GenerateDefaultType ();
+                       string code = GenerateDefaultType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                [ExpectedException (typeof (NullReferenceException))]
                public override void NullTypeTest ()
                {
-                       GenerateNullType ();
+                       GenerateNullType (Options);
                }
 
                [Test]
                public override void SimpleTypeTest ()
                {
-                       string code = GenerateSimpleType ();
+                       string code = GenerateSimpleType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void DerivedTypeTest ()
                {
-                       string code = GenerateDerivedType ();
+                       string code = GenerateDerivedType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
 #if NET_2_0
                                "Friend Interface Test1{0}" +
@@ -1298,48 +1418,52 @@ namespace MonoTests.Microsoft.VisualBasic
                                "Interface Test1{0}" +
 #endif
                                "    Inherits Integer, System.Security.Principal.IIdentity, String, System.Security.IPermission{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void AttributesAndTypeTest ()
                {
-                       string code = GenerateAttributesAndType ();
+                       string code = GenerateAttributesAndType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "<A(),  _{0}" +
                                " B()>  _{0}" +
                                "Public Interface Test1{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest1 ()
                {
-                       string code = GenerateEventMembersType1 ();
+                       string code = GenerateEventMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
+#if NET_2_0
+                               "    Private Event __exception As System.Void{0}" +
+#else
                                "    Private Event  As System.Void{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+#endif
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest2 ()
                {
-                       string code = GenerateEventMembersType2 ();
+                       string code = GenerateEventMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Public Event Click As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypes ()
                {
-                       string code = GenerateEventImplementationTypes ();
+                       string code = GenerateEventImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1348,13 +1472,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Friend Event Click As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void EventPrivateImplementationType ()
                {
-                       string code = GenerateEventPrivateImplementationType ();
+                       string code = GenerateEventPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1363,13 +1487,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Protected Event Click As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypeOrder ()
                {
-                       string code = GenerateEventImplementationTypeOrder ();
+                       string code = GenerateEventImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1378,33 +1502,44 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Public Event Click As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest1 ()
+               public override void FieldMembersAttributesTest ()
                {
-                       string code = GenerateFieldMembersType1 ();
+                       string code = GenerateFieldMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest2 ()
+               public override void FieldMembersTypeTest ()
                {
-                       string code = GenerateFieldMembersType2 ();
+                       string code = GenerateFieldMembersType (MemberAttributes.Public, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void FieldNewSlotTest ()
+               {
+                       string code = GenerateFieldMembersType (MemberAttributes.Assembly |
+                               MemberAttributes.New, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Interface Test1{0}" +
+                               "    {0}" +
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest1 ()
                {
-                       string code = GeneratePropertyMembersAttributes ();
+                       string code = GeneratePropertyMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1415,14 +1550,14 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property  As System.Void{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest2 ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Public,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1431,14 +1566,14 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, false);
+                               true, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1447,14 +1582,14 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    ReadOnly Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeSetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, true);
+                               false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1463,14 +1598,14 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    WriteOnly Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetSet ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, true);
+                               true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1479,14 +1614,14 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeFamilyOrAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.FamilyOrAssembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1495,14 +1630,14 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1511,37 +1646,37 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyParametersTest ()
                {
-                       string code = GeneratePropertyParameters ();
+                       string code = GeneratePropertyParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Property Name(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest1 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, true);
+                               false, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Default Property iTem(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest2 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, false);
+                               false, false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1550,37 +1685,37 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property iTem As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerGetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               true, false, true);
+                               true, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Default ReadOnly Property iTem(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerSetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               false, true, true);
+                               false, true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Default WriteOnly Property iTem(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypes ()
                {
-                       string code = GeneratePropertyImplementationTypes ();
+                       string code = GeneratePropertyImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1589,13 +1724,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property Name As Integer Implements IPolicy.Name , IWhatever.Name{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest1 ()
                {
-                       string code = GeneratePropertyOverloads1 ();
+                       string code = GeneratePropertyOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1604,13 +1739,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Property Name As Integer{0}" +
 #endif
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest2 ()
                {
-                       string code = GeneratePropertyOverloads2 ();
+                       string code = GeneratePropertyOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1621,13 +1756,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #endif
                                "    {0}" +
                                "    Property Name(ByVal value1 As Object) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest3 ()
                {
-                       string code = GeneratePropertyOverloads3 ();
+                       string code = GeneratePropertyOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
@@ -1638,227 +1773,274 @@ namespace MonoTests.Microsoft.VisualBasic
 #endif
                                "    {0}" +
                                "    Property System_Int32_Name(ByVal value1 As Object) As Integer Implements Integer.Name{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyPrivateImplementationType ()
                {
-                       string code = GeneratePropertyPrivateImplementationType ();
+                       string code = GeneratePropertyPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Property System_Int32_Item(ByVal value1 As Object) As Integer Implements Integer.Item{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypeOrder ()
                {
-                       string code = GeneratePropertyImplementationTypeOrder ();
+                       string code = GeneratePropertyImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Property System_Int32_Item(ByVal value1 As Object) As Integer Implements IPolicy.Item{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void PropertyNewSlotTest ()
+               {
+                       string code = GeneratePropertyMembersType (MemberAttributes.Private |
+                               MemberAttributes.New, true, true, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Interface Test1{0}" +
+                               "    {0}" +
+#if NET_2_0
+                               "    Shadows Property Name() As Integer{0}" +
+#else
+                               "    Shadows Property Name As Integer{0}" +
+#endif
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest1 ()
                {
-                       string code = GenerateMethodMembersType1 ();
+                       string code = GenerateMethodMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
                                "    Sub (){0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest2 ()
                {
-                       string code = GenerateMethodMembersType2 ();
+                       string code = GenerateMethodMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Function Something(ByVal value1 As Object, ByVal value2 As Object, ByRef index As Integer, ByRef count As Integer) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest3 ()
                {
-                       string code = GenerateMethodMembersType3 ();
+                       string code = GenerateMethodMembersType3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "    Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+#if NET_2_0
+                               "    Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef __exception As Integer) As Integer{0}" +
+#else
+                               "    Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef  As Integer) As Integer{0}" +
+#endif
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypes ()
                {
-                       string code = GenerateMethodImplementationTypes ();
+                       string code = GenerateMethodImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest1 ()
                {
-                       string code = GenerateMethodOverloads1 ();
+                       string code = GenerateMethodOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Function Execute() As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest2 ()
                {
-                       string code = GenerateMethodOverloads2 ();
+                       string code = GenerateMethodOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Sub Execute(){0}" +
                                "    {0}" +
                                "    Function Execute(ByVal value1 As Object) As Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest3 ()
                {
-                       string code = GenerateMethodOverloads3 ();
+                       string code = GenerateMethodOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Sub Execute(){0}" +
                                "    {0}" +
                                "    Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements Integer.Execute{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodPrivateImplementationType ()
                {
-                       string code = GenerateMethodPrivateImplementationType ();
+                       string code = GenerateMethodPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements Integer.Execute{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypeOrder ()
                {
-                       string code = GenerateMethodImplementationTypeOrder ();
+                       string code = GenerateMethodImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements IPolicy.Execute{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodReturnTypeAttributes ()
                {
-                       string code = GenerateMethodReturnTypeAttributes ();
+                       string code = GenerateMethodReturnTypeAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
                                "    Function Execute() As <C(A1:=false, A2:=true), D()> Integer{0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void MethodNewSlotTest ()
+               {
+                       string code = GenerateMethodNewSlot (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Interface Test1{0}" +
+                               "    {0}" +
+                               "    Shadows Function Execute() As Integer{0}" +
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorAttributesTest ()
                {
-                       string code = GenerateConstructorAttributes ();
+                       string code = GenerateConstructorAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParametersTest ()
                {
-                       string code = GenerateConstructorParameters ();
+                       string code = GenerateConstructorParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParameterAttributesTest ()
                {
-                       string code = GenerateConstructorParameterAttributes ();
+                       string code = GenerateConstructorParameterAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorSingleArg ()
                {
-                       string code = GenerateBaseConstructor (false);
+                       string code = GenerateBaseConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorMultipleArgs ()
                {
-                       string code = GenerateBaseConstructor (true);
+                       string code = GenerateBaseConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorSingleArg ()
                {
-                       string code = GenerateChainedConstructor (false);
+                       string code = GenerateChainedConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorMultipleArgs ()
                {
-                       string code = GenerateChainedConstructor (true);
+                       string code = GenerateChainedConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
                }
 
                [Test]
                public override void TypeConstructorTest ()
                {
-                       string code = GenerateTypeConstructor ();
+                       string code = GenerateTypeConstructor (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Interface Test1{0}" +
                                "    {0}" +
-                               "End Interface{0}", Writer.NewLine), code);
+                               "End Interface{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void EntryPointMethodTest ()
+               {
+                       string code = GenerateEntryPointMethod (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Interface Test1{0}" +
+                               "    {0}" +
+#if NET_2_0
+                               "    <A()>  _{0}" +
+#endif
+                               "    Public Shared Sub Main(){0}" +
+                               "        Dim x As Test.InnerType{0}" +
+                               "    End Sub{0}" +
+                               "End Interface{0}", NewLine), code);
                }
        }
 
@@ -1892,32 +2074,32 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void DefaultTypeTest ()
                {
-                       string code = GenerateDefaultType ();
+                       string code = GenerateDefaultType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure {0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                [ExpectedException (typeof (NullReferenceException))]
                public override void NullTypeTest ()
                {
-                       GenerateNullType ();
+                       GenerateNullType (Options);
                }
 
                [Test]
                public override void SimpleTypeTest ()
                {
-                       string code = GenerateSimpleType ();
+                       string code = GenerateSimpleType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void DerivedTypeTest ()
                {
-                       string code = GenerateDerivedType ();
+                       string code = GenerateDerivedType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
 #if NET_2_0
                                "Friend Structure Test1{0}" +
@@ -1925,48 +2107,52 @@ namespace MonoTests.Microsoft.VisualBasic
                                "Structure Test1{0}" +
 #endif
                                "    Implements Integer, System.Security.Principal.IIdentity, String, System.Security.IPermission{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void AttributesAndTypeTest ()
                {
-                       string code = GenerateAttributesAndType ();
+                       string code = GenerateAttributesAndType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "<A(),  _{0}" +
                                " B()>  _{0}" +
                                "Public Structure Test1{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest1 ()
                {
-                       string code = GenerateEventMembersType1 ();
+                       string code = GenerateEventMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
+#if NET_2_0
+                               "    Private Event __exception As System.Void{0}" +
+#else
                                "    Private Event  As System.Void{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+#endif
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest2 ()
                {
-                       string code = GenerateEventMembersType2 ();
+                       string code = GenerateEventMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Event Click As Integer{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypes ()
                {
-                       string code = GenerateEventImplementationTypes ();
+                       string code = GenerateEventImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -1975,13 +2161,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Friend Event Click As Integer{0}" +
 #endif
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void EventPrivateImplementationType ()
                {
-                       string code = GenerateEventPrivateImplementationType ();
+                       string code = GenerateEventPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -1990,13 +2176,13 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Protected Event Click As Integer{0}" +
 #endif
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypeOrder ()
                {
-                       string code = GenerateEventImplementationTypeOrder ();
+                       string code = GenerateEventImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2005,37 +2191,53 @@ namespace MonoTests.Microsoft.VisualBasic
 #else
                                "    Public Event Click As Integer{0}" +
 #endif
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest1 ()
+               public override void FieldMembersAttributesTest ()
                {
-                       string code = GenerateFieldMembersType1 ();
+                       string code = GenerateFieldMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
+#if NET_2_0
+                               "    Private __exception As System.Void{0}" +
+#else
                                "    Private  As System.Void{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+#endif
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest2 ()
+               public override void FieldMembersTypeTest ()
                {
-                       string code = GenerateFieldMembersType2 ();
+                       string code = GenerateFieldMembersType (MemberAttributes.Public, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Name As Integer = 2{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void FieldNewSlotTest ()
+               {
+                       string code = GenerateFieldMembersType (MemberAttributes.Assembly |
+                               MemberAttributes.New, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Structure Test1{0}" +
+                               "    {0}" +
+                               "    Friend Shadows Name As Integer = 2{0}" +
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest1 ()
                {
-                       string code = GeneratePropertyMembersAttributes ();
+                       string code = GeneratePropertyMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2047,14 +2249,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Private Property  As System.Void{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest2 ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Public,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2064,14 +2266,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Public Overridable Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, false);
+                               true, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2083,14 +2285,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Get{0}" +
                                "        End Get{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeSetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, true);
+                               false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2102,14 +2304,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Set{0}" +
                                "        End Set{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetSet ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, true);
+                               true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2123,7 +2325,7 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Set{0}" +
                                "        End Set{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
 #if !NET_2_0
@@ -2135,7 +2337,7 @@ namespace MonoTests.Microsoft.VisualBasic
                public override void PropertyMembersTypeFamilyOrAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.FamilyOrAssembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2145,14 +2347,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Protected Friend Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2162,39 +2364,39 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Friend Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyParametersTest ()
                {
-                       string code = GeneratePropertyParameters ();
+                       string code = GeneratePropertyParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Overridable Property Name(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest1 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, true);
+                               false, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Overridable Default Property iTem(ByVal value1 As Object, ByRef value2 As Integer) As Integer{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest2 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, false);
+                               false, false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2204,14 +2406,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Public Overridable Property iTem As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerGetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               true, false, true);
+                               true, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2219,14 +2421,14 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Get{0}" +
                                "        End Get{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerSetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               false, true, true);
+                               false, true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2234,13 +2436,13 @@ namespace MonoTests.Microsoft.VisualBasic
                                "        Set{0}" +
                                "        End Set{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypes ()
                {
-                       string code = GeneratePropertyImplementationTypes ();
+                       string code = GeneratePropertyImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2250,29 +2452,29 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Public Overridable Property Name As Integer Implements IPolicy.Name , IWhatever.Name{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest1 ()
                {
-                       string code = GeneratePropertyOverloads1 ();
+                       string code = GeneratePropertyOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
 #if NET_2_0
-                               "    Public Overloads Overridable Property Name() As Integer{0}" +
+                               "    Protected Overloads Overridable Property Name() As Integer{0}" +
 #else
-                               "    Public Overloads Overridable Property Name As Integer{0}" +
+                               "    Protected Overloads Overridable Property Name As Integer{0}" +
 #endif
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest2 ()
                {
-                       string code = GeneratePropertyOverloads2 ();
+                       string code = GeneratePropertyOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2285,13 +2487,13 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Private Overloads Property Name(ByVal value1 As Object) As Integer{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest3 ()
                {
-                       string code = GeneratePropertyOverloads3 ();
+                       string code = GeneratePropertyOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2304,37 +2506,58 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Property System_Int32_Name(ByVal value1 As Object) As Integer Implements Integer.Name{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyPrivateImplementationType ()
                {
-                       string code = GeneratePropertyPrivateImplementationType ();
+                       string code = GeneratePropertyPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Overridable Property System_Int32_Item(ByVal value1 As Object) As Integer Implements Integer.Item{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypeOrder ()
                {
-                       string code = GeneratePropertyImplementationTypeOrder ();
+                       string code = GeneratePropertyImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Overridable Property System_Int32_Item(ByVal value1 As Object) As Integer Implements IPolicy.Item{0}" +
                                "    End Property{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void PropertyNewSlotTest ()
+               {
+                       string code = GeneratePropertyMembersType (MemberAttributes.Private |
+                               MemberAttributes.New, true, true, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Structure Test1{0}" +
+                               "    {0}" +
+#if NET_2_0
+                               "    Private Shadows Property Name() As Integer{0}" +
+#else
+                               "    Private Shadows Property Name As Integer{0}" +
+#endif
+                               "        Get{0}" +
+                               "        End Get{0}" +
+                               "        Set{0}" +
+                               "        End Set{0}" +
+                               "    End Property{0}" +
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest1 ()
                {
-                       string code = GenerateMethodMembersType1 ();
+                       string code = GenerateMethodMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2342,37 +2565,41 @@ namespace MonoTests.Microsoft.VisualBasic
                                "     B()>  _{0}" +
                                "    Private Sub (){0}" +
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest2 ()
                {
-                       string code = GenerateMethodMembersType2 ();
+                       string code = GenerateMethodMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Overridable Function Something(ByVal value1 As Object, ByVal value2 As Object, ByRef index As Integer, ByRef count As Integer) As Integer{0}" +
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest3 ()
                {
-                       string code = GenerateMethodMembersType3 ();
+                       string code = GenerateMethodMembersType3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
-                               "    Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer) As Integer{0}" +
+#if NET_2_0
+                               "    Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef __exception As Integer) As Integer{0}" +
+#else
+                               "    Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef  As Integer) As Integer{0}" +
+#endif
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypes ()
                {
-                       string code = GenerateMethodImplementationTypes ();
+                       string code = GenerateMethodImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2382,25 +2609,29 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    Friend Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" +
 #endif
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest1 ()
                {
-                       string code = GenerateMethodOverloads1 ();
+                       string code = GenerateMethodOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
-                               "    Public Overloads Overridable Function Execute() As Integer{0}" +
+#if NET_2_0
+                               "    Friend Overloads Overridable Function Execute() As Integer{0}" +
+#else
+                               "    Friend Overloads Function Execute() As Integer{0}" +
+#endif
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest2 ()
                {
-                       string code = GenerateMethodOverloads2 ();
+                       string code = GenerateMethodOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2409,13 +2640,13 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Private Overloads Function Execute(ByVal value1 As Object) As Integer{0}" +
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest3 ()
                {
-                       string code = GenerateMethodOverloads3 ();
+                       string code = GenerateMethodOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2424,37 +2655,37 @@ namespace MonoTests.Microsoft.VisualBasic
                                "    {0}" +
                                "    Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements Integer.Execute{0}" +
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodPrivateImplementationType ()
                {
-                       string code = GenerateMethodPrivateImplementationType ();
+                       string code = GenerateMethodPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Overridable Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements Integer.Execute{0}" +
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypeOrder ()
                {
-                       string code = GenerateMethodImplementationTypeOrder ();
+                       string code = GenerateMethodImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Overridable Function System_Int32_Execute(ByVal value1 As Object) As Integer Implements IPolicy.Execute{0}" +
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodReturnTypeAttributes ()
                {
-                       string code = GenerateMethodReturnTypeAttributes ();
+                       string code = GenerateMethodReturnTypeAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2462,13 +2693,26 @@ namespace MonoTests.Microsoft.VisualBasic
                                "     B()>  _{0}" +
                                "    Public Overridable Function Execute() As <C(A1:=false, A2:=true), D()> Integer{0}" +
                                "    End Function{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void MethodNewSlotTest ()
+               {
+                       string code = GenerateMethodNewSlot (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Structure Test1{0}" +
+                               "    {0}" +
+                               "    Public Shadows Overridable Function Execute() As Integer{0}" +
+                               "    End Function{0}" +
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorAttributesTest ()
                {
-                       string code = GenerateConstructorAttributes ();
+                       // FIXME: updated to reflect mbas workaround
+                       string code = GenerateConstructorAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2476,98 +2720,100 @@ namespace MonoTests.Microsoft.VisualBasic
                                "     B()>  _{0}" +
                                "    Private Sub New(){0}" +
 #if !NET_2_0
-                               "        MyBase.New{0}" +
+                               "        MyBase.New(){0}" +
 #endif
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParametersTest ()
                {
-                       string code = GenerateConstructorParameters ();
+                       // FIXME: updated to reflect mbas workaround
+                       string code = GenerateConstructorParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Sub New(ByVal value1 As Object, ByVal value2 As Object, ByRef index As Integer, ByRef count As Integer){0}" +
 #if !NET_2_0
-                               "        MyBase.New{0}" +
+                               "        MyBase.New(){0}" +
 #endif
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParameterAttributesTest ()
                {
-                       string code = GenerateConstructorParameterAttributes ();
+                       // FIXME: updated to reflect mbas workaround
+                       string code = GenerateConstructorParameterAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
-                               "    Public Sub New(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer){0}" +
+                               "    Private Sub New(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef index As Integer){0}" +
 #if !NET_2_0
-                               "        MyBase.New{0}" +
+                               "        MyBase.New(){0}" +
 #endif
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorSingleArg ()
                {
-                       string code = GenerateBaseConstructor (false);
+                       string code = GenerateBaseConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
-                               "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
+                               "    Protected Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        MyBase.New(value1){0}" +
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorMultipleArgs ()
                {
-                       string code = GenerateBaseConstructor (true);
+                       string code = GenerateBaseConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
-                               "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
+                               "    Protected Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        MyBase.New(value1, value2){0}" +
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorSingleArg ()
                {
-                       string code = GenerateChainedConstructor (false);
+                       string code = GenerateChainedConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        Me.New(value1){0}" +
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorMultipleArgs ()
                {
-                       string code = GenerateChainedConstructor (true);
+                       string code = GenerateChainedConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
                                "    Public Sub New(ByVal value1 As Object, ByRef value2 As Integer){0}" +
                                "        Me.New(value1, value2){0}" +
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
                }
 
                [Test]
                public override void TypeConstructorTest ()
                {
-                       string code = GenerateTypeConstructor ();
+                       string code = GenerateTypeConstructor (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Structure Test1{0}" +
                                "    {0}" +
@@ -2577,7 +2823,23 @@ namespace MonoTests.Microsoft.VisualBasic
 #endif
                                "    Shared Sub New(){0}" +
                                "    End Sub{0}" +
-                               "End Structure{0}", Writer.NewLine), code);
+                               "End Structure{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void EntryPointMethodTest ()
+               {
+                       string code = GenerateEntryPointMethod (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Structure Test1{0}" +
+                               "    {0}" +
+#if NET_2_0
+                               "    <A()>  _{0}" +
+#endif
+                               "    Public Shared Sub Main(){0}" +
+                               "        Dim x As Test.InnerType{0}" +
+                               "    End Sub{0}" +
+                               "End Structure{0}", NewLine), code);
                }
        }
 
@@ -2611,498 +2873,547 @@ namespace MonoTests.Microsoft.VisualBasic
                [Test]
                public override void DefaultTypeTest ()
                {
-                       string code = GenerateDefaultType ();
+                       string code = GenerateDefaultType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                [ExpectedException (typeof (NullReferenceException))]
                public override void NullTypeTest ()
                {
-                       GenerateNullType ();
+                       GenerateNullType (Options);
                }
 
                [Test]
                public override void SimpleTypeTest ()
                {
-                       string code = GenerateSimpleType ();
+                       string code = GenerateSimpleType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void DerivedTypeTest ()
                {
-                       string code = GenerateDerivedType ();
+                       string code = GenerateDerivedType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
 #if NET_2_0
                                "Friend Enum Test1 As Integer{0}" +
 #else
                                "Enum Test1 As Integer{0}" +
 #endif
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void AttributesAndTypeTest ()
                {
-                       string code = GenerateAttributesAndType ();
+                       string code = GenerateAttributesAndType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "<A(),  _{0}" +
                                " B()>  _{0}" + 
                                "Public Enum Test1{0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest1 ()
                {
-                       string code = GenerateEventMembersType1 ();
+                       string code = GenerateEventMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void EventMembersTypeTest2 ()
                {
-                       string code = GenerateEventMembersType2 ();
+                       string code = GenerateEventMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypes ()
                {
-                       string code = GenerateEventImplementationTypes ();
+                       string code = GenerateEventImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void EventPrivateImplementationType ()
                {
-                       string code = GenerateEventPrivateImplementationType ();
+                       string code = GenerateEventPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void EventImplementationTypeOrder ()
                {
-                       string code = GenerateEventImplementationTypeOrder ();
+                       string code = GenerateEventImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest1 ()
+               public override void FieldMembersAttributesTest ()
                {
-                       string code = GenerateFieldMembersType1 ();
+                       string code = GenerateFieldMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
                                "    <A(),  _{0}" +
                                "     B()>  _{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
-               public override void FieldMembersTypeTest2 ()
+               public override void FieldMembersTypeTest ()
                {
-                       string code = GenerateFieldMembersType2 ();
+                       string code = GenerateFieldMembersType (MemberAttributes.Public, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
                                "    Name = 2{0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void FieldNewSlotTest ()
+               {
+                       string code = GenerateFieldMembersType (MemberAttributes.Assembly |
+                               MemberAttributes.New, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Enum Test1{0}" +
+                               "    {0}" +
+                               "    Name = 2{0}" +
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest1 ()
                {
-                       string code = GeneratePropertyMembersAttributes ();
+                       string code = GeneratePropertyMembersAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeTest2 ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Public,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, false);
+                               true, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeSetOnly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, true);
+                               false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeGetSet ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Family,
-                               true, true);
+                               true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeFamilyOrAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.FamilyOrAssembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyMembersTypeAssembly ()
                {
                        string code = GeneratePropertyMembersType (MemberAttributes.Assembly,
-                               false, false);
+                               false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyParametersTest ()
                {
-                       string code = GeneratePropertyParameters ();
+                       string code = GeneratePropertyParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest1 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, true);
+                               false, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerTest2 ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Public,
-                               false, false, false);
+                               false, false, false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerGetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               true, false, true);
+                               true, false, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyIndexerSetOnly ()
                {
                        string code = GeneratePropertyIndexer (MemberAttributes.Family,
-                               false, true, true);
+                               false, true, true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypes ()
                {
-                       string code = GeneratePropertyImplementationTypes ();
+                       string code = GeneratePropertyImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest1 ()
                {
-                       string code = GeneratePropertyOverloads1 ();
+                       string code = GeneratePropertyOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest2 ()
                {
-                       string code = GeneratePropertyOverloads2 ();
+                       string code = GeneratePropertyOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyOverloadsTest3 ()
                {
-                       string code = GeneratePropertyOverloads3 ();
+                       string code = GeneratePropertyOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyPrivateImplementationType ()
                {
-                       string code = GeneratePropertyPrivateImplementationType ();
+                       string code = GeneratePropertyPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void PropertyImplementationTypeOrder ()
                {
-                       string code = GeneratePropertyImplementationTypeOrder ();
+                       string code = GeneratePropertyImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void PropertyNewSlotTest ()
+               {
+                       string code = GeneratePropertyMembersType (MemberAttributes.Private |
+                               MemberAttributes.New, true, true, Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Enum Test1{0}" +
+                               "    {0}" +
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest1 ()
                {
-                       string code = GenerateMethodMembersType1 ();
+                       string code = GenerateMethodMembersType1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest2 ()
                {
-                       string code = GenerateMethodMembersType2 ();
+                       string code = GenerateMethodMembersType2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodMembersTypeTest3 ()
                {
-                       string code = GenerateMethodMembersType3 ();
+                       string code = GenerateMethodMembersType3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypes ()
                {
-                       string code = GenerateMethodImplementationTypes ();
+                       string code = GenerateMethodImplementationTypes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest1 ()
                {
-                       string code = GenerateMethodOverloads1 ();
+                       string code = GenerateMethodOverloads1 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest2 ()
                {
-                       string code = GenerateMethodOverloads2 ();
+                       string code = GenerateMethodOverloads2 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodOverloadsTest3 ()
                {
-                       string code = GenerateMethodOverloads3 ();
+                       string code = GenerateMethodOverloads3 (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodPrivateImplementationType ()
                {
-                       string code = GenerateMethodPrivateImplementationType ();
+                       string code = GenerateMethodPrivateImplementationType (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodImplementationTypeOrder ()
                {
-                       string code = GenerateMethodImplementationTypeOrder ();
+                       string code = GenerateMethodImplementationTypeOrder (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void MethodReturnTypeAttributes ()
                {
-                       string code = GenerateMethodReturnTypeAttributes ();
+                       string code = GenerateMethodReturnTypeAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void MethodNewSlotTest ()
+               {
+                       string code = GenerateMethodNewSlot (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Enum Test1{0}" +
+                               "    {0}" +
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorAttributesTest ()
                {
-                       string code = GenerateConstructorAttributes ();
+                       string code = GenerateConstructorAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParametersTest ()
                {
-                       string code = GenerateConstructorParameters ();
+                       string code = GenerateConstructorParameters (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void ConstructorParameterAttributesTest ()
                {
-                       string code = GenerateConstructorParameterAttributes ();
+                       string code = GenerateConstructorParameterAttributes (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorSingleArg ()
                {
-                       string code = GenerateBaseConstructor (false);
+                       string code = GenerateBaseConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void BaseConstructorMultipleArgs ()
                {
-                       string code = GenerateBaseConstructor (true);
+                       string code = GenerateBaseConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorSingleArg ()
                {
-                       string code = GenerateChainedConstructor (false);
+                       string code = GenerateChainedConstructor (false, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void ChainedConstructorMultipleArgs ()
                {
-                       string code = GenerateChainedConstructor (true);
+                       string code = GenerateChainedConstructor (true, Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+                               "End Enum{0}", NewLine), code);
                }
 
                [Test]
                public override void TypeConstructorTest ()
                {
-                       string code = GenerateTypeConstructor ();
+                       string code = GenerateTypeConstructor (Options);
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "Public Enum Test1{0}" +
+                               "    {0}" +
+                               "End Enum{0}", NewLine), code);
+               }
+
+               [Test]
+               public override void EntryPointMethodTest ()
+               {
+                       string code = GenerateEntryPointMethod (Options);
                        Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
                                "Public Enum Test1{0}" +
                                "    {0}" +
-                               "End Enum{0}", Writer.NewLine), code);
+#if NET_2_0
+                               "    <A()>  _{0}" +
+#endif
+                               "    Public Shared Sub Main(){0}" +
+                               "        Dim x As Test.InnerType{0}" +
+                               "    End Sub{0}" +
+                               "End Enum{0}", NewLine), code);
                }
        }
 }