From 6934c675b2fad1c6150ecaaa8aa589486295e90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Hompus?= Date: Tue, 11 Oct 2022 18:42:57 +0200 Subject: [PATCH 1/2] Fix smart quotes in snippets --- .../IPermission/Overview/Permission.cs | 4 ++-- .../Permission/vb/permission.vb | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/snippets/csharp/System.Security/IPermission/Overview/Permission.cs b/snippets/csharp/System.Security/IPermission/Overview/Permission.cs index 600950ce7ac..2a21fc54659 100644 --- a/snippets/csharp/System.Security/IPermission/Overview/Permission.cs +++ b/snippets/csharp/System.Security/IPermission/Overview/Permission.cs @@ -174,7 +174,7 @@ public override SecurityElement ToXml() { // These first three lines create an element with the required format. SecurityElement e = new SecurityElement("IPermission"); - // Replace the double quotation marks (“”) with single quotation marks (‘’) + // Replace the double quotation marks ("") with single quotation marks ('') // to remain XML compliant when the culture is not neutral. e.AddAttribute("class", GetType().AssemblyQualifiedName.Replace('\"', '\'')); e.AddAttribute("version", "1"); @@ -206,4 +206,4 @@ public Boolean IsUnrestricted() #endregion } -// \ No newline at end of file +// diff --git a/snippets/visualbasic/VS_Snippets_CLR/Permission/vb/permission.vb b/snippets/visualbasic/VS_Snippets_CLR/Permission/vb/permission.vb index 23c1571d7cb..04dc084c8f7 100644 --- a/snippets/visualbasic/VS_Snippets_CLR/Permission/vb/permission.vb +++ b/snippets/visualbasic/VS_Snippets_CLR/Permission/vb/permission.vb @@ -27,24 +27,24 @@ NotInheritable Public Class SoundPermission Private m_specifiedAsUnrestricted As [Boolean] = False Private m_flags As SoundPermissionState = SoundPermissionState.NoSound ' This constructor creates and initializes a permission with generic access. - Public Sub New(ByVal state As PermissionState) + Public Sub New(ByVal state As PermissionState) m_specifiedAsUnrestricted = state = PermissionState.Unrestricted - + End Sub - ' This constructor creates and initializes a permission with specific access. - Public Sub New(ByVal flags As SoundPermissionState) + ' This constructor creates and initializes a permission with specific access. + Public Sub New(ByVal flags As SoundPermissionState) If Not [Enum].IsDefined(GetType(SoundPermissionState), flags) Then Throw New ArgumentException("flags value is not valid for the SoundPermissionState enuemrated type") End If m_specifiedAsUnrestricted = False m_flags = flags - + End Sub ' For debugging, return the state of this object as XML. - Public Overrides Function ToString() As String + Public Overrides Function ToString() As String Return ToXml().ToString() - - End Function 'ToString + + End Function 'ToString ' Private method to cast (if possible) an IPermission to the type. Private Function VerifyTypeMatch(ByVal target As IPermission) As SoundPermission If [GetType]() <> target.GetType() Then @@ -53,7 +53,7 @@ NotInheritable Public Class SoundPermission Return CType(target, SoundPermission) End Function 'VerifyTypeMatch - ' This is the Private Clone helper method. + ' This is the Private Clone helper method. Private Function Clone(ByVal specifiedAsUnrestricted As [Boolean], ByVal flags As SoundPermissionState) As SoundPermission Dim soundPerm As SoundPermission = CType(Clone(), SoundPermission) soundPerm.m_specifiedAsUnrestricted = specifiedAsUnrestricted @@ -169,7 +169,7 @@ NotInheritable Public Class SoundPermission Public Overrides Function ToXml() As SecurityElement ' These first three lines create an element with the required format. Dim e As New SecurityElement("IPermission") - ' Replace the double quotation marks ("") with single quotation marks (‘’) + ' Replace the double quotation marks ("") with single quotation marks ('') ' to remain XML compliant when the culture is not neutral. e.AddAttribute("class", [GetType]().AssemblyQualifiedName.Replace(ControlChars.Quote, "'"c)) e.AddAttribute("version", "1") @@ -200,8 +200,8 @@ NotInheritable Public Class SoundPermission Public Function Clone() As [Object] Implements System.ICloneable.Clone Return MemberwiseClone() - End Function 'Clone + End Function 'Clone #End Region End Class -' \ No newline at end of file +' From c1cec2a7e2bcfce2d30dc81b10323cf5871ba8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Hompus?= Date: Tue, 11 Oct 2022 18:43:18 +0200 Subject: [PATCH 2/2] Fix smart quotes in markdown --- xml/System.Xaml.Schema/XamlTypeName.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Xaml.Schema/XamlTypeName.xml b/xml/System.Xaml.Schema/XamlTypeName.xml index 0f7008f116d..1b5ccfa70ec 100644 --- a/xml/System.Xaml.Schema/XamlTypeName.xml +++ b/xml/System.Xaml.Schema/XamlTypeName.xml @@ -312,11 +312,11 @@ ``` NestedTypeName = Name | Name '+' NestedTypeName -TypeName = NestedTypeName | NestedTypeName ‘[]’ -XamlTypeName = Prefix ‘:’ TypeName TypeArgs | TypeName TypeArgs -TypeArgs = empty | ‘(‘ XamlTypeNameList ‘)’ +TypeName = NestedTypeName | NestedTypeName '[]' +XamlTypeName = Prefix ':' TypeName TypeArgs | TypeName TypeArgs +TypeArgs = empty | '(' XamlTypeNameList ')' XamlTypeNameList = XamlTypeName XamlTypeNameList1 -XamlTypeNameList1 = empty | ‘,’ XamlTypeNameList +XamlTypeNameList1 = empty | ',' XamlTypeNameList ``` ]]>