Skip to content

Commit a79c96b

Browse files
committed
Mark all Parsing code as depricated
1 parent 2c25add commit a79c96b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+116
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Microsoft.Toolkit.Parsers
2+
{
3+
internal static class Constants
4+
{
5+
internal const string ParserObsoleteMsg = "Parsing code has been deprecated.";
6+
}
7+
}

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Core/IParser.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Collections.Generic;
67

78
namespace Microsoft.Toolkit.Parsers
@@ -10,6 +11,7 @@ namespace Microsoft.Toolkit.Parsers
1011
/// Parser interface.
1112
/// </summary>
1213
/// <typeparam name="T">Type to parse into.</typeparam>
14+
[Obsolete(Constants.ParserObsoleteMsg)]
1315
public interface IParser<out T>
1416
where T : SchemaBase
1517
{

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Core/ParseHelpers.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
6+
57
namespace Microsoft.Toolkit.Parsers.Core
68
{
79
/// <summary>
810
/// This class offers helpers for Parsing.
911
/// </summary>
12+
[Obsolete(Constants.ParserObsoleteMsg)]
1013
public static class ParseHelpers
1114
{
1215
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Core/SchemaBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
6+
57
namespace Microsoft.Toolkit.Parsers
68
{
79
/// <summary>
810
/// Strong typed schema base class.
911
/// </summary>
12+
[Obsolete(Constants.ParserObsoleteMsg)]
1013
public abstract class SchemaBase
1114
{
1215
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Core/StringValueAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Microsoft.Toolkit.Parsers.Core
1010
/// The StringValue attribute is used as a helper to decorate enum values with string representations.
1111
/// </summary>
1212
[AttributeUsage(AttributeTargets.Field)]
13+
[Obsolete(Constants.ParserObsoleteMsg)]
1314
public sealed class StringValueAttribute : Attribute
1415
{
1516
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Markdown/Blocks/CodeBlock.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Text;
67
using Microsoft.Toolkit.Parsers.Markdown.Helpers;
78

@@ -11,6 +12,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
1112
/// Represents a block of text that is displayed in a fixed-width font. Inline elements and
1213
/// escape sequences are ignored inside the code block.
1314
/// </summary>
15+
[Obsolete(Constants.ParserObsoleteMsg)]
1416
public class CodeBlock : MarkdownBlock
1517
{
1618
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Markdown/Blocks/HeaderBlock.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
1414
/// <seealso href="https://spec.commonmark.org/0.29/#atx-headings">Single-Line Header CommonMark Spec</seealso>
1515
/// <seealso href="https://spec.commonmark.org/0.29/#setext-headings">Two-Line Header CommonMark Spec</seealso>
1616
/// </summary>
17+
[Obsolete(Constants.ParserObsoleteMsg)]
1718
public class HeaderBlock : MarkdownBlock
1819
{
1920
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Markdown/Blocks/HorizontalRuleBlock.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using Microsoft.Toolkit.Parsers.Core;
67

78
namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
89
{
910
/// <summary>
1011
/// Represents a horizontal line.
1112
/// </summary>
13+
[Obsolete(Constants.ParserObsoleteMsg)]
1214
public class HorizontalRuleBlock : MarkdownBlock
1315
{
1416
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Markdown/Blocks/LinkReferenceBlock.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using Microsoft.Toolkit.Parsers.Core;
67
using Microsoft.Toolkit.Parsers.Markdown.Inlines;
78

@@ -10,6 +11,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
1011
/// <summary>
1112
/// Represents the target of a reference ([ref][]).
1213
/// </summary>
14+
[Obsolete(Constants.ParserObsoleteMsg)]
1315
public class LinkReferenceBlock : MarkdownBlock
1416
{
1517
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Parsers/Markdown/Blocks/List/ListItemBlock.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Collections.Generic;
67

78
namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
89
{
910
/// <summary>
1011
/// This specifies the Content of the List element.
1112
/// </summary>
13+
[Obsolete(Constants.ParserObsoleteMsg)]
1214
public class ListItemBlock
1315
{
1416
/// <summary>

0 commit comments

Comments
 (0)