diff --git a/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs b/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs
index 9b76552edcf1ffd21b6703031f5d66fbed54c334..4a16682c7d23c3c64c3a5945959bf1a161e68888 100644
--- a/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs
+++ b/src/Features/CSharp/Portable/CSharpFeaturesResources.Designer.cs
@@ -88,6 +88,15 @@ internal class CSharpFeaturesResources {
}
}
+ ///
+ /// Looks up a localized string similar to Allow unsafe code in this project.
+ ///
+ internal static string Allow_unsafe_code_in_this_project {
+ get {
+ return ResourceManager.GetString("Allow_unsafe_code_in_this_project", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to anonymous method.
///
@@ -548,7 +557,16 @@ internal class CSharpFeaturesResources {
}
}
- ///
+ ///
+ /// Looks up a localized string similar to Invert if statement.
+ ///
+ internal static string Invert_if_statement {
+ get {
+ return ResourceManager.GetString("Invert_if_statement", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to is pattern.
///
internal static string is_pattern {
diff --git a/src/Features/CSharp/Portable/CSharpFeaturesResources.resx b/src/Features/CSharp/Portable/CSharpFeaturesResources.resx
index 33729d573f118a0700bf7009adadcdfa2eaf416c..74971f5f76f6caf3f65c79d73b5c6a7ccf4813e1 100644
--- a/src/Features/CSharp/Portable/CSharpFeaturesResources.resx
+++ b/src/Features/CSharp/Portable/CSharpFeaturesResources.resx
@@ -524,4 +524,7 @@
Convert 'for' to 'foreach'
+
+ Allow unsafe code in this project
+
\ No newline at end of file
diff --git a/src/Features/CSharp/Portable/UnsafeProject/CSharpUnsafeProjectCodeFixProvider.cs b/src/Features/CSharp/Portable/UnsafeProject/CSharpUnsafeProjectCodeFixProvider.cs
index f5945e2501b2ebaccf6c14106571543ebe43b158..af4573c76ce3846bbac625a3df70992e9440e3dc 100644
--- a/src/Features/CSharp/Portable/UnsafeProject/CSharpUnsafeProjectCodeFixProvider.cs
+++ b/src/Features/CSharp/Portable/UnsafeProject/CSharpUnsafeProjectCodeFixProvider.cs
@@ -16,12 +16,10 @@ internal class CSharpUnsafeProjectCodeFixProvider : CodeFixProvider
public override ImmutableArray FixableDiagnosticIds { get; } =
ImmutableArray.Create(CS0227);
- private string UnsafeThisProjectResource => "Allow unsafe code in this project";
-
public override Task RegisterCodeFixesAsync(CodeFixContext context)
{
- context.RegisterCodeFix(new ProjectOptionsChangeAction(UnsafeThisProjectResource, _ =>
- Task.FromResult(AllowUnsafeOnProject(context.Document.Project))), context.Diagnostics);
+ context.RegisterCodeFix(new ProjectOptionsChangeAction(CSharpFeaturesResources.Allow_unsafe_code_in_this_project,
+ _ => Task.FromResult(AllowUnsafeOnProject(context.Document.Project))), context.Diagnostics);
return Task.CompletedTask;
}
diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf
index 1bd06a1edf3aea1c67321497d4bf431baa12c8c3..ffca106719fcc2f516d5acd0136c16c9b5de0c87 100644
--- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf
+++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf
@@ -637,6 +637,11 @@
Convert 'for' to 'foreach'
+
+ Allow unsafe code in this project
+ Allow unsafe code in this project
+
+