Compat issues with assembly System.Private.CoreLib:
TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComActivationContextInternal' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComActivator' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.InMemoryAssemblyLoader' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer<T>' in the implementation but not the reference.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer<T>' in the implementation but not the reference.
-MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
-CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
-TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
\ No newline at end of file
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\ICastableHelpers.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeFeature.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\TypeDependencyAttribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\ControlledExecution.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\DependentHandle.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\GCSettings.CoreCLR.cs" />
namespace Internal.Runtime.InteropServices
{
[StructLayout(LayoutKind.Sequential)]
- [CLSCompliant(false)]
- public unsafe struct ComActivationContextInternal
+ internal unsafe struct ComActivationContextInternal
{
public Guid ClassId;
public Guid InterfaceId;
namespace Internal.Runtime.InteropServices
{
- public static class ComActivator
+ internal static class ComActivator
{
/// <summary>
/// Internal entry point for unmanaged COM activation API from native code
}
[SupportedOSPlatform("windows")]
- public static class ComActivator
+ internal static class ComActivator
{
// Collection of all ALCs used for COM activation. In the event we want to support
// unloadable COM server ALCs, this will need to be changed.
namespace Internal.Runtime.InteropServices
{
- public static partial class ComponentActivator
+ internal static partial class ComponentActivator
{
// This hook for when GetFunctionPointer is called when the feature is disabled allows us to
// provide error messages for known hosting scenarios such as C++/CLI.
/// <summary>
/// This class enables the .NET IJW host to load an in-memory module as a .NET assembly
/// </summary>
- public static class InMemoryAssemblyLoader
+ internal static class InMemoryAssemblyLoader
{
/// <summary>
/// Loads into an isolated AssemblyLoadContext an assembly that has already been loaded into memory by the OS loader as a native module.
/// This class enables the .NET IJW host to load an in-memory module as a .NET assembly
/// </summary>
[SupportedOSPlatform("windows")]
- public static class InMemoryAssemblyLoader
+ internal static class InMemoryAssemblyLoader
{
private static bool IsSupported { get; } = InitializeIsSupported();
private static bool InitializeIsSupported() => AppContext.TryGetSwitch("System.Runtime.InteropServices.EnableCppCLIHostActivation", out bool isSupported) ? isSupported : true;
int BinarySearch(TKey[] keys, int index, int length, TKey value, IComparer<TKey>? comparer);
}
- [TypeDependency("System.Collections.Generic.GenericArraySortHelper`1")]
internal sealed partial class ArraySortHelper<T>
: IArraySortHelper<T>
{
void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer);
}
- [TypeDependency("System.Collections.Generic.GenericArraySortHelper`2")]
internal sealed partial class ArraySortHelper<TKey, TValue>
: IArraySortHelper<TKey, TValue>
{
namespace System.Collections.Generic
{
- [TypeDependency("System.Collections.Generic.ObjectComparer`1")]
public abstract partial class Comparer<T> : IComparer, IComparer<T>
{
// To minimize generic instantiation overhead of creating the comparer per type, we keep the generic portion of the code as small
namespace System.Collections.Generic
{
- [TypeDependency("System.Collections.Generic.ObjectEqualityComparer`1")]
public abstract partial class EqualityComparer<T> : IEqualityComparer, IEqualityComparer<T>
{
// To minimize generic instantiation overhead of creating the comparer per type, we keep the generic portion of the code as small
[DoesNotReturn]
[MethodImpl(MethodImplOptions.InternalCall)]
- public static extern void FailFast(string? message, Exception? exception, string? errorMessage);
+ internal static extern void FailFast(string? message, Exception? exception, string? errorMessage);
private static string[]? s_commandLineArgs;
internal RuntimeModule InternalModule => _internalModule;
- protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(InternalModule);
+ private protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(InternalModule);
internal static RuntimeModule GetRuntimeModuleFromModule(Module? m)
{
return m_runtimeAssembly;
}
- protected override ModuleHandle GetModuleHandleImpl()
+ private protected override ModuleHandle GetModuleHandleImpl()
{
return new ModuleHandle(this);
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.CompilerServices
-{
- // We might want to make this inherited someday. But I suspect it shouldn't
- // be necessary.
- [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
- internal sealed class TypeDependencyAttribute : Attribute
- {
- private readonly string typeName;
-
- public TypeDependencyAttribute(string typeName)
- {
- ArgumentNullException.ThrowIfNull(typeName);
-
- this.typeName = typeName;
- }
- }
-}
// This field is not a regular GC handle. It can have a special values that are used to prevent a race condition between setting the target and finalization.
internal IntPtr m_handle;
- // Migrating InheritanceDemands requires this default ctor, so we can mark it SafeCritical
- protected WeakReference()
- {
- Debug.Fail("WeakReference's protected default ctor should never be used!");
- throw new NotImplementedException();
- }
-
// Determines whether or not this instance of WeakReference still refers to an object
// that has not been collected.
//
TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeFieldHandleInfo' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeMethodHandleInfo' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeSignature' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.TypeSystem.ExceptionStringID' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.TypeSystem.LockFreeReaderHashtable<TKey, TValue>' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Array<T>' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.MDArray' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public void System.ModuleHandle..ctor(System.Reflection.Module)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.Boolean System.TypedReference.IsNull.get()' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Diagnostics.DebugAnnotations' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Diagnostics.DebuggerGuidedStepThroughAttribute' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
-CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
TypesMustExist : Type 'System.Diagnostics.Tracing.PropertyValue' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
TypesMustExist : Type 'System.Reflection.AssemblyRuntimeNameHelpers' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.BinderBundle' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.DynamicInvokeInfo' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.EnumInfo' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.Reflection.ParameterInfo[] System.Reflection.MethodBase.GetParametersNoCopy()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.Reflection.MethodBase System.Reflection.MethodBase.MetadataDefinitionMethod.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.RuntimeAssembly' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.RuntimeAssemblyName' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.MetadataReaderExtensions' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.QSignatureTypeHandle' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.QTypeDefinition' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.QTypeDefRefOrSpec' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Resources.RuntimeResourceSet' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.ExceptionIDs' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.RhFailFastReason' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.InteropExtensions' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.NativeFunctionPointerWrapper' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.PInvokeMarshal' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.UnsafeGCHandle' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Threading.Condition' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Threading.Lock' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Threading.LockHolder' does not exist in the reference but it does exist in the implementation.
\ No newline at end of file
[RequiresUnreferencedCode("Trimming changes metadata tokens")]
public sealed override Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw new PlatformNotSupportedException(); }
- protected sealed override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(this);
+ private protected sealed override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(this);
}
}
#define g_UnmanagedCallersOnlyAttribute "System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute"
#define g_FixedBufferAttribute "System.Runtime.CompilerServices.FixedBufferAttribute"
-#define g_CompilerServicesTypeDependencyAttribute "System.Runtime.CompilerServices.TypeDependencyAttribute"
-
#define g_ReferenceAssemblyAttribute "System.Runtime.CompilerServices.ReferenceAssemblyAttribute"
#define g_CriticalFinalizerObjectName "CriticalFinalizerObject"
// Use the same injection status as typical instantiation
bmtInterface->dbg_fShouldInjectInterfaceDuplicates =
bmtGenerics->Debug_GetTypicalMethodTable()->Debug_HasInjectedInterfaceDuplicates();
-
- if (GetModule() == g_pObjectClass->GetModule())
- { // CoreLib has some weird hardcoded information about interfaces (e.g.
- // code:CEEPreloader::ApplyTypeDependencyForSZArrayHelper), so we don't inject duplicates into
- // CoreLib types
- bmtInterface->dbg_fShouldInjectInterfaceDuplicates = FALSE;
- }
}
#endif //_DEBUG
Compat issues with assembly System.Collections:
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer<T>' in the implementation but not the reference.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer<T>' in the implementation but not the reference.
TypesMustExist : Type 'System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyValuePairComparer' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.SortedList<TKey, TValue>.KeyList' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.SortedList<TKey, TValue>.ValueList' does not exist in the reference but it does exist in the implementation.
<!-- Used by VS4Mac via reflection to symbolize stack traces -->
<method name="GetMethodFromNativeIP" />
</type>
+ <type fullname="System.Runtime.Serialization.SerializationInfo">
+ <!-- Used by System.Runtime.Serialization.Formatters via reflection -->
+ <method name="UpdateValue" />
+ <method name="ThrowIfDeserializationInProgress" />
+ </type>
+ <type fullname="Internal.Runtime.InteropServices.ComActivator">
+ <!-- Used by hostpolicy.cpp -->
+ <method name="GetClassFactoryForTypeInternal" />
+ <method name="RegisterClassForTypeInternal" />
+ <method name="UnregisterClassForTypeInternal" />
+ </type>
+ <type fullname="Internal.Runtime.InteropServices.InMemoryAssemblyLoader">
+ <!-- Used by hostpolicy.cpp -->
+ <method name="LoadInMemoryAssembly" />
+ <!-- Used by ijwhost.cpp -->
+ <method name="LoadInMemoryAssemblyInContext" />
+ </type>
+ <type fullname="Internal.Runtime.InteropServices.ComponentActivator">
+ <!-- Used by hostpolicy.cpp -->
+ <method name="LoadAssemblyAndGetFunctionPointer" />
+ <method name="GetFunctionPointer" />
+ </type>
</assembly>
</linker>
namespace Internal.Runtime.InteropServices
{
- public static partial class ComponentActivator
+ internal static partial class ComponentActivator
{
private const string TrimIncompatibleWarningMessage = "Native hosting is not trim compatible and this warning will be seen if trimming is enabled.";
private const string NativeAOTIncompatibleWarningMessage = "The native code for the method requested might not be available at runtime.";
#pragma warning disable CS0067 // events raised by the VM
[field: DynamicDependency(DynamicallyAccessedMemberTypes.PublicConstructors, typeof(UnhandledExceptionEventArgs))]
- public static event UnhandledExceptionEventHandler? UnhandledException;
+ internal static event UnhandledExceptionEventHandler? UnhandledException;
[field: DynamicDependency(DynamicallyAccessedMemberTypes.PublicConstructors, typeof(FirstChanceExceptionEventArgs))]
- public static event EventHandler<FirstChanceExceptionEventArgs>? FirstChanceException;
+ internal static event EventHandler<FirstChanceExceptionEventArgs>? FirstChanceException;
#pragma warning restore CS0067
- public static event EventHandler? ProcessExit;
+ internal static event EventHandler? ProcessExit;
internal static void OnProcessExit()
{
}
}
- protected void Flush()
+ private void Flush()
{
Debug.Assert(Monitor.IsEntered(this));
for (int i = 0; i < _bufferedValues.Length; i++)
/// created.
/// </para>
/// </summary>
- public class EventListener : IDisposable
+ public abstract class EventListener : IDisposable
{
private event EventHandler<EventSourceCreatedEventArgs>? _EventSourceCreated;
/// Create a new EventListener in which all events start off turned off (use EnableEvents to turn
/// them on).
/// </summary>
- public EventListener()
+ protected EventListener()
{
// This will cause the OnEventSourceCreated callback to fire.
CallBackForExistingEventSources(true, (obj, args) =>
/// and EventSourceIndex allows this extra information to be efficiently stored in a
/// (growable) array (eg List(T)).
/// </summary>
- public static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
+ protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
/// <summary>
/// This method is called whenever a new eventSource is 'attached' to the dispatcher.
/// TraceLogging: Used when calling EventSource.WriteMultiMerge.
/// Stores the type information to use when writing the event fields.
/// </summary>
- public class TraceLoggingEventTypes
+ internal sealed class TraceLoggingEventTypes
{
internal readonly TraceLoggingTypeInfo[] typeInfos;
#if FEATURE_PERFTRACING
FileSystem.RemoveDirectory(FullPath, recursive);
Invalidate();
}
+
+ public override bool Exists
+ {
+ get
+ {
+ try
+ {
+ return ExistsCore;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ }
}
}
Invalidate();
}
+ public override bool Exists
+ {
+ get
+ {
+ try
+ {
+ return ExistsCore;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ }
+
public FileStream Open(FileMode mode)
=> Open(mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.None);
}
}
- public virtual string Name
- {
- get
- {
- Debug.Fail("Property is abstract in the ref assembly and both Directory/FileInfo override it.");
- return _name!;
- }
- }
+ public abstract string Name { get; }
// Whether a file/directory exists
- public virtual bool Exists
- {
- get
- {
- try
- {
- return ExistsCore;
- }
- catch
- {
- return false;
- }
- }
- }
+ public abstract bool Exists { get; }
// Delete a file/directory
public abstract void Delete();
public virtual Guid ModuleVersionId => throw NotImplemented.ByDesign;
public virtual string ScopeName => throw NotImplemented.ByDesign;
public ModuleHandle ModuleHandle => GetModuleHandleImpl();
- protected virtual ModuleHandle GetModuleHandleImpl() => ModuleHandle.EmptyHandle; // Not an api but declared protected because of Reflection.Core/Corelib divide (when built by NativeAOT)
+ private protected virtual ModuleHandle GetModuleHandleImpl() => ModuleHandle.EmptyHandle;
public virtual void GetPEKind(out PortableExecutableKinds peKind, out ImageFileMachine machine) { throw NotImplemented.ByDesign; }
public virtual bool IsResource() { throw NotImplemented.ByDesign; }
public ResourceSet? lastResourceSet;
}
- protected string BaseNameField;
+ protected string BaseNameField; // The field is protected for .NET Framework compatibility
protected Assembly? MainAssembly; // Need the assembly manifest sometimes.
private Dictionary<string, ResourceSet>? _resourceSets;
//
public class ResourceSet : IDisposable, IEnumerable
{
- protected IResourceReader Reader = null!;
+ protected IResourceReader? Reader; // The field is protected for .NET Framework compatibility
private Dictionary<object, object?>? _table;
private Dictionary<string, object?>? _caseInsensitiveTable; // For case-insensitive lookups.
[AttributeUsage(AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
public sealed class UnmanagedFunctionPointerAttribute : Attribute
{
- public UnmanagedFunctionPointerAttribute()
- {
- CallingConvention = CallingConvention.Winapi;
- }
-
public UnmanagedFunctionPointerAttribute(CallingConvention callingConvention)
{
CallingConvention = callingConvention;
t_deserializationTracker ??= new DeserializationTracker();
// Returns true if deserialization is currently in progress
- public static bool DeserializationInProgress
+ internal static bool DeserializationInProgress
{
get
{
}
}
- // Throws a SerializationException if dangerous deserialization is currently
- // in progress
- public static void ThrowIfDeserializationInProgress()
- {
- if (DeserializationInProgress)
- {
- throw new SerializationException(SR.Serialization_DangerousDeserialization);
- }
- }
-
// Throws a DeserializationBlockedException if dangerous deserialization is currently
// in progress and the AppContext switch Switch.System.Runtime.Serialization.SerializationGuard.{switchSuffix}
// is not true. The value of the switch is cached in cachedValue to avoid repeated lookups:
// 0: No value cached
// 1: The switch is true
// -1: The switch is false
- public static void ThrowIfDeserializationInProgress(string switchSuffix, ref int cachedValue)
+ internal static void ThrowIfDeserializationInProgress(string switchSuffix, ref int cachedValue)
{
const string SwitchPrefix = "Switch.System.Runtime.Serialization.SerializationGuard.";
Debug.Assert(!string.IsNullOrWhiteSpace(switchSuffix));
/// <param name="name"> The name of the data to be updated.</param>
/// <param name="value"> The new value.</param>
/// <param name="type"> The type of the data being added.</param>
- public void UpdateValue(string name, object value, Type type)
+ internal void UpdateValue(string name, object value, Type type)
{
Debug.Assert(null != name, "[SerializationInfo.UpdateValue]name!=null");
Debug.Assert(null != value, "[SerializationInfo.UpdateValue]value!=null");
Compat issues with assembly System.Private.CoreLib:
TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
-CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
-TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
\ No newline at end of file
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[DoesNotReturn]
- public static extern void FailFast(string? message, Exception? exception, string? errorSource);
+ internal static extern void FailFast(string? message, Exception? exception, string? errorSource);
}
}
internal IntPtr GetUnderlyingNativeHandle() { return _impl; }
- protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
+ private protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
[RequiresUnreferencedCode("Methods might be removed")]
protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
internal IntPtr GetUnderlyingNativeHandle() { return _impl; }
- protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
+ private protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
// This calls ves_icall_reflection_get_token, so needs a Module argument
[MethodImplAttribute(MethodImplOptions.InternalCall)]