Skip to content

Commit 43c2d98

Browse files
authored
Remove unnecessary CS0618 suppressions from Variant APIs (#26006)
1 parent 50d81d5 commit 43c2d98

3 files changed

Lines changed: 0 additions & 10 deletions

File tree

src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList/PropVariant.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ internal PropVariant(string value)
3434
throw new ArgumentException("PropVariantNullString", nameof(value));
3535
}
3636

37-
#pragma warning disable CS0618 // Type or member is obsolete (might get deprecated in future versions
3837
_valueType = (ushort)VarEnum.VT_LPWSTR;
39-
#pragma warning restore CS0618 // Type or member is obsolete (might get deprecated in future versions
4038
_ptr = Marshal.StringToCoTaskMemUni(value);
4139
}
4240

src/System.Management.Automation/engine/COM/ComInvoker.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
using COM = System.Runtime.InteropServices.ComTypes;
99

10-
// Disable obsolete warnings about VarEnum and COM-marshaling APIs in CoreCLR
11-
#pragma warning disable 618
12-
1310
namespace System.Management.Automation
1411
{
1512
internal static class ComInvoker

src/System.Management.Automation/engine/COM/ComUtil.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ private static string GetStringFromCustomType(COM.ITypeInfo typeinfo, IntPtr ref
141141
return "UnknownCustomtype";
142142
}
143143

144-
// Disable obsolete warning about VarEnum in CoreCLR
145-
#pragma warning disable 618
146-
147144
/// <summary>
148145
/// This function gets a string representation of the Type Descriptor
149146
/// This is used in generating signature for Properties and Methods.
@@ -259,8 +256,6 @@ internal static Type GetTypeFromTypeDesc(COM.TYPEDESC typedesc)
259256
return VarEnumSelector.GetTypeForVarEnum(vt);
260257
}
261258

262-
#pragma warning restore 618
263-
264259
/// <summary>
265260
/// Converts a FuncDesc out of GetFuncDesc into a MethodInformation.
266261
/// </summary>

0 commit comments

Comments
 (0)