diff --git a/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs b/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs index f6b9a7807..27a3ae051 100644 --- a/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs +++ b/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs @@ -747,7 +747,7 @@ public void WriteInterfaceImplementedMembersAlternative (InterfaceGen @interface if (!@interface.HasManagedName) { writer.WriteLine ("{0}[Register (\"{1}\"{2}, DoNotGenerateAcw=true)]", indent, @interface.RawJniName, @interface.AdditionalAttributeString ()); - writer.WriteLine ("{0}[global::System.Obsolete (\"Use the '{1}' type. This type will be removed in a future release.\")]", indent, name); + writer.WriteLine ("{0}[global::System.Obsolete (\"Use the '{1}' type. This type will be removed in a future release.\", error: true)]", indent, name); writer.WriteLine ("{0}public abstract class {1}Consts : {1} {{", indent, name); writer.WriteLine (); writer.WriteLine ("{0}\tprivate {1}Consts ()", indent, name); diff --git a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteInterface.txt b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteInterface.txt index fbe593e4b..ee17b0686 100644 --- a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteInterface.txt +++ b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteInterface.txt @@ -20,7 +20,7 @@ public abstract class MyInterface : Java.Lang.Object { } [Register ("java/code/IMyInterface", DoNotGenerateAcw=true)] -[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.")] +[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)] public abstract class MyInterfaceConsts : MyInterface { private MyInterfaceConsts () diff --git a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteStaticInterfaceMethod.txt b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteStaticInterfaceMethod.txt index fb7207ac3..c24a6a08b 100644 --- a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteStaticInterfaceMethod.txt +++ b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/JavaInterop1/WriteStaticInterfaceMethod.txt @@ -20,7 +20,7 @@ public abstract class MyInterface : Java.Lang.Object { } [Register ("java/code/IMyInterface", DoNotGenerateAcw=true)] -[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.")] +[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)] public abstract class MyInterfaceConsts : MyInterface { private MyInterfaceConsts () diff --git a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteInterface.txt b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteInterface.txt index 05da6b4a3..9819c1e8b 100644 --- a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteInterface.txt +++ b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteInterface.txt @@ -20,7 +20,7 @@ public abstract class MyInterface : Java.Lang.Object { } [Register ("java/code/IMyInterface", DoNotGenerateAcw=true)] -[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.")] +[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)] public abstract class MyInterfaceConsts : MyInterface { private MyInterfaceConsts () diff --git a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteStaticInterfaceMethod.txt b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteStaticInterfaceMethod.txt index 34da51485..8404436de 100644 --- a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteStaticInterfaceMethod.txt +++ b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteStaticInterfaceMethod.txt @@ -20,7 +20,7 @@ public abstract class MyInterface : Java.Lang.Object { } [Register ("java/code/IMyInterface", DoNotGenerateAcw=true)] -[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.")] +[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)] public abstract class MyInterfaceConsts : MyInterface { private MyInterfaceConsts () diff --git a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt index b3f1ef9ba..2d850820e 100644 --- a/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt +++ b/tools/generator/Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt @@ -22,7 +22,7 @@ public abstract class MyInterface : Java.Lang.Object { } [Register ("java/code/IMyInterface", DoNotGenerateAcw=true)] -[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.")] +[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)] public abstract class MyInterfaceConsts : MyInterface { private MyInterfaceConsts () diff --git a/tools/generator/Tests/expected.ji/TestInterface/Test.ME.ITestInterface.cs b/tools/generator/Tests/expected.ji/TestInterface/Test.ME.ITestInterface.cs index d68b1a7d0..3eb42e853 100644 --- a/tools/generator/Tests/expected.ji/TestInterface/Test.ME.ITestInterface.cs +++ b/tools/generator/Tests/expected.ji/TestInterface/Test.ME.ITestInterface.cs @@ -32,7 +32,7 @@ internal TestInterface () } [Register ("test/me/TestInterface", DoNotGenerateAcw=true)] - [global::System.Obsolete ("Use the 'TestInterface' type. This type will be removed in a future release.")] + [global::System.Obsolete ("Use the 'TestInterface' type. This type will be removed in a future release.", error: true)] public abstract class TestInterfaceConsts : TestInterface { private TestInterfaceConsts () diff --git a/tools/generator/Tests/expected/TestInterface/Test.ME.ITestInterface.cs b/tools/generator/Tests/expected/TestInterface/Test.ME.ITestInterface.cs index 0276cf957..640141dfc 100644 --- a/tools/generator/Tests/expected/TestInterface/Test.ME.ITestInterface.cs +++ b/tools/generator/Tests/expected/TestInterface/Test.ME.ITestInterface.cs @@ -32,7 +32,7 @@ internal TestInterface () } [Register ("test/me/TestInterface", DoNotGenerateAcw=true)] - [global::System.Obsolete ("Use the 'TestInterface' type. This type will be removed in a future release.")] + [global::System.Obsolete ("Use the 'TestInterface' type. This type will be removed in a future release.", error: true)] public abstract class TestInterfaceConsts : TestInterface { private TestInterfaceConsts ()