Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor/Core/Def/ContentType/FileNameAttribute.cs')
-rw-r--r--src/Editor/Core/Def/ContentType/FileNameAttribute.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Editor/Core/Def/ContentType/FileNameAttribute.cs b/src/Editor/Core/Def/ContentType/FileNameAttribute.cs
new file mode 100644
index 0000000..93c270c
--- /dev/null
+++ b/src/Editor/Core/Def/ContentType/FileNameAttribute.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+
+namespace Microsoft.VisualStudio.Utilities
+{
+ /// <summary>
+ /// Identifies a file name.
+ /// </summary>
+ public sealed class FileNameAttribute : SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Constructs a new instance of the attribute.
+ /// </summary>
+ /// <param name="fileName">The file extension.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="fileName"/> is null or empty.</exception>
+ public FileNameAttribute(string fileName)
+ {
+ if (string.IsNullOrWhiteSpace(fileName))
+ {
+ throw new ArgumentNullException(nameof(fileName));
+ }
+
+ this.FileName = fileName;
+ }
+
+ /// <summary>
+ /// Gets the file name.
+ /// </summary>
+ public string FileName
+ {
+ get;
+ }
+ }
+}