Skip to content

Commit 5d47558

Browse files
authored
Delete some dead code (#68333)
1 parent 3f6893d commit 5d47558

File tree

18 files changed

+7
-1119
lines changed

18 files changed

+7
-1119
lines changed

src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/WithType.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,6 @@ public PropWithType(SymWithType swt)
171171
}
172172
}
173173

174-
internal sealed class EventWithType : SymWithType
175-
{
176-
public EventWithType(EventSymbol @event, AggregateType ats)
177-
{
178-
Set(@event, ats);
179-
}
180-
}
181-
182174
internal sealed class FieldWithType : SymWithType
183175
{
184176
public FieldWithType(FieldSymbol field, AggregateType ats)

src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ public SyntaxErrorException(string? s) : base(s) { }
5252
public SyntaxErrorException(string? message, Exception? innerException) : base(message, innerException) { }
5353
}
5454

55-
internal sealed class ExprException
55+
internal static class ExprException
5656
{
57-
private ExprException() { /* prevent utility class from being insantiated*/ }
58-
5957
private static OverflowException _Overflow(string error)
6058
{
6159
OverflowException e = new OverflowException(error);

src/libraries/System.Data.Common/src/System/Data/Filter/Operators.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
namespace System.Data
55
{
6-
internal sealed class Operators
6+
internal static class Operators
77
{
8-
private Operators() { /* prevent utility class from being insantiated*/ }
9-
108
internal const int Noop = 0;
119

1210
/* Unary operations */

src/libraries/System.Data.Common/src/System/Data/XmlKeywords.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
namespace System.Data
55
{
6-
internal sealed class Keywords
6+
internal static class Keywords
77
{
8-
private Keywords() { /* prevent utility class from being insantiated*/ }
9-
108
// Keywords for DataSet Namespace
119
internal const string DFF = "diffgr";
1210
internal const string DFFNS = "urn:schemas-microsoft-com:xml-diffgram-v1";

src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcEnvironment.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55

66
namespace System.Data.Odbc
77
{
8-
internal sealed class OdbcEnvironment
8+
internal static class OdbcEnvironment
99
{
1010
private static object? s_globalEnvironmentHandle;
1111
private static readonly object s_globalEnvironmentHandleLock = new object();
1212

13-
private OdbcEnvironment() { } // default const.
14-
1513
internal static OdbcEnvironmentHandle GetGlobalEnvironmentHandle()
1614
{
1715
OdbcEnvironmentHandle? globalEnvironmentHandle = s_globalEnvironmentHandle as OdbcEnvironmentHandle;

src/libraries/System.Net.Security/src/System/Net/NTAuthentication.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -88,34 +88,6 @@ internal bool IsNTLM
8888
}
8989
}
9090

91-
private sealed class InitializeCallbackContext
92-
{
93-
internal InitializeCallbackContext(NTAuthentication thisPtr, bool isServer, string package, NetworkCredential credential, string spn, ContextFlagsPal requestedContextFlags, ChannelBinding channelBinding)
94-
{
95-
ThisPtr = thisPtr;
96-
IsServer = isServer;
97-
Package = package;
98-
Credential = credential;
99-
Spn = spn;
100-
RequestedContextFlags = requestedContextFlags;
101-
ChannelBinding = channelBinding;
102-
}
103-
104-
internal readonly NTAuthentication ThisPtr;
105-
internal readonly bool IsServer;
106-
internal readonly string Package;
107-
internal readonly NetworkCredential Credential;
108-
internal readonly string Spn;
109-
internal readonly ContextFlagsPal RequestedContextFlags;
110-
internal readonly ChannelBinding ChannelBinding;
111-
}
112-
113-
private static void InitializeCallback(object state)
114-
{
115-
InitializeCallbackContext context = (InitializeCallbackContext)state;
116-
context.ThisPtr.Initialize(context.IsServer, context.Package, context.Credential, context.Spn, context.RequestedContextFlags, context.ChannelBinding);
117-
}
118-
11991
internal int Encrypt(ReadOnlySpan<byte> buffer, [NotNull] ref byte[]? output, uint sequenceNumber)
12092
{
12193
return NegotiateStreamPal.Encrypt(

src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -884,21 +884,6 @@ private void DisposeCachedTaskSocketAsyncEventArgs()
884884
Interlocked.Exchange(ref _singleBufferSendEventArgs, null)?.Dispose();
885885
}
886886

887-
/// <summary>A TaskCompletionSource that carries an extra field of strongly-typed state.</summary>
888-
private sealed class StateTaskCompletionSource<TField1, TResult> : TaskCompletionSource<TResult>
889-
{
890-
internal TField1 _field1 = default!; // always set on construction
891-
public StateTaskCompletionSource(object baseState) : base(baseState) { }
892-
}
893-
894-
/// <summary>A TaskCompletionSource that carries several extra fields of strongly-typed state.</summary>
895-
private sealed class StateTaskCompletionSource<TField1, TField2, TResult> : TaskCompletionSource<TResult>
896-
{
897-
internal TField1 _field1 = default!; // always set on construction
898-
internal TField2 _field2 = default!; // always set on construction
899-
public StateTaskCompletionSource(object baseState) : base(baseState) { }
900-
}
901-
902887
/// <summary>A SocketAsyncEventArgs with an associated async method builder.</summary>
903888
private sealed class TaskSocketAsyncEventArgs<TResult> : SocketAsyncEventArgs
904889
{

src/libraries/System.Private.Xml/src/System.Private.Xml.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,6 @@
702702
<Compile Include="System\Xml\Xsl\XsltOld\CopyNamespacesAction.cs" />
703703
<Compile Include="System\Xml\Xsl\XsltOld\CopyNodeSetAction.cs" />
704704
<Compile Include="System\Xml\Xsl\XsltOld\CopyOfAction.cs" />
705-
<Compile Include="System\Xml\Xsl\XsltOld\DbgCompiler.cs" />
706705
<Compile Include="System\Xml\Xsl\XsltOld\DocumentScope.cs" />
707706
<Compile Include="System\Xml\Xsl\XsltOld\ElementAction.cs" />
708707
<Compile Include="System\Xml\Xsl\XsltOld\EndEvent.cs" />

src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ApplyTemplatesAction.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,7 @@ internal override bool CompileAttribute(Compiler compiler)
6363
else if (Ref.Equal(name, compiler.Atoms.Mode))
6464
{
6565
Debug.Assert(_mode == null);
66-
if (compiler.AllowBuiltInMode && value == "*")
67-
{
68-
_mode = Compiler.BuiltInMode;
69-
}
70-
else
71-
{
72-
_mode = compiler.CreateXPathQName(value);
73-
}
66+
_mode = compiler.CreateXPathQName(value);
7467
}
7568
else
7669
{

src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Compiler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ internal class Compiler
9191
private int _rtfCount;
9292

9393
// Used to load Built In templates
94-
public bool AllowBuiltInMode;
9594
public static XmlQualifiedName BuiltInMode = new XmlQualifiedName("*", string.Empty);
9695

9796
internal KeywordsTable Atoms

0 commit comments

Comments
 (0)