diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs
index ca99a2294..c4c0430e5 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs
@@ -55,7 +55,7 @@ public WindowsRuntimeObjectReference As(in Guid iid)
/// The COM object pointer for the requested interface.
/// Thrown if the current instance has been disposed.
/// Thrown if the QueryInterface call fails for any reason.
- public void* AsUnsafe(in Guid iid)
+ internal void* AsUnsafe(in Guid iid)
{
AsUnsafe(in iid, out void* pv);
@@ -69,13 +69,13 @@ public WindowsRuntimeObjectReference As(in Guid iid)
/// The resulting COM object pointer to retrieve.
/// Thrown if the current instance has been disposed.
/// Thrown if the QueryInterface call fails for any reason.
- public void AsUnsafe(in Guid iid, out void* ppv)
+ internal void AsUnsafe(in Guid iid, out void* ppv)
{
TryAsNative(in iid, out ppv).Assert();
}
///
- public void AsUnsafe(in Guid iid, out nint ppv)
+ internal void AsUnsafe(in Guid iid, out nint ppv)
{
TryAsNative(in iid, out ppv).Assert();
}
@@ -87,7 +87,7 @@ public void AsUnsafe(in Guid iid, out nint ppv)
/// The resulting instance for the requested interface.
/// Whether the requested interface was retrieved successfully.
/// Thrown if the current instance has been disposed.
- public bool TryAs(in Guid iid, [NotNullWhen(true)] out WindowsRuntimeObjectReference? objectReference)
+ internal bool TryAs(in Guid iid, [NotNullWhen(true)] out WindowsRuntimeObjectReference? objectReference)
{
HRESULT hresult = DerivedTryAsNative(in iid, out objectReference);
@@ -101,7 +101,7 @@ public bool TryAs(in Guid iid, [NotNullWhen(true)] out WindowsRuntimeObjectRefer
/// The resulting COM pointer for the requested interface.
/// Whether the requested interface was retrieved successfully.
/// Thrown if the current instance has been disposed.
- public bool TryAsUnsafe(in Guid iid, out void* ppv)
+ internal bool TryAsUnsafe(in Guid iid, out void* ppv)
{
HRESULT hresult = TryAsNative(in iid, out ppv);
@@ -109,7 +109,7 @@ public bool TryAsUnsafe(in Guid iid, out void* ppv)
}
///
- public bool TryAsUnsafe(in Guid iid, out nint ppv)
+ internal bool TryAsUnsafe(in Guid iid, out nint ppv)
{
HRESULT hresult = TryAsNative(in iid, out ppv);
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs
index 7c96427a5..956b831ba 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs
@@ -99,7 +99,7 @@ public void Dispose()
/// the current object. Callers must call and .
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void* GetReferenceTrackerPtrUnsafe()
+ internal void* GetReferenceTrackerPtrUnsafe()
{
return _referenceTrackerPtr;
}
@@ -109,7 +109,7 @@ public void Dispose()
///
/// Thrown if the current instance has been disposed.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void AddRefUnsafe()
+ internal void AddRefUnsafe()
{
ObjectDisposedException.ThrowIf(!TryAddRefUnsafe(), this);
}
@@ -119,7 +119,7 @@ public void AddRefUnsafe()
///
/// Whether the managed reference count has been increased successfully.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public bool TryAddRefUnsafe()
+ internal bool TryAddRefUnsafe()
{
bool success = true;
@@ -220,7 +220,7 @@ private void DisposeUnsafe()
///
/// Calls to should always exactly match calls to .
///
- public void ReleaseUnsafe()
+ internal void ReleaseUnsafe()
{
// To release, we can simply do an interlocked decrement on the reference tracking
// mask. Each caller is guaranteed to only call this method once (the contract states to only