Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eng/Configurations.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<NETCoreAppFramework>$(NetCoreAppCurrent)</NETCoreAppFramework>
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
<NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName>
<MinimiumSupportedWindowsPlatform>WINDOWS7.0</MinimiumSupportedWindowsPlatform>
</PropertyGroup>

<!-- Honor the generic RuntimeConfiguration property. -->
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- Adds SupportedOSPlatform attribute for Windows Specific libraries -->
<ItemGroup Condition="'$(IsWindowsSpecific)' == 'true' and '$(IsTestProject)' != 'true'">
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatform">
<_Parameter1>$(MinimiumSupportedWindowsPlatform)</_Parameter1>
<_Parameter1>windows</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public static IntPtr ReAllocHGlobal(IntPtr pv, IntPtr cb)
/// <summary>
/// Given a managed object that wraps an ITypeInfo, return its name.
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static string GetTypeInfoName(ITypeInfo typeInfo)
{
if (typeInfo is null)
Expand All @@ -321,14 +321,14 @@ public static string GetTypeInfoName(ITypeInfo typeInfo)

// This method is identical to Type.GetTypeFromCLSID. Since it's interop specific, we expose it
// on Marshal for more consistent API surface.
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static Type? GetTypeFromCLSID(Guid clsid) => RuntimeType.GetTypeFromCLSIDImpl(clsid, null, throwOnError: false);

/// <summary>
/// Return the IUnknown* for an Object if the current context is the one
/// where the RCW was first seen. Will return null otherwise.
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static IntPtr /* IUnknown* */ GetIUnknownForObject(object o)
{
if (o is null)
Expand All @@ -352,7 +352,7 @@ public static string GetTypeInfoName(ITypeInfo typeInfo)
/// <summary>
/// Return the IDispatch* for an Object.
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static IntPtr /* IDispatch */ GetIDispatchForObject(object o)
{
if (o is null)
Expand All @@ -370,7 +370,7 @@ public static string GetTypeInfoName(ITypeInfo typeInfo)
/// Return the IUnknown* representing the interface for the Object.
/// Object o should support Type T
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static IntPtr /* IUnknown* */ GetComInterfaceForObject(object o, Type T)
{
if (o is null)
Expand All @@ -386,15 +386,15 @@ public static string GetTypeInfoName(ITypeInfo typeInfo)
return GetComInterfaceForObjectNative(o, T, false, true);
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static IntPtr GetComInterfaceForObject<T, TInterface>([DisallowNull] T o) => GetComInterfaceForObject(o!, typeof(TInterface));

/// <summary>
/// Return the IUnknown* representing the interface for the Object.
/// Object o should support Type T, it refer the value of mode to
/// invoke customized QueryInterface or not.
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static IntPtr /* IUnknown* */ GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode)
{
if (o is null)
Expand All @@ -417,7 +417,7 @@ public static string GetTypeInfoName(ITypeInfo typeInfo)
/// <summary>
/// Return the managed object representing the IUnknown*
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static object GetObjectForIUnknown(IntPtr /* IUnknown* */ pUnk)
{
if (pUnk == IntPtr.Zero)
Expand All @@ -431,7 +431,7 @@ public static object GetObjectForIUnknown(IntPtr /* IUnknown* */ pUnk)
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern object GetObjectForIUnknownNative(IntPtr /* IUnknown* */ pUnk);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static object GetUniqueObjectForIUnknown(IntPtr unknown)
{
if (unknown == IntPtr.Zero)
Expand All @@ -455,15 +455,15 @@ public static object GetUniqueObjectForIUnknown(IntPtr unknown)
/// Return an Object for IUnknown, using the Type T.
/// Type T should be either a COM imported Type or a sub-type of COM imported Type
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern object GetTypedObjectForIUnknown(IntPtr /* IUnknown* */ pUnk, Type t);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern IntPtr CreateAggregatedObject(IntPtr pOuter, object o);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static IntPtr CreateAggregatedObject<T>(IntPtr pOuter, T o) where T : notnull
{
return CreateAggregatedObject(pOuter, (object)o);
Expand Down Expand Up @@ -562,7 +562,7 @@ public static string PtrToStringBSTR(IntPtr ptr)
/// Release the COM component and if the reference hits 0 zombie this object.
/// Further usage of this Object might throw an exception
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static int ReleaseComObject(object o)
{
if (o is null)
Expand All @@ -585,7 +585,7 @@ public static int ReleaseComObject(object o)
/// Release the COM component and zombie this object.
/// Further usage of this Object might throw an exception
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static int FinalReleaseComObject(object o)
{
if (o is null)
Expand All @@ -604,7 +604,7 @@ public static int FinalReleaseComObject(object o)
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void InternalFinalReleaseComObject(object o);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static object? GetComObjectData(object obj, object key)
{
if (obj is null)
Expand All @@ -630,7 +630,7 @@ public static int FinalReleaseComObject(object o)
/// false if the data could not be added because there already was data for the
/// specified key.
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static bool SetComObjectData(object obj, object key, object? data)
{
if (obj is null)
Expand All @@ -654,7 +654,7 @@ public static bool SetComObjectData(object obj, object key, object? data)
/// This method takes the given COM object and wraps it in an object
/// of the specified type. The type must be derived from __ComObject.
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[return: NotNullIfNotNull("o")]
public static object? CreateWrapperOfType(object? o, Type t)
{
Expand Down Expand Up @@ -705,7 +705,7 @@ public static bool SetComObjectData(object obj, object key, object? data)
return Wrapper;
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static TWrapper CreateWrapperOfType<T, TWrapper>([AllowNull] T o)
{
return (TWrapper)CreateWrapperOfType(o, typeof(TWrapper))!;
Expand All @@ -720,7 +720,7 @@ public static TWrapper CreateWrapperOfType<T, TWrapper>([AllowNull] T o)
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool IsTypeVisibleFromCom(Type t);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static unsafe int QueryInterface(IntPtr pUnk, ref Guid iid, out IntPtr ppv)
{
if (pUnk == IntPtr.Zero)
Expand All @@ -733,7 +733,7 @@ public static unsafe int QueryInterface(IntPtr pUnk, ref Guid iid, out IntPtr pp
}
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static unsafe int AddRef(IntPtr pUnk)
{
if (pUnk == IntPtr.Zero)
Expand All @@ -742,7 +742,7 @@ public static unsafe int AddRef(IntPtr pUnk)
return ((delegate * stdcall <IntPtr, int>)(*(*(void***)pUnk + 1 /* IUnknown.AddRef slot */)))(pUnk);
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static unsafe int Release(IntPtr pUnk)
{
if (pUnk == IntPtr.Zero)
Expand All @@ -751,32 +751,32 @@ public static unsafe int Release(IntPtr pUnk)
return ((delegate * stdcall <IntPtr, int>)(*(*(void***)pUnk + 2 /* IUnknown.Release slot */)))(pUnk);
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void GetNativeVariantForObject(object? obj, /* VARIANT * */ IntPtr pDstNativeVariant);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static void GetNativeVariantForObject<T>([AllowNull] T obj, IntPtr pDstNativeVariant)
{
GetNativeVariantForObject((object?)obj, pDstNativeVariant);
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern object? GetObjectForNativeVariant(/* VARIANT * */ IntPtr pSrcNativeVariant);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[return: MaybeNull]
public static T GetObjectForNativeVariant<T>(IntPtr pSrcNativeVariant)
{
return (T)GetObjectForNativeVariant(pSrcNativeVariant)!;
}

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern object?[] GetObjectsForNativeVariants(/* VARIANT * */ IntPtr aSrcNativeVariant, int cVars);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static T[] GetObjectsForNativeVariants<T>(IntPtr aSrcNativeVariant, int cVars)
{
object?[] objects = GetObjectsForNativeVariants(aSrcNativeVariant, cVars);
Expand All @@ -791,18 +791,18 @@ public static T[] GetObjectsForNativeVariants<T>(IntPtr aSrcNativeVariant, int c
/// <para>Returns the first valid COM slot that GetMethodInfoForSlot will work on
/// This will be 3 for IUnknown based interfaces and 7 for IDispatch based interfaces. </para>
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int GetStartComSlot(Type t);

/// <summary>
/// <para>Returns the last valid COM slot that GetMethodInfoForSlot will work on. </para>
/// </summary>
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int GetEndComSlot(Type t);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public static object BindToMoniker(string monikerName)
{
CreateBindCtx(0, out IBindCtx bindctx);
Expand All @@ -822,7 +822,7 @@ public static object BindToMoniker(string monikerName)
[DllImport(Interop.Libraries.Ole32, PreserveSig = false)]
private static extern void BindMoniker(IMoniker pmk, uint grfOpt, ref Guid iidResult, [MarshalAs(UnmanagedType.Interface)] out object ppvResult);

[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void ChangeWrapperHandleStrength(object otp, bool fIsWeak);
#endif // FEATURE_COMINTEROP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ public DictionarySectionHandler() { }
protected virtual string ValueAttributeName { get { throw null; } }
public virtual object Create(object parent, object context, System.Xml.XmlNode section) { throw null; }
}
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public sealed partial class DpapiProtectedConfigurationProvider : System.Configuration.ProtectedConfigurationProvider
{
public DpapiProtectedConfigurationProvider() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace System.Configuration
{
[SupportedOSPlatform("windows7.0")]
[SupportedOSPlatform("windows")]
public sealed class DpapiProtectedConfigurationProvider : ProtectedConfigurationProvider
{
private bool _useMachineProtection = true;
Expand Down
34 changes: 17 additions & 17 deletions src/libraries/System.Console/ref/System.Console.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ namespace System
public static partial class Console
{
public static System.ConsoleColor BackgroundColor { get { throw null; } set { } }
public static int BufferHeight { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
public static int BufferWidth { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
public static int BufferHeight { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public static int BufferWidth { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static bool CapsLock { get { throw null; } }
public static int CursorLeft { get { throw null; } set { } }
public static int CursorSize { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
public static int CursorSize { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public static int CursorTop { get { throw null; } set { } }
public static bool CursorVisible { [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] get { throw null; } set { } }
public static bool CursorVisible { [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] get { throw null; } set { } }
public static System.IO.TextWriter Error { get { throw null; } }
public static System.ConsoleColor ForegroundColor { get { throw null; } set { } }
public static System.IO.TextReader In { get { throw null; } }
Expand All @@ -27,25 +27,25 @@ public static partial class Console
public static bool KeyAvailable { get { throw null; } }
public static int LargestWindowHeight { get { throw null; } }
public static int LargestWindowWidth { get { throw null; } }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static bool NumberLock { get { throw null; } }
public static System.IO.TextWriter Out { get { throw null; } }
public static System.Text.Encoding OutputEncoding { get { throw null; } set { } }
public static string Title { [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] get { throw null; } set { } }
public static string Title { [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] get { throw null; } set { } }
public static bool TreatControlCAsInput { get { throw null; } set { } }
public static int WindowHeight { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
public static int WindowLeft { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
public static int WindowTop { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
public static int WindowWidth { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] set { } }
public static int WindowHeight { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public static int WindowLeft { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public static int WindowTop { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public static int WindowWidth { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public static event System.ConsoleCancelEventHandler? CancelKeyPress { add { } remove { } }
public static void Beep() { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void Beep(int frequency, int duration) { }
public static void Clear() { }
public static (int Left, int Top) GetCursorPosition() { throw null; }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, System.ConsoleColor sourceForeColor, System.ConsoleColor sourceBackColor) { }
public static System.IO.Stream OpenStandardError() { throw null; }
public static System.IO.Stream OpenStandardError(int bufferSize) { throw null; }
Expand All @@ -58,15 +58,15 @@ public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth
public static System.ConsoleKeyInfo ReadKey(bool intercept) { throw null; }
public static string? ReadLine() { throw null; }
public static void ResetColor() { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void SetBufferSize(int width, int height) { }
public static void SetCursorPosition(int left, int top) { }
public static void SetError(System.IO.TextWriter newError) { }
public static void SetIn(System.IO.TextReader newIn) { }
public static void SetOut(System.IO.TextWriter newOut) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void SetWindowPosition(int left, int top) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")]
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void SetWindowSize(int width, int height) { }
public static void Write(bool value) { }
public static void Write(char value) { }
Expand Down
Loading