From 5c726423eefb1c14648ab04e2b2204e28075ad2c Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 12 Nov 2024 15:22:25 -0800 Subject: [PATCH] Apply various code style cleanups and improvements --- exclusion.dic | 147 +++++++++++++++++- .../DirectX/D3D11/{Shared => }/DX11Sample.cs | 7 +- samples/DirectX/D3D11/HelloTriangle11.cs | 7 +- samples/DirectX/D3D11/HelloWindow11.cs | 6 +- .../DirectX/D3D12/{Shared => }/DX12Sample.cs | 35 ++--- samples/DirectX/D3D12/HelloBundles.cs | 7 +- samples/DirectX/D3D12/HelloConstBuffer12.cs | 12 +- samples/DirectX/D3D12/HelloMultiSampling12.cs | 13 +- samples/DirectX/D3D12/HelloTexture12.cs | 15 +- samples/DirectX/D3D12/HelloTriangle12.cs | 11 +- samples/DirectX/D3D12/HelloWindow12.cs | 6 +- samples/DirectX/{Shared => }/DXSample.cs | 31 ++-- .../DirectX/{Shared => }/DXSampleHelper.cs | 4 - samples/DirectX/Program.cs | 2 +- .../DirectX/TerraFX.Samples.DirectX.csproj | 1 + .../DirectX/{Shared => }/Win32Application.cs | 0 .../WinForms/TerraFX.Samples.WinForms.csproj | 3 +- sources/Interop/.editorconfig | 17 +- .../CD3DX12FeatureSupport.Manual.cs | 2 +- .../d3dx12_core/D3D12_CLEAR_VALUE.Manual.cs | 6 +- .../d3dx12_core/D3D12_HEAP_DESC.Manual.cs | 8 +- .../D3D12_HEAP_PROPERTIES.Manual.cs | 6 +- .../d3dx12_core/D3D12_HEAP_PROPERTIES.cs | 2 +- .../D3D12_RASTERIZER_DESC2.Manual.cs | 2 +- .../d3dx12_core/D3D12_RESOURCE_DESC.Manual.cs | 10 +- .../d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.cs | 6 +- .../D3D12_RESOURCE_DESC1.Manual.cs | 13 +- .../d3dx12_core/D3D12_RESOURCE_DESC1.cs | 9 +- .../D3D12_RT_FORMAT_ARRAY.Manual.cs | 1 - .../D3D12_TEXTURE_COPY_LOCATION.cs | 12 +- .../d3dx12_core/D3D12_VIEWPORT.Manual.cs | 9 +- .../DirectX/d3dx12/d3dx12_core/DirectX.cs | 3 +- .../CD3DX12_PIPELINE_STATE_STREAM4.Manual.cs | 8 +- ...ELINE_STATE_STREAM5_PARSE_HELPER.Manual.cs | 2 +- ...PELINE_STATE_STREAM_PARSE_HELPER.Manual.cs | 2 +- .../DirectX.Manual.cs | 4 +- ...D12_PROPERTY_LAYOUT_FORMAT_TABLE.Manual.cs | 20 +-- ...D12_RENDER_PASS_BEGINNING_ACCESS.Manual.cs | 6 +- ...EGINNING_ACCESS_CLEAR_PARAMETERS.Manual.cs | 6 +- ...ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs | 8 +- ...2_RENDER_PASS_DEPTH_STENCIL_DESC.Manual.cs | 6 +- .../D3D12_RENDER_PASS_ENDING_ACCESS.Manual.cs | 6 +- ...ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs | 6 +- ...ENDING_ACCESS_RESOLVE_PARAMETERS.Manual.cs | 6 +- ...2_RENDER_PASS_RENDER_TARGET_DESC.Manual.cs | 6 +- .../d3dx12_resource_helpers/DirectX.Manual.cs | 16 +- .../D3D12_CPU_DESCRIPTOR_HANDLE.Manual.cs | 6 +- .../D3D12_GPU_DESCRIPTOR_HANDLE.Manual.cs | 6 +- .../D3D12_ROOT_DESCRIPTOR1.Manual.cs | 1 - .../DirectX/um/d3d11/D3D11_BOX.Manual.cs | 6 +- .../DirectX/um/d3d11/D3D11_VIEWPORT.Manual.cs | 6 +- .../um/dcommon/D2D_MATRIX_3X2_F.Manual.cs | 4 +- .../um/dcommon/D2D_MATRIX_4X3_F.Manual.cs | 4 +- .../um/dcommon/D2D_MATRIX_4X4_F.Manual.cs | 4 +- .../um/dcommon/D2D_MATRIX_5X4_F.Manual.cs | 6 +- .../DirectX/um/dcommon/D2D_POINT_2F.Manual.cs | 6 +- .../DirectX/um/dcommon/D2D_POINT_2U.Manual.cs | 6 +- .../DirectX/um/dcommon/D2D_RECT_F.Manual.cs | 6 +- .../DirectX/um/dcommon/D2D_RECT_U.Manual.cs | 6 +- .../DirectX/um/dcommon/D2D_SIZE_F.Manual.cs | 6 +- .../DirectX/um/dcommon/D2D_SIZE_U.Manual.cs | 6 +- .../um/dcommon/D2D_VECTOR_2F.Manual.cs | 6 +- .../um/dcommon/D2D_VECTOR_3F.Manual.cs | 6 +- .../um/dcommon/D2D_VECTOR_4F.Manual.cs | 6 +- .../DirectX/um/dinput/DIJOFS.Manual.cs | 1 - .../DirectX/um/dinput/DirectX.Manual.cs | 1 - .../DirectX/um/x3daudio/DirectX.Manual.cs | 2 +- .../Gdiplus/um/gdipluscolor/Color.Manual.cs | 2 +- .../Windows/Gdiplus/um/gdipluscolor/Color.cs | 18 +-- .../Windows/Gdiplus/um/gdipluseffects/Blur.cs | 14 +- .../um/gdipluseffects/BrightnessContrast.cs | 14 +- .../Gdiplus/um/gdipluseffects/ColorBalance.cs | 14 +- .../Gdiplus/um/gdipluseffects/ColorCurve.cs | 14 +- .../Gdiplus/um/gdipluseffects/ColorLUT.cs | 14 +- .../um/gdipluseffects/ColorMatrixEffect.cs | 14 +- .../Gdiplus/um/gdipluseffects/Effect.cs | 10 +- .../gdipluseffects/HueSaturationLightness.cs | 14 +- .../Gdiplus/um/gdipluseffects/Levels.cs | 14 +- .../um/gdipluseffects/RedEyeCorrection.cs | 14 +- .../Gdiplus/um/gdipluseffects/Sharpen.cs | 14 +- .../Windows/Gdiplus/um/gdipluseffects/Tint.cs | 14 +- .../um/gdiplusgpstubs/GpTexture.Manual.cs | 1 + .../um/gdiplusinit/GdiplusStartupInput.cs | 2 +- .../um/gdiplusinit/GdiplusStartupInputEx.cs | 4 +- .../MetafileHeader.Manual.cs | 4 +- .../um/gdiplusmetaheader/MetafileHeader.cs | 26 ++-- .../um/gdipluspixelformats/Gdiplus.Manual.cs | 2 - .../Gdiplus/um/gdiplustypes/Gdiplus.Manual.cs | 2 - .../Gdiplus/um/gdiplustypes/GpPoint.cs | 2 +- .../Gdiplus/um/gdiplustypes/GpPointF.cs | 2 +- .../Windows/Gdiplus/um/gdiplustypes/GpRect.cs | 26 ++-- .../Gdiplus/um/gdiplustypes/GpRectF.cs | 26 ++-- .../Gdiplus/um/gdiplustypes/GpSizeF.Manual.cs | 2 +- .../Gdiplus/um/gdiplustypes/GpSizeF.cs | 4 +- .../Gdiplus/um/gdiplustypes/Size.Manual.cs | 2 +- .../Windows/Gdiplus/um/gdiplustypes/Size.cs | 4 +- .../WeakReference/IWeakReference.Manual.cs | 1 - .../IID.Manual.cs | 1 - .../IID.Manual.cs | 1 - .../IID.Manual.cs | 1 - .../IID.Manual.cs | 1 - .../IID.Manual.cs | 1 - .../WinRT/winrt/windows.ui.core/IID.Manual.cs | 1 - .../winrt/windows.ui.text.core/IID.Manual.cs | 1 - .../IID.Manual.cs | 1 - .../windows.ui.viewmanagement/IID.Manual.cs | 1 - .../APARTMENT_SHUTDOWN_REGISTRATION_COOKIE.cs | 2 +- .../helper-types/ASYNCCOMPLETIONHANDLE.cs | 2 +- .../Windows/other/helper-types/BOOL.cs | 2 +- .../Windows/other/helper-types/COLORREF.cs | 2 +- .../other/helper-types/COMPRESSOR_HANDLE.cs | 2 +- .../helper-types/CO_DEVICE_CATALOG_COOKIE.cs | 2 +- .../other/helper-types/CO_MTA_USAGE_COOKIE.cs | 2 +- .../helper-types/DPI_AWARENESS_CONTEXT.cs | 2 +- .../Windows/other/helper-types/EC_HANDLE.cs | 2 +- .../EC_OBJECT_ARRAY_PROPERTY_HANDLE.cs | 2 +- .../Windows/other/helper-types/HACCEL.cs | 2 +- .../Windows/other/helper-types/HANDLE.cs | 2 +- .../Windows/other/helper-types/HANDLE_PTR.cs | 2 +- .../other/helper-types/HANIMATIONBUFFER.cs | 2 +- .../Windows/other/helper-types/HBITMAP.cs | 2 +- .../Windows/other/helper-types/HBRUSH.cs | 2 +- .../Windows/other/helper-types/HCATADMIN.cs | 2 +- .../other/helper-types/HCERTCHAINENGINE.cs | 2 +- .../Windows/other/helper-types/HCERTSTORE.cs | 2 +- .../other/helper-types/HCERTSTOREPROV.cs | 2 +- .../HCERT_SERVER_OCSP_RESPONSE.cs | 2 +- .../other/helper-types/HCMTRANSFORM.cs | 2 +- .../Windows/other/helper-types/HCOLORSPACE.cs | 2 +- .../Windows/other/helper-types/HCOMDB.cs | 2 +- .../Windows/other/helper-types/HCRYPTASYNC.cs | 2 +- .../helper-types/HCRYPTDEFAULTCONTEXT.cs | 2 +- .../Windows/other/helper-types/HCRYPTHASH.cs | 2 +- .../Windows/other/helper-types/HCRYPTKEY.cs | 2 +- .../Windows/other/helper-types/HCRYPTMSG.cs | 2 +- .../other/helper-types/HCRYPTOIDFUNCADDR.cs | 2 +- .../other/helper-types/HCRYPTOIDFUNCSET.cs | 2 +- .../Windows/other/helper-types/HCRYPTPROV.cs | 2 +- .../other/helper-types/HCRYPTPROV_LEGACY.cs | 2 +- .../HCRYPTPROV_OR_NCRYPT_KEY_HANDLE.cs | 2 +- .../Windows/other/helper-types/HCURSOR.cs | 2 +- .../Windows/Windows/other/helper-types/HDC.cs | 2 +- .../Windows/other/helper-types/HDESK.cs | 2 +- .../Windows/other/helper-types/HDEVINFO.cs | 2 +- .../Windows/other/helper-types/HDEVNOTIFY.cs | 2 +- .../Windows/other/helper-types/HDROP.cs | 2 +- .../Windows/other/helper-types/HDSKSPC.cs | 2 +- .../Windows/other/helper-types/HDWP.cs | 2 +- .../other/helper-types/HENHMETAFILE.cs | 2 +- .../Windows/other/helper-types/HEVENT.cs | 2 +- .../Windows/other/helper-types/HFONT.cs | 2 +- .../Windows/other/helper-types/HGDIOBJ.cs | 2 +- .../other/helper-types/HGESTUREINFO.cs | 2 +- .../Windows/other/helper-types/HGLOBAL.cs | 2 +- .../Windows/other/helper-types/HGLRC.cs | 2 +- .../Windows/other/helper-types/HHANDLE.cs | 2 +- .../Windows/other/helper-types/HHOOK.cs | 2 +- .../Windows/other/helper-types/HICON.cs | 2 +- .../other/helper-types/HIFTIMESTAMPCHANGE.cs | 2 +- .../Windows/other/helper-types/HIMAGELIST.cs | 2 +- .../Windows/other/helper-types/HIMC.cs | 2 +- .../Windows/other/helper-types/HIMCC.cs | 2 +- .../Windows/other/helper-types/HINF.cs | 2 +- .../Windows/other/helper-types/HINSTANCE.cs | 2 +- .../other/helper-types/HINTERACTIONCONTEXT.cs | 2 +- .../Windows/other/helper-types/HINTERNET.cs | 2 +- .../Windows/other/helper-types/HKEY.cs | 2 +- .../Windows/Windows/other/helper-types/HKL.cs | 2 +- .../Windows/other/helper-types/HLOCAL.cs | 2 +- .../Windows/other/helper-types/HMENU.cs | 2 +- .../Windows/other/helper-types/HMETAFILE.cs | 2 +- .../other/helper-types/HMETAFILEPICT.cs | 2 +- .../Windows/other/helper-types/HMIDI.cs | 2 +- .../Windows/other/helper-types/HMIDIIN.cs | 2 +- .../Windows/other/helper-types/HMIDIOUT.cs | 2 +- .../Windows/other/helper-types/HMIDISTRM.cs | 2 +- .../Windows/other/helper-types/HMIXER.cs | 2 +- .../Windows/other/helper-types/HMIXEROBJ.cs | 2 +- .../Windows/other/helper-types/HMODULE.cs | 2 +- .../Windows/other/helper-types/HMONITOR.cs | 2 +- .../other/helper-types/HPAINTBUFFER.cs | 2 +- .../Windows/other/helper-types/HPALETTE.cs | 2 +- .../Windows/other/helper-types/HPCON.cs | 2 +- .../Windows/other/helper-types/HPEN.cs | 2 +- .../other/helper-types/HPOWERNOTIFY.cs | 2 +- .../Windows/other/helper-types/HPROFILE.cs | 2 +- .../other/helper-types/HPROPSHEETPAGE.cs | 2 +- .../Windows/other/helper-types/HPSS.cs | 2 +- .../Windows/other/helper-types/HPSSWALK.cs | 2 +- .../Windows/other/helper-types/HPSXA.cs | 2 +- .../Windows/other/helper-types/HRAWINPUT.cs | 2 +- .../Windows/other/helper-types/HRESULT.cs | 2 +- .../Windows/other/helper-types/HRGN.cs | 2 +- .../Windows/other/helper-types/HRSRC.cs | 2 +- .../Windows/other/helper-types/HSEMAPHORE.cs | 2 +- .../Windows/other/helper-types/HSPFILELOG.cs | 2 +- .../Windows/other/helper-types/HSPFILEQ.cs | 2 +- .../Windows/other/helper-types/HSTRING.cs | 2 +- .../other/helper-types/HSTRING_BUFFER.cs | 2 +- .../Windows/other/helper-types/HSWDEVICE.cs | 2 +- .../helper-types/HSYNTHETICPOINTERDEVICE.cs | 2 +- .../Windows/other/helper-types/HTASK.cs | 2 +- .../Windows/other/helper-types/HTHEME.cs | 2 +- .../Windows/other/helper-types/HTHUMBNAIL.cs | 2 +- .../Windows/other/helper-types/HTOUCHINPUT.cs | 2 +- .../Windows/other/helper-types/HTRANSFORM.cs | 2 +- .../Windows/other/helper-types/HTREEITEM.cs | 2 +- .../Windows/other/helper-types/HUSKEY.cs | 2 +- .../Windows/other/helper-types/HWAVEIN.cs | 2 +- .../Windows/other/helper-types/HWAVEOUT.cs | 2 +- .../other/helper-types/HWINEVENTHOOK.cs | 2 +- .../Windows/other/helper-types/HWINSTA.cs | 2 +- .../Windows/other/helper-types/HWND.cs | 2 +- .../other/helper-types/InstanceHandle.cs | 2 +- .../Windows/other/helper-types/LPARAM.cs | 2 +- .../LPPROC_THREAD_ATTRIBUTE_LIST.cs | 2 +- .../Windows/other/helper-types/LRESULT.cs | 2 +- .../Windows/other/helper-types/MSIHANDLE.cs | 2 +- ...chineGlobalObjectTableRegistrationToken.cs | 2 +- .../Windows/other/helper-types/OAHWND.cs | 2 +- .../helper-types/PACKAGEDEPENDENCY_CONTEXT.cs | 2 +- .../helper-types/PACKAGE_INFO_REFERENCE.cs | 2 +- .../PAPPCONSTRAIN_REGISTRATION.cs | 2 +- .../helper-types/PAPPSTATE_REGISTRATION.cs | 2 +- .../helper-types/PCUSERIALIZEDPROPSTORAGE.cs | 2 +- .../helper-types/PHIDP_PREPARSED_DATA.cs | 2 +- .../PRJ_DIR_ENTRY_BUFFER_HANDLE.cs | 2 +- .../PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT.cs | 2 +- .../helper-types/PTP_CALLBACK_INSTANCE.cs | 2 +- .../other/helper-types/PTP_CLEANUP_GROUP.cs | 2 +- .../Windows/other/helper-types/PTP_POOL.cs | 2 +- .../other/helper-types/ROPARAMIIDHANDLE.cs | 2 +- .../helper-types/RO_REGISTRATION_COOKIE.cs | 2 +- .../other/helper-types/SPSTATEHANDLE.cs | 2 +- .../helper-types/UI_ANIMATION_KEYFRAME.cs | 2 +- .../Windows/other/helper-types/WPARAM.cs | 2 +- .../Windows/shared/guiddef/IID.Manual.cs | 4 +- .../hidpi/HIDP_LINK_COLLECTION_NODE.Manual.cs | 6 +- .../Windows/shared/hidpi/Windows.Manual.cs | 2 - .../Windows/shared/in6addr/IN6_ADDR.Manual.cs | 2 - .../Windows/shared/windef/POINT.Manual.cs | 6 +- .../Windows/shared/windef/RECT.Manual.cs | 6 +- .../Windows/shared/windef/SIZE.Manual.cs | 6 +- .../Windows/shared/ws2ipdef/Windows.Manual.cs | 41 +++-- .../Windows/um/DbgHelp/Windows.Manual.cs | 3 - .../um/UIAnimation/IUIAnimationStoryboard2.cs | 4 +- .../Windows/um/WinUser/Windows.Manual.cs | 1 - .../Windows/um/oleauto/Windows.Manual.cs | 1 - .../Windows/um/shellapi/Windows.Manual.cs | 1 - .../Windows/Windows/um/winioctl/FS.Manual.cs | 1 - .../Windows/Windows/um/winioctl/Windows.cs | 10 +- .../um/winnt/SLIST_HEADER_AMD64.Manual.cs | 8 +- .../um/winnt/SLIST_HEADER_ARM64.Manual.cs | 8 +- .../um/winnt/SLIST_HEADER_X86.Manual.cs | 8 +- tests/Interop/.editorconfig | 18 ++- 255 files changed, 692 insertions(+), 623 deletions(-) rename samples/DirectX/D3D11/{Shared => }/DX11Sample.cs (98%) rename samples/DirectX/D3D12/{Shared => }/DX12Sample.cs (95%) rename samples/DirectX/{Shared => }/DXSample.cs (89%) rename samples/DirectX/{Shared => }/DXSampleHelper.cs (91%) rename samples/DirectX/{Shared => }/Win32Application.cs (100%) diff --git a/exclusion.dic b/exclusion.dic index 9592fa0896..7602b39e99 100644 --- a/exclusion.dic +++ b/exclusion.dic @@ -1,46 +1,163 @@ abst +addr amvideo +aniso antialias antialiased +apdu +applicationmodel +appmodel +appointmentsprovider +appservice +atapi barycentrics +bezier +bluetooth +bstr cbr +cmyk +comcat +comctl cpst +cpuaccess +datatransfer +daudio dcommon +derr descs deserializer dest +devicetopology +dinput +directx +disp +documenttarget dont +drivebay +dwrite +dxcapi dxcore dxgi dxgicommon dxgiformat +dxgitype +dxil +excep +fmin +gatt +gdiplus +gdipluscolor +gdipluseffects +gdiplusenums +gdiplusmetaheader +gdipluspixelformats +gdiplustypes +genericattributeprofile +geobounding +geocircle +geopath +geopoint +geoposition +geoshape +geovisit +gpio +gpso +grfdex +guiddef +gyrometer +handleapi +hidpi +hidsdi hlsl +hmenu +horz +hrtf +hstring hwnd -IID_DirectML -IID_OpenCL -IID_OpenGL +iclient +iids +iid_directml +iid_opencl +iid_opengl +iid_winrt_i infos intracoded -gdiplus +intsafe +ipdef +ipmib +iterable +kfid +ksmedia +lpfn lpsz +lresource luid memcpy +mfapi +mfcaptureengine +mfidl +mfobjects +mfreadwrite microsoft +minwinbase +minwindef mips +mmdeviceapi +mmeapi +mmsyscom movc msaa +msports +msxml multisample noexcept nothrow +nuget nums offsetted +oleaut +oleauto +pbstr +pcch +pclsid +pctinfo +pdisp +pgrfdex +phhk +pidl pinnable +pixfmt +plib postbuild +ppropvar +ppsz +ppunk +preparsed +prerolled +proj +propsys +propvar +propvarutil +pvar rclsid rects +rfcomm +rgmio +rgmios +rgsz riid +roapi +roparameterizediid +sapi sdklayers +seeked +segmenter +sharetarget +shellapi stdcall +stringable +strmif +strsafe subobject subobjects subresource @@ -49,12 +166,32 @@ swapchain tessellator texels tilings -unmap +tpcshrd unknwnbase +unmap +userdataaccounts +userdatatasks +uuid +uuidof +uuids +uxtheme +voip vtbl wchar +wincodec +wincred +wincrypt +windef +winerror +wingdi +winhttp winioctl +winnt +winreg winrt +winuser +xapo +xaudio xffff xfffffff xfffffffe diff --git a/samples/DirectX/D3D11/Shared/DX11Sample.cs b/samples/DirectX/D3D11/DX11Sample.cs similarity index 98% rename from samples/DirectX/D3D11/Shared/DX11Sample.cs rename to samples/DirectX/D3D11/DX11Sample.cs index 72f85914a8..65f08e061f 100644 --- a/samples/DirectX/D3D11/Shared/DX11Sample.cs +++ b/samples/DirectX/D3D11/DX11Sample.cs @@ -11,11 +11,10 @@ using static TerraFX.Interop.DirectX.DXGI; using static TerraFX.Interop.DirectX.DXGI_SWAP_EFFECT; using static TerraFX.Interop.Windows.Windows; -using static TerraFX.Samples.DirectX.DXSampleHelper; namespace TerraFX.Samples.DirectX.D3D11; -public abstract unsafe class DX11Sample : DXSample +public abstract unsafe class DX11Sample(string name) : DXSample(name) { private ID3D11Device* _d3dDevice; private IDXGIAdapter1* _dxgiAdapter; @@ -26,10 +25,6 @@ public abstract unsafe class DX11Sample : DXSample private D3D11_VIEWPORT _viewport; private RECT _scissorRect; - protected DX11Sample(string name) : base(name) - { - } - public ID3D11Device* D3DDevice => _d3dDevice; public IDXGIAdapter1* DxgiAdapter => _dxgiAdapter; diff --git a/samples/DirectX/D3D11/HelloTriangle11.cs b/samples/DirectX/D3D11/HelloTriangle11.cs index 4fa96a1a37..0e2a29da64 100644 --- a/samples/DirectX/D3D11/HelloTriangle11.cs +++ b/samples/DirectX/D3D11/HelloTriangle11.cs @@ -10,21 +10,16 @@ using static TerraFX.Interop.DirectX.DirectX; using static TerraFX.Interop.DirectX.DXGI_FORMAT; using static TerraFX.Interop.Windows.Windows; -using static TerraFX.Samples.DirectX.DXSampleHelper; namespace TerraFX.Samples.DirectX.D3D11; -public unsafe class HelloTriangle11 : HelloWindow11 +public unsafe class HelloTriangle11(string name) : HelloWindow11(name) { private ID3D11VertexShader* _vertexShader; private ID3D11InputLayout* _inputLayout; private ID3D11PixelShader* _pixelShader; private ID3D11Buffer* _vertexBuffer; - public HelloTriangle11(string name) : base(name) - { - } - protected override void CreateAssets() { _inputLayout = CreateInputLayout(); diff --git a/samples/DirectX/D3D11/HelloWindow11.cs b/samples/DirectX/D3D11/HelloWindow11.cs index 1d04d609df..2d7a7b398e 100644 --- a/samples/DirectX/D3D11/HelloWindow11.cs +++ b/samples/DirectX/D3D11/HelloWindow11.cs @@ -4,12 +4,8 @@ namespace TerraFX.Samples.DirectX.D3D11; -public unsafe class HelloWindow11 : DX11Sample +public unsafe class HelloWindow11(string name) : DX11Sample(name) { - public HelloWindow11(string name) : base(name) - { - } - public override void OnUpdate(TimeSpan delta) { } diff --git a/samples/DirectX/D3D12/Shared/DX12Sample.cs b/samples/DirectX/D3D12/DX12Sample.cs similarity index 95% rename from samples/DirectX/D3D12/Shared/DX12Sample.cs rename to samples/DirectX/D3D12/DX12Sample.cs index 62472176b8..cbb6be1bb1 100644 --- a/samples/DirectX/D3D12/Shared/DX12Sample.cs +++ b/samples/DirectX/D3D12/DX12Sample.cs @@ -20,20 +20,19 @@ using static TerraFX.Interop.DirectX.DXGI; using static TerraFX.Interop.DirectX.DXGI_SWAP_EFFECT; using static TerraFX.Interop.Windows.Windows; -using static TerraFX.Samples.DirectX.DXSampleHelper; namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public abstract unsafe class DX12Sample : DXSample +public abstract unsafe class DX12Sample(string name) : DXSample(name) { - private readonly ID3D12CommandAllocator*[] _commandAllocators; + private readonly ID3D12CommandAllocator*[] _commandAllocators = new ID3D12CommandAllocator*[2]; private ID3D12Device2* _d3dDevice; private IDXGIAdapter1* _dxgiAdapter; private IDXGIFactory4* _dxgiFactory; private IDXGISwapChain3* _swapChain; - private ID3D12Resource*[] _renderTargets; + private ID3D12Resource*[] _renderTargets = new ID3D12Resource*[2]; private ID3D12Resource* _depthStencil; private ID3D12DescriptorHeap* _rtvHeap; private ID3D12DescriptorHeap* _dsvHeap; @@ -43,21 +42,13 @@ public abstract unsafe class DX12Sample : DXSample private uint _rtvDescriptorSize; private ID3D12Fence* _fence; - private ulong[] _fenceValues; + private ulong[] _fenceValues = new ulong[2]; private HANDLE _fenceEvent; - private ID3D12GraphicsCommandList*[] _graphicsCommandLists; + private ID3D12GraphicsCommandList*[] _graphicsCommandLists = new ID3D12GraphicsCommandList*[2]; private ID3D12RootSignature* _rootSignature; private ID3D12PipelineState* _pipelineState; - protected DX12Sample(string name) : base(name) - { - _renderTargets = new ID3D12Resource*[2]; - _commandAllocators = new ID3D12CommandAllocator*[2]; - _fenceValues = new ulong[2]; - _graphicsCommandLists = new ID3D12GraphicsCommandList*[2]; - } - public ID3D12CommandAllocator* CommandAllocator => _commandAllocators[FrameIndex]; public ID3D12CommandQueue* CommandQueue => _commandQueue; @@ -321,16 +312,16 @@ ulong[] CreateFenceValues() bool TryEnableDebugLayer() { #if DEBUG - // Enable the debug layer (requires the Graphics Tools "optional feature"). - // NOTE: Enabling the debug layer after device creation will invalidate the active device. + // Enable the debug layer (requires the Graphics Tools "optional feature"). + // NOTE: Enabling the debug layer after device creation will invalidate the active device. - using ComPtr debugController = null; + using ComPtr debugController = null; - if (D3D12GetDebugInterface(__uuidof(), (void**)&debugController).SUCCEEDED) - { - debugController.Get()->EnableDebugLayer(); - return true; - } + if (D3D12GetDebugInterface(__uuidof(), (void**)&debugController).SUCCEEDED) + { + debugController.Get()->EnableDebugLayer(); + return true; + } #endif return false; diff --git a/samples/DirectX/D3D12/HelloBundles.cs b/samples/DirectX/D3D12/HelloBundles.cs index f3330ac8ce..1e1683ff9b 100644 --- a/samples/DirectX/D3D12/HelloBundles.cs +++ b/samples/DirectX/D3D12/HelloBundles.cs @@ -7,22 +7,17 @@ using TerraFX.Interop.DirectX; using static TerraFX.Interop.DirectX.D3D_PRIMITIVE_TOPOLOGY; using static TerraFX.Interop.DirectX.D3D12_COMMAND_LIST_TYPE; -using static TerraFX.Samples.DirectX.DXSampleHelper; using static TerraFX.Interop.Windows.Windows; namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public unsafe class HelloBundles12 : HelloTriangle12 +public unsafe class HelloBundles12(string name) : HelloTriangle12(name) { // Pipeline objects private ID3D12CommandAllocator* _bundleAllocator; private ID3D12GraphicsCommandList* _bundle; - public HelloBundles12(string name) : base(name) - { - } - protected override void CreateAssets() { base.CreateAssets(); diff --git a/samples/DirectX/D3D12/HelloConstBuffer12.cs b/samples/DirectX/D3D12/HelloConstBuffer12.cs index cf5115323d..8cebfa047d 100644 --- a/samples/DirectX/D3D12/HelloConstBuffer12.cs +++ b/samples/DirectX/D3D12/HelloConstBuffer12.cs @@ -27,22 +27,17 @@ using static TerraFX.Interop.DirectX.DirectX; using static TerraFX.Interop.DirectX.DXGI_FORMAT; using static TerraFX.Interop.Windows.Windows; -using static TerraFX.Samples.DirectX.DXSampleHelper; namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public unsafe class HelloConstBuffer12 : HelloTriangle12 +public unsafe class HelloConstBuffer12(string name) : HelloTriangle12(name) { private ID3D12DescriptorHeap* _cbvHeap; private ID3D12Resource* _constantBuffer; private byte* _constantBufferDataBegin; private SceneConstantBuffer _constantBufferData; - public HelloConstBuffer12(string name) : base(name) - { - } - public override void OnUpdate(TimeSpan delta) { const float TranslationSpeed = 0.005f; @@ -118,8 +113,8 @@ protected override void CreateDescriptorHeaps() var compileFlags = 0u; #if DEBUG - // Enable better shader debugging with the graphics debugging tools. - compileFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; + // Enable better shader debugging with the graphics debugging tools. + compileFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; #endif fixed (char* fileName = GetAssetFullPath(@"D3D12\Assets\Shaders\HelloConstBuffer.hlsl")) { @@ -179,6 +174,7 @@ protected override void CreateDescriptorHeaps() gpsoDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; var pssDesc = new CD3DX12_PIPELINE_STATE_STREAM(gpsoDesc); + pssDesc.CS.pssType = D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS; var psoDesc = new D3D12_PIPELINE_STATE_STREAM_DESC { SizeInBytes = (uint)sizeof(CD3DX12_PIPELINE_STATE_STREAM), diff --git a/samples/DirectX/D3D12/HelloMultiSampling12.cs b/samples/DirectX/D3D12/HelloMultiSampling12.cs index 0a0b113847..6e03c2d812 100644 --- a/samples/DirectX/D3D12/HelloMultiSampling12.cs +++ b/samples/DirectX/D3D12/HelloMultiSampling12.cs @@ -14,22 +14,15 @@ using static TerraFX.Interop.DirectX.D3D12_RESOURCE_FLAGS; using static TerraFX.Interop.DirectX.D3D12_RESOURCE_STATES; using static TerraFX.Interop.DirectX.DXGI; -using static TerraFX.Samples.DirectX.DXSampleHelper; using static TerraFX.Interop.Windows.Windows; namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public unsafe class HelloMultiSampling12 : HelloTriangle12 +public unsafe class HelloMultiSampling12(string name) : HelloTriangle12(name) { - private ID3D12Resource*[] _msaaRenderTargets; - private DXGI_SAMPLE_DESC _msaaDesc; - - public HelloMultiSampling12(string name) : base(name) - { - _msaaRenderTargets = new ID3D12Resource*[2]; - _msaaDesc = new DXGI_SAMPLE_DESC(2, DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN); - } + private ID3D12Resource*[] _msaaRenderTargets = new ID3D12Resource*[2]; + private DXGI_SAMPLE_DESC _msaaDesc = new DXGI_SAMPLE_DESC(2, DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN); public ID3D12Resource* MSAARenderTarget => _msaaRenderTargets[FrameIndex]; diff --git a/samples/DirectX/D3D12/HelloTexture12.cs b/samples/DirectX/D3D12/HelloTexture12.cs index 89901a2782..ca37de9ced 100644 --- a/samples/DirectX/D3D12/HelloTexture12.cs +++ b/samples/DirectX/D3D12/HelloTexture12.cs @@ -32,12 +32,11 @@ using static TerraFX.Interop.DirectX.DirectX; using static TerraFX.Interop.DirectX.DXGI_FORMAT; using static TerraFX.Interop.Windows.Windows; -using static TerraFX.Samples.DirectX.DXSampleHelper; namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public unsafe class HelloTexture12 : HelloTriangle12 +public unsafe class HelloTexture12(string name) : HelloTriangle12(name) { private const uint TextureWidth = 256; private const uint TextureHeight = 256; @@ -46,10 +45,6 @@ public unsafe class HelloTexture12 : HelloTriangle12 private ID3D12DescriptorHeap* _srvHeap; private ID3D12Resource* _texture; - public HelloTexture12(string name) : base(name) - { - } - protected override void CreateAssets() { using ComPtr textureUploadHeap = null; @@ -112,7 +107,7 @@ protected override void CreateAssets() fixed (byte* pTextureData = &textureData[0]) { textureSubresourceData = new D3D12_SUBRESOURCE_DATA { - pData = (void*)pTextureData, + pData = pTextureData, RowPitch = (nint)rowPitch, SlicePitch = (nint)slicePitch, }; @@ -200,8 +195,8 @@ protected override void CreateDescriptorHeaps() var compileFlags = 0u; #if DEBUG - // Enable better shader debugging with the graphics debugging tools. - compileFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; + // Enable better shader debugging with the graphics debugging tools. + compileFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; #endif fixed (char* fileName = GetAssetFullPath(@"D3D12\Assets\Shaders\HelloTexture.hlsl")) { @@ -279,7 +274,7 @@ protected override void CreateDescriptorHeaps() HighestVersion = D3D_ROOT_SIGNATURE_VERSION_1_1 }; - if (D3DDevice->CheckFeatureSupport(D3D12_FEATURE_ROOT_SIGNATURE, &featureData, (uint)sizeof(D3D12_FEATURE)).FAILED) + if (D3DDevice->CheckFeatureSupport(D3D12_FEATURE_ROOT_SIGNATURE, &featureData, sizeof(D3D12_FEATURE)).FAILED) { featureData.HighestVersion = D3D_ROOT_SIGNATURE_VERSION_1_0; } diff --git a/samples/DirectX/D3D12/HelloTriangle12.cs b/samples/DirectX/D3D12/HelloTriangle12.cs index be4fc9c139..24677aec9d 100644 --- a/samples/DirectX/D3D12/HelloTriangle12.cs +++ b/samples/DirectX/D3D12/HelloTriangle12.cs @@ -20,20 +20,15 @@ using static TerraFX.Interop.DirectX.DirectX; using static TerraFX.Interop.DirectX.DXGI_FORMAT; using static TerraFX.Interop.Windows.Windows; -using static TerraFX.Samples.DirectX.DXSampleHelper; namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public unsafe class HelloTriangle12 : HelloWindow12 +public unsafe class HelloTriangle12(string name) : HelloWindow12(name) { private ID3D12Resource* _vertexBuffer; private D3D12_VERTEX_BUFFER_VIEW _vertexBufferView; - public HelloTriangle12(string name) : base(name) - { - } - public ref D3D12_VERTEX_BUFFER_VIEW VertexBufferView => ref _vertexBufferView; protected override void CreateAssets() @@ -56,8 +51,8 @@ protected virtual void CreateBuffers() var compileFlags = 0u; #if DEBUG - // Enable better shader debugging with the graphics debugging tools. - compileFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; + // Enable better shader debugging with the graphics debugging tools. + compileFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; #endif fixed (char* fileName = GetAssetFullPath(@"D3D12\Assets\Shaders\HelloTriangle.hlsl")) { diff --git a/samples/DirectX/D3D12/HelloWindow12.cs b/samples/DirectX/D3D12/HelloWindow12.cs index ccc629e4b9..345a9cbdff 100644 --- a/samples/DirectX/D3D12/HelloWindow12.cs +++ b/samples/DirectX/D3D12/HelloWindow12.cs @@ -9,12 +9,8 @@ namespace TerraFX.Samples.DirectX.D3D12; [SupportedOSPlatform("windows10.0")] -public unsafe class HelloWindow12 : DX12Sample +public unsafe class HelloWindow12(string name) : DX12Sample(name) { - public HelloWindow12(string name) : base(name) - { - } - protected override void Draw() { } diff --git a/samples/DirectX/Shared/DXSample.cs b/samples/DirectX/DXSample.cs similarity index 89% rename from samples/DirectX/Shared/DXSample.cs rename to samples/DirectX/DXSample.cs index 32d407a243..53e01c18e5 100644 --- a/samples/DirectX/Shared/DXSample.cs +++ b/samples/DirectX/DXSample.cs @@ -21,12 +21,12 @@ namespace TerraFX.Samples.DirectX; -public abstract unsafe class DXSample : IDisposable +public abstract unsafe class DXSample(string name) : IDisposable { public static readonly DXSample[] Samples = GetSamples(); - private readonly string _assetsPath; - private readonly string _name; + private readonly string _assetsPath = GetAssetsPath(); + private readonly string _name = name; private DXGI_FORMAT _backBufferFormat; private Vector4 _backgroundColor; private DXGI_FORMAT _depthBufferFormat; @@ -38,18 +38,11 @@ public abstract unsafe class DXSample : IDisposable private HWND _hwnd; private bool _isWindowVisible; private uint _previousFrameCount; - private TimeSpan _previousTimestamp; + private TimeSpan _previousTimestamp = GetCurrentTimestamp(); private TimeSpan _secondCounter; private Size _size; private bool _useWarpDevice; - protected DXSample(string name) - { - _assetsPath = GetAssetsPath(); - _name = name; - _previousTimestamp = GetCurrentTimestamp(); - } - ~DXSample() { Dispose(isDisposing: false); @@ -107,21 +100,21 @@ private static TimeSpan GetCurrentTimestamp() private static DXSample[] GetSamples() { var samples = new List(8) { - // new HelloWindow11("D3D11.HelloWindow") + new HelloWindow11("D3D11.HelloWindow") }; if (OperatingSystem.IsWindowsVersionAtLeast(10)) { - // samples.Add(new HelloTriangle11("D3D11.HelloTriangle")); - // samples.Add(new HelloWindow12("D3D12.HelloWindow")); - // samples.Add(new HelloTriangle12("D3D12.HelloTriangle")); + samples.Add(new HelloTriangle11("D3D11.HelloTriangle")); + samples.Add(new HelloWindow12("D3D12.HelloWindow")); + samples.Add(new HelloTriangle12("D3D12.HelloTriangle")); samples.Add(new HelloConstBuffer12("D3D12.HelloConstBuffer")); - // samples.Add(new HelloTexture12("D3D12.HelloTexture")); - // samples.Add(new HelloBundles12("D3D12.HelloBundles")); - // samples.Add(new HelloMultiSampling12("D3D12.HelloMultiSampling")); + samples.Add(new HelloTexture12("D3D12.HelloTexture")); + samples.Add(new HelloBundles12("D3D12.HelloBundles")); + samples.Add(new HelloMultiSampling12("D3D12.HelloMultiSampling")); } - return samples.ToArray(); + return [.. samples]; } public void Dispose() diff --git a/samples/DirectX/Shared/DXSampleHelper.cs b/samples/DirectX/DXSampleHelper.cs similarity index 91% rename from samples/DirectX/Shared/DXSampleHelper.cs rename to samples/DirectX/DXSampleHelper.cs index ed78e5f4e2..1aed4b1485 100644 --- a/samples/DirectX/Shared/DXSampleHelper.cs +++ b/samples/DirectX/DXSampleHelper.cs @@ -6,11 +6,7 @@ using System; using System.Diagnostics; using System.IO; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; namespace TerraFX.Samples.DirectX; diff --git a/samples/DirectX/Program.cs b/samples/DirectX/Program.cs index b617277e0f..c36d445c3f 100644 --- a/samples/DirectX/Program.cs +++ b/samples/DirectX/Program.cs @@ -72,7 +72,7 @@ private static void RunSamples(string[] args) } } - if (ranAnySamples == false) + if (!ranAnySamples) { PrintHelp(); } diff --git a/samples/DirectX/TerraFX.Samples.DirectX.csproj b/samples/DirectX/TerraFX.Samples.DirectX.csproj index 50b3799aa8..183c84e4a4 100644 --- a/samples/DirectX/TerraFX.Samples.DirectX.csproj +++ b/samples/DirectX/TerraFX.Samples.DirectX.csproj @@ -3,6 +3,7 @@ + TerraFX.Samples.DirectX net8.0;net9.0 diff --git a/samples/DirectX/Shared/Win32Application.cs b/samples/DirectX/Win32Application.cs similarity index 100% rename from samples/DirectX/Shared/Win32Application.cs rename to samples/DirectX/Win32Application.cs diff --git a/samples/WinForms/TerraFX.Samples.WinForms.csproj b/samples/WinForms/TerraFX.Samples.WinForms.csproj index 77b2bbe658..989ab378e9 100644 --- a/samples/WinForms/TerraFX.Samples.WinForms.csproj +++ b/samples/WinForms/TerraFX.Samples.WinForms.csproj @@ -3,8 +3,9 @@ - net8.0-windows;net9.0-windows WinExe + TerraFX.Samples.WinForms + net8.0-windows;net9.0-windows true diff --git a/sources/Interop/.editorconfig b/sources/Interop/.editorconfig index 77d7bcefbb..b084fd908c 100644 --- a/sources/Interop/.editorconfig +++ b/sources/Interop/.editorconfig @@ -28,7 +28,7 @@ dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.severit # Set dotnet style options to: # disable certain parent style options since they are not applicable to interop ############################################################################### -csharp_style_expression_bodied_methods = when_on_single_line:none +dotnet_style_namespace_match_folder = true:none dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:none dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none dotnet_style_parentheses_in_other_operators = never_if_unnecessary:none @@ -36,7 +36,22 @@ dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:non dotnet_style_prefer_compound_assignment = true:none dotnet_style_prefer_conditional_expression_over_assignment = true:none dotnet_style_prefer_conditional_expression_over_return = true:none + +############################################################################### +# Set csharp style options to: +# disable certain parent style options since they are not applicable to interop +############################################################################### +csharp_style_expression_bodied_methods = when_on_single_line:none csharp_style_prefer_pattern_matching = true:none +csharp_style_prefer_primary_constructors = true:none csharp_style_var_elsewhere = true:none csharp_style_var_for_built_in_types = true:none csharp_style_var_when_type_is_apparent = true:none + +############################################################################### +# Set dotnet diagnostic options to ignore: +# IDE0004 - Remove unnecessary cast +# IDE0005 - Remove unnecessary using directives +############################################################################### +dotnet_diagnostic.IDE0004.severity = none +dotnet_diagnostic.IDE0005.severity = none diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs index cb425848a6..0b97c25d87 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs @@ -370,7 +370,7 @@ public HRESULT Init(ID3D12Device* pDevice) return m_hStatus; } - // Retreives the status of the object. If an error occurred in the initialization process, the function returns the error code. + // Retrieves the status of the object. If an error occurred in the initialization process, the function returns the error code. public readonly HRESULT GetStatus() => m_hStatus; // Getter functions for each feature class diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_CLEAR_VALUE.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_CLEAR_VALUE.Manual.cs index c95a6a2a18..a2888fd66c 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_CLEAR_VALUE.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_CLEAR_VALUE.Manual.cs @@ -56,11 +56,11 @@ public D3D12_CLEAR_VALUE(DXGI_FORMAT format, float depth, [NativeTypeName("UINT8 public static bool operator !=([NativeTypeName("const D3D12_CLEAR_VALUE &")] in D3D12_CLEAR_VALUE l, [NativeTypeName("const D3D12_CLEAR_VALUE &")] in D3D12_CLEAR_VALUE r) => !(l == r); - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_CLEAR_VALUE other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_CLEAR_VALUE other) && Equals(other); - public bool Equals(D3D12_CLEAR_VALUE other) => (this == other); + public readonly bool Equals(D3D12_CLEAR_VALUE other) => (this == other); - public override int GetHashCode() + public override readonly int GetHashCode() { var hashCode = new HashCode(); diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_DESC.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_DESC.Manual.cs index eb92309093..7db17a78c6 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_DESC.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_DESC.Manual.cs @@ -21,13 +21,13 @@ public unsafe partial struct D3D12_HEAP_DESC : IEquatable public static bool operator !=([NativeTypeName("const D3D12_HEAP_DESC &")] in D3D12_HEAP_DESC l, [NativeTypeName("const D3D12_HEAP_DESC &")] in D3D12_HEAP_DESC r) => !(l == r); - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_HEAP_DESC other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_HEAP_DESC other) && Equals(other); - public bool Equals(D3D12_HEAP_DESC other) => (this == other); + public readonly bool Equals(D3D12_HEAP_DESC other) => (this == other); - public override int GetHashCode() => HashCode.Combine(SizeInBytes, Properties, Alignment, Flags); + public override readonly int GetHashCode() => HashCode.Combine(SizeInBytes, Properties, Alignment, Flags); - public bool IsCPUAccessible() + public readonly bool IsCPUAccessible() { return Properties.IsCPUAccessible(); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.Manual.cs index bb7bd76474..e955f74756 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.Manual.cs @@ -22,9 +22,9 @@ public partial struct D3D12_HEAP_PROPERTIES : IEquatable public static bool operator !=([NativeTypeName("const D3D12_HEAP_PROPERTIES &")] in D3D12_HEAP_PROPERTIES l, [NativeTypeName("const D3D12_HEAP_PROPERTIES &")] in D3D12_HEAP_PROPERTIES r) => !(l == r); - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_HEAP_PROPERTIES other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_HEAP_PROPERTIES other) && Equals(other); - public bool Equals(D3D12_HEAP_PROPERTIES other) => (this == other); + public readonly bool Equals(D3D12_HEAP_PROPERTIES other) => (this == other); - public override int GetHashCode() => HashCode.Combine(Type, CPUPageProperty, MemoryPoolPreference, CreationNodeMask, VisibleNodeMask); + public override readonly int GetHashCode() => HashCode.Combine(Type, CPUPageProperty, MemoryPoolPreference, CreationNodeMask, VisibleNodeMask); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.cs index 0abe5e441c..2b390f42ed 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_HEAP_PROPERTIES.cs @@ -32,7 +32,7 @@ public D3D12_HEAP_PROPERTIES(D3D12_HEAP_TYPE type, uint creationNodeMask = 1, ui VisibleNodeMask = nodeMask; } - public bool IsCPUAccessible() + public readonly bool IsCPUAccessible() { return Type == D3D12_HEAP_TYPE_UPLOAD || Type == D3D12_HEAP_TYPE_READBACK || Type == D3D12_HEAP_TYPE_GPU_UPLOAD || (Type == D3D12_HEAP_TYPE_CUSTOM && (CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE || CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_BACK)); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RASTERIZER_DESC2.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RASTERIZER_DESC2.Manual.cs index 0c3192f4a8..43044bd7fd 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RASTERIZER_DESC2.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RASTERIZER_DESC2.Manual.cs @@ -57,7 +57,7 @@ public D3D12_RASTERIZER_DESC2([NativeTypeName("const D3D12_RASTERIZER_DESC &")] } ForcedSampleCount = o->ForcedSampleCount; - ConservativeRaster = o->ConservativeRaster; + ConservativeRaster = o->ConservativeRaster; } public D3D12_RASTERIZER_DESC2([NativeTypeName("const D3D12_RASTERIZER_DESC &")] in D3D12_RASTERIZER_DESC o) diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.Manual.cs index d01b1827ff..827340a979 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.Manual.cs @@ -32,11 +32,11 @@ public unsafe partial struct D3D12_RESOURCE_DESC : IEquatable !(l == r); - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RESOURCE_DESC other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RESOURCE_DESC other) && Equals(other); - public bool Equals(D3D12_RESOURCE_DESC other) => (this == other); + public readonly bool Equals(D3D12_RESOURCE_DESC other) => (this == other); - public override int GetHashCode() + public override readonly int GetHashCode() { var hashCode = new HashCode(); @@ -62,13 +62,13 @@ public static D3D12_RESOURCE_DESC Buffer([NativeTypeName("const D3D12_RESOURCE_A } [return: NativeTypeName("UINT16")] - public ushort Depth() + public readonly ushort Depth() { return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : (ushort)(1)); } [return: NativeTypeName("UINT16")] - public ushort ArraySize() + public readonly ushort ArraySize() { return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : (ushort)(1)); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.cs index 5e2e01ae82..00dcf86c0f 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC.cs @@ -62,17 +62,17 @@ public static D3D12_RESOURCE_DESC Tex3D(DXGI_FORMAT format, [NativeTypeName("UIN } [return: NativeTypeName("UINT8")] - public byte PlaneCount(ID3D12Device* pDevice) + public readonly byte PlaneCount(ID3D12Device* pDevice) { return D3D12GetFormatPlaneCount(pDevice, Format); } - public uint Subresources(ID3D12Device* pDevice) + public readonly uint Subresources(ID3D12Device* pDevice) { return (uint)(MipLevels) * ArraySize() * PlaneCount(pDevice); } - public uint CalcSubresource(uint MipSlice, uint ArraySlice, uint PlaneSlice) + public readonly uint CalcSubresource(uint MipSlice, uint ArraySlice, uint PlaneSlice) { return D3D12CalcSubresource(MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize()); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.Manual.cs index 8acce84a58..f05a07de6b 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.Manual.cs @@ -35,11 +35,11 @@ public unsafe partial struct D3D12_RESOURCE_DESC1 : IEquatable !(l == r); - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RESOURCE_DESC1 other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RESOURCE_DESC1 other) && Equals(other); - public bool Equals(D3D12_RESOURCE_DESC1 other) => (this == other); + public readonly bool Equals(D3D12_RESOURCE_DESC1 other) => (this == other); - public override int GetHashCode() + public override readonly int GetHashCode() { var hashCode = new HashCode(); @@ -73,8 +73,7 @@ public D3D12_RESOURCE_DESC1([NativeTypeName("const D3D12_RESOURCE_DESC &")] in D SampleDesc = o.SampleDesc; Layout = o.Layout; Flags = o.Flags; - SamplerFeedbackMipRegion = new D3D12_MIP_REGION - { + SamplerFeedbackMipRegion = new D3D12_MIP_REGION { }; } @@ -85,13 +84,13 @@ public static D3D12_RESOURCE_DESC1 Buffer([NativeTypeName("const D3D12_RESOURCE_ } [return: NativeTypeName("UINT16")] - public ushort Depth() + public readonly ushort Depth() { return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : (ushort)(1)); } [return: NativeTypeName("UINT16")] - public ushort ArraySize() + public readonly ushort ArraySize() { return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : (ushort)(1)); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.cs index 4bec5286c4..5118ee69cc 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RESOURCE_DESC1.cs @@ -28,8 +28,7 @@ public D3D12_RESOURCE_DESC1([NativeTypeName("const D3D12_RESOURCE_DESC &")] D3D1 SampleDesc = o->SampleDesc; Layout = o->Layout; Flags = o->Flags; - SamplerFeedbackMipRegion = new D3D12_MIP_REGION - { + SamplerFeedbackMipRegion = new D3D12_MIP_REGION { }; } @@ -82,17 +81,17 @@ public static D3D12_RESOURCE_DESC1 Tex3D(DXGI_FORMAT format, [NativeTypeName("UI } [return: NativeTypeName("UINT8")] - public byte PlaneCount(ID3D12Device* pDevice) + public readonly byte PlaneCount(ID3D12Device* pDevice) { return D3D12GetFormatPlaneCount(pDevice, Format); } - public uint Subresources(ID3D12Device* pDevice) + public readonly uint Subresources(ID3D12Device* pDevice) { return (uint)(MipLevels) * ArraySize() * PlaneCount(pDevice); } - public uint CalcSubresource(uint MipSlice, uint ArraySlice, uint PlaneSlice) + public readonly uint CalcSubresource(uint MipSlice, uint ArraySlice, uint PlaneSlice) { return D3D12CalcSubresource(MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize()); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RT_FORMAT_ARRAY.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RT_FORMAT_ARRAY.Manual.cs index a28deed9b8..43c8f56322 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RT_FORMAT_ARRAY.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_RT_FORMAT_ARRAY.Manual.cs @@ -3,7 +3,6 @@ // Ported from d3dx12_core.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace TerraFX.Interop.DirectX; diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_TEXTURE_COPY_LOCATION.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_TEXTURE_COPY_LOCATION.cs index d3f6681bf7..7372b85a9d 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_TEXTURE_COPY_LOCATION.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_TEXTURE_COPY_LOCATION.cs @@ -16,10 +16,8 @@ public D3D12_TEXTURE_COPY_LOCATION(ID3D12Resource* pRes) { pResource = pRes; Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; - Anonymous.PlacedFootprint = new D3D12_PLACED_SUBRESOURCE_FOOTPRINT - { - Footprint = new D3D12_SUBRESOURCE_FOOTPRINT - { + Anonymous.PlacedFootprint = new D3D12_PLACED_SUBRESOURCE_FOOTPRINT { + Footprint = new D3D12_SUBRESOURCE_FOOTPRINT { }, }; } @@ -35,10 +33,8 @@ public D3D12_TEXTURE_COPY_LOCATION(ID3D12Resource* pRes, uint Sub) { pResource = pRes; Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; - Anonymous.PlacedFootprint = new D3D12_PLACED_SUBRESOURCE_FOOTPRINT - { - Footprint = new D3D12_SUBRESOURCE_FOOTPRINT - { + Anonymous.PlacedFootprint = new D3D12_PLACED_SUBRESOURCE_FOOTPRINT { + Footprint = new D3D12_SUBRESOURCE_FOOTPRINT { }, }; Anonymous.SubresourceIndex = Sub; diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_VIEWPORT.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_VIEWPORT.Manual.cs index 7b03d7f875..a4b27d8360 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_VIEWPORT.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/D3D12_VIEWPORT.Manual.cs @@ -29,7 +29,7 @@ public D3D12_VIEWPORT(ID3D12Resource* pResource, uint mipSlice = 0, float topLef break; } - + case D3D12_RESOURCE_DIMENSION_TEXTURE1D: { TopLeftX = topLeftX; @@ -49,6 +49,7 @@ public D3D12_VIEWPORT(ID3D12Resource* pResource, uint mipSlice = 0, float topLef break; } + case D3D12_RESOURCE_DIMENSION_UNKNOWN: default: { break; @@ -72,9 +73,9 @@ public D3D12_VIEWPORT(ID3D12Resource* pResource, uint mipSlice = 0, float topLef public static bool operator !=([NativeTypeName("const D3D12_VIEWPORT &")] in D3D12_VIEWPORT l, [NativeTypeName("const D3D12_VIEWPORT &")] in D3D12_VIEWPORT r) => !(l == r); - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_VIEWPORT other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_VIEWPORT other) && Equals(other); - public bool Equals(D3D12_VIEWPORT other) => (this == other); + public readonly bool Equals(D3D12_VIEWPORT other) => (this == other); - public override int GetHashCode() => HashCode.Combine(TopLeftX, TopLeftY, Width, Height, MinDepth, MaxDepth); + public override readonly int GetHashCode() => HashCode.Combine(TopLeftX, TopLeftY, Width, Height, MinDepth, MaxDepth); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/DirectX.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/DirectX.cs index ff13b0b3e7..f36df51b22 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/DirectX.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_core/DirectX.cs @@ -20,8 +20,7 @@ public static uint D3D12CalcSubresource(uint MipSlice, uint ArraySlice, uint Pla [return: NativeTypeName("UINT8")] public static byte D3D12GetFormatPlaneCount(ID3D12Device* pDevice, DXGI_FORMAT Format) { - D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = new D3D12_FEATURE_DATA_FORMAT_INFO - { + D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = new D3D12_FEATURE_DATA_FORMAT_INFO { Format = Format, PlaneCount = 0, }; diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM4.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM4.Manual.cs index 12bfb0c8fc..8ade59abc6 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM4.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM4.Manual.cs @@ -117,10 +117,10 @@ public CD3DX12_PIPELINE_STATE_STREAM4([NativeTypeName("const D3DX12_MESH_SHADER_ public CD3DX12_PIPELINE_STATE_STREAM4([NativeTypeName("const D3D12_COMPUTE_PIPELINE_STATE_DESC &")] in D3D12_COMPUTE_PIPELINE_STATE_DESC Desc) { Flags = Desc.Flags; - NodeMask = Desc.NodeMask; - pRootSignature = Desc.pRootSignature; - CS = Desc.CS; - CachedPSO = Desc.CachedPSO; + NodeMask = Desc.NodeMask; + pRootSignature = Desc.pRootSignature; + CS = Desc.CS; + CachedPSO = Desc.CachedPSO; DepthStencilState.pssInner.DepthEnable = false; } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM5_PARSE_HELPER.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM5_PARSE_HELPER.Manual.cs index 129615d8f2..5d2def1971 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM5_PARSE_HELPER.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM5_PARSE_HELPER.Manual.cs @@ -230,7 +230,7 @@ public static void RasterizerStateCb(CD3DX12_PIPELINE_STATE_STREAM5_PARSE_HELPER [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] public static void RasterizerState1Cb(CD3DX12_PIPELINE_STATE_STREAM5_PARSE_HELPER* pThis, [NativeTypeName("const D3D12_RASTERIZER_DESC1 &")] D3D12_RASTERIZER_DESC1* RasterizerState) { - pThis->PipelineStream.RasterizerState = new D3D12_RASTERIZER_DESC2(RasterizerState); + pThis->PipelineStream.RasterizerState = new D3D12_RASTERIZER_DESC2(RasterizerState); } [VtblIndex(22)] diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER.Manual.cs index d2e6b1b9d5..a5b230b2e2 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER.Manual.cs @@ -55,7 +55,7 @@ public unsafe struct CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER : ID3DX12Pipelin lpVtbl[28] = (delegate* unmanaged[MemberFunction])(&ErrorBadInputParameter); lpVtbl[29] = (delegate* unmanaged[MemberFunction])(&ErrorDuplicateSubobject); lpVtbl[30] = (delegate* unmanaged[MemberFunction])(&ErrorUnknownSubobject); - lpVtbl[31] = (delegate* unmanaged[MemberFunction]< CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER *, void>)(&Dispose); + lpVtbl[31] = (delegate* unmanaged[MemberFunction])(&Dispose); return lpVtbl; } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs index c5582eac1a..ba3df9f5d9 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs @@ -144,7 +144,7 @@ public static HRESULT D3DX12ParsePipelineStream([NativeTypeName("const D3D12_PIP SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1)); break; } - + case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER2: { pCallbacks->RasterizerState2Cb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2*)(pStream))->Anonymous.pssInner); @@ -172,7 +172,7 @@ public static HRESULT D3DX12ParsePipelineStream([NativeTypeName("const D3D12_PIP SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2)); break; } - + case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT: { pCallbacks->InputLayoutCb(&((CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT*)(pStream))->Anonymous.pssInner); diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_property_format_table/D3D12_PROPERTY_LAYOUT_FORMAT_TABLE.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_property_format_table/D3D12_PROPERTY_LAYOUT_FORMAT_TABLE.Manual.cs index e5dd38d1e2..072b700cc0 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_property_format_table/D3D12_PROPERTY_LAYOUT_FORMAT_TABLE.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_property_format_table/D3D12_PROPERTY_LAYOUT_FORMAT_TABLE.Manual.cs @@ -78,7 +78,7 @@ private static HRESULT Safe_UIntMult(uint uMultiplicand, uint uMultiplier, [Nati [MethodImpl(MethodImplOptions.AggressiveInlining)] private static HRESULT DivideAndRoundUp(uint dividend, uint divisor, [NativeTypeName("UINT &")] out uint result) { - HRESULT hr = Safe_UIntAdd(dividend, (divisor -1), out uint adjustedDividend); + HRESULT hr = Safe_UIntAdd(dividend, (divisor - 1), out uint adjustedDividend); result = SUCCEEDED(hr) ? (adjustedDividend / divisor) : 0; return hr; } @@ -86,7 +86,7 @@ private static HRESULT DivideAndRoundUp(uint dividend, uint divisor, [NativeType [MethodImpl(MethodImplOptions.AggressiveInlining)] private static bool IsPow2(uint Val) { - return 0 == (Val & (Val -1)); + return 0 == (Val & (Val - 1)); } public partial struct FORMAT_DETAIL @@ -809,7 +809,7 @@ public partial struct _BitsPerComponent_e__FixedBuffer DXGI_FORMAT_V408, DXGI_FORMAT_UNKNOWN // not part of cast set, just the "null terminator" ]; - + private static ReadOnlySpan D3DFCS_A4B4G4R4 => [ DXGI_FORMAT_A4B4G4R4_UNORM, DXGI_FORMAT_UNKNOWN // not part of cast set, just the "null terminator" @@ -2093,7 +2093,7 @@ public static HRESULT CalculateMinimumRowMajorRowPitch(DXGI_FORMAT Format, uint // compressed formats currently have non-pow2 alignment requriements. Debug.Assert(IsPow2(WidthAlignment)); - uint Mask = WidthAlignment -1; + uint Mask = WidthAlignment - 1; if (FAILED(Safe_UIntAdd(Width, Mask, out NumUnits))) { @@ -2155,7 +2155,7 @@ public static HRESULT CalculateMinimumRowMajorSlicePitch(DXGI_FORMAT Format, uin public static void GetYCbCrChromaSubsampling(DXGI_FORMAT Format, [NativeTypeName("UINT &")] out uint HorizontalSubsampling, [NativeTypeName("UINT &")] out uint VerticalSubsampling) { - switch( Format) + switch (Format) { // YCbCr 4:2:0 case DXGI_FORMAT_NV12: @@ -2307,15 +2307,15 @@ public static HRESULT CalculateResourceSize(uint width, uint height, uint depth, dst.pData = (void*)(totalByteSize); Debug.Assert((s != 0) || (dst.pData == null)); - dst.RowPitch = rowPitch; + dst.RowPitch = rowPitch; dst.SlicePitch = depthPitch; } // Align the subresource size. - Debug.Assert((MAP_ALIGN_REQUIREMENT & (MAP_ALIGN_REQUIREMENT -1)) == 0, "This code expects MAP_ALIGN_REQUIREMENT to be a power of 2."); - - nuint subresourceByteSizeAligned = subresourceByteSize + MAP_ALIGN_REQUIREMENT -1; - subresourceByteSizeAligned &= ~(MAP_ALIGN_REQUIREMENT -1u); + Debug.Assert((MAP_ALIGN_REQUIREMENT & (MAP_ALIGN_REQUIREMENT - 1)) == 0, "This code expects MAP_ALIGN_REQUIREMENT to be a power of 2."); + + nuint subresourceByteSizeAligned = subresourceByteSize + MAP_ALIGN_REQUIREMENT - 1; + subresourceByteSizeAligned &= ~(MAP_ALIGN_REQUIREMENT - 1u); totalByteSize += subresourceByteSizeAligned; // Iterate over mip levels and array elements diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS.Manual.cs index 15b79cde84..4b54320af1 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS.Manual.cs @@ -47,12 +47,12 @@ public partial struct D3D12_RENDER_PASS_BEGINNING_ACCESS : IEquatable !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_BEGINNING_ACCESS other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_BEGINNING_ACCESS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_BEGINNING_ACCESS other) => this == other; - public override int GetHashCode() + public override readonly int GetHashCode() { var hashCode = new HashCode(); hashCode.Add(Type); diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS.Manual.cs index 360408b969..7055fb409b 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS.Manual.cs @@ -16,10 +16,10 @@ public partial struct D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS : IEqu public static bool operator !=([NativeTypeName("const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &")] in D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS a, [NativeTypeName("const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &")] in D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS b) => !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS other) => this == other; - public override int GetHashCode() => ClearValue.GetHashCode(); + public override readonly int GetHashCode() => ClearValue.GetHashCode(); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs index b28a266222..573618b677 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs @@ -26,7 +26,7 @@ public partial struct D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETE public static bool operator !=([NativeTypeName("const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS &")] in D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS a, [NativeTypeName("const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS &")] in D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS b) => !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) { if (obj is D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS other1) { @@ -42,9 +42,9 @@ public override bool Equals([NotNullWhen(true)] object? obj) } } - public bool Equals(D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) => this == other; - public bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) => this == other; - public override int GetHashCode() => HashCode.Combine(AdditionalWidth, AdditionalHeight); + public override readonly int GetHashCode() => HashCode.Combine(AdditionalWidth, AdditionalHeight); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_DEPTH_STENCIL_DESC.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_DEPTH_STENCIL_DESC.Manual.cs index d1a5bfc478..ac7d33324a 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_DEPTH_STENCIL_DESC.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_DEPTH_STENCIL_DESC.Manual.cs @@ -43,10 +43,10 @@ public partial struct D3D12_RENDER_PASS_DEPTH_STENCIL_DESC : IEquatable !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_DEPTH_STENCIL_DESC other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_DEPTH_STENCIL_DESC other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_DEPTH_STENCIL_DESC other) => this == other; - public override int GetHashCode() => HashCode.Combine(cpuDescriptor.ptr, DepthBeginningAccess, StencilBeginningAccess, DepthEndingAccess, StencilEndingAccess); + public override readonly int GetHashCode() => HashCode.Combine(cpuDescriptor.ptr, DepthBeginningAccess, StencilBeginningAccess, DepthEndingAccess, StencilEndingAccess); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS.Manual.cs index 0f5433fb2e..bcd78d1606 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS.Manual.cs @@ -47,12 +47,12 @@ public partial struct D3D12_RENDER_PASS_ENDING_ACCESS : IEquatable !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_ENDING_ACCESS other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS other) => this == other; - public override int GetHashCode() + public override readonly int GetHashCode() { var hashCode = new HashCode(); hashCode.Add(Type); diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs index 3b23698311..3f71955995 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS.Manual.cs @@ -17,10 +17,10 @@ public partial struct D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS public static bool operator !=([NativeTypeName("const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS &")] in D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS a, [NativeTypeName("const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS &")] in D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS b) => !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS other) => this == other; - public override int GetHashCode() => HashCode.Combine(AdditionalWidth, AdditionalHeight); + public override readonly int GetHashCode() => HashCode.Combine(AdditionalWidth, AdditionalHeight); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS.Manual.cs index 9415af631d..6cb74d1895 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS.Manual.cs @@ -48,10 +48,10 @@ public unsafe partial struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS public static bool operator !=([NativeTypeName("const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &")] in D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS a, [NativeTypeName("const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &")] in D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS b) => !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS other) => this == other; - public override int GetHashCode() => HashCode.Combine((nuint)(pSrcResource), (nuint)(pDstResource), SubresourceCount, Format, ResolveMode, PreserveResolveSource); + public override readonly int GetHashCode() => HashCode.Combine((nuint)(pSrcResource), (nuint)(pDstResource), SubresourceCount, Format, ResolveMode, PreserveResolveSource); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_RENDER_TARGET_DESC.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_RENDER_TARGET_DESC.Manual.cs index ddcf243679..88031b4806 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_RENDER_TARGET_DESC.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_render_pass/D3D12_RENDER_PASS_RENDER_TARGET_DESC.Manual.cs @@ -33,10 +33,10 @@ public partial struct D3D12_RENDER_PASS_RENDER_TARGET_DESC : IEquatable !(a == b); - public override bool Equals([NotNullWhen(true)] object? obj) + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_RENDER_PASS_RENDER_TARGET_DESC other) && Equals(other); - public bool Equals(D3D12_RENDER_PASS_RENDER_TARGET_DESC other) => this == other; + public readonly bool Equals(D3D12_RENDER_PASS_RENDER_TARGET_DESC other) => this == other; - public override int GetHashCode() => HashCode.Combine(cpuDescriptor.ptr, BeginningAccess, EndingAccess); + public override readonly int GetHashCode() => HashCode.Combine(cpuDescriptor.ptr, BeginningAccess, EndingAccess); } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_resource_helpers/DirectX.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_resource_helpers/DirectX.Manual.cs index 7ac708cc62..55a8844e64 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_resource_helpers/DirectX.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_resource_helpers/DirectX.Manual.cs @@ -23,7 +23,7 @@ public static void D3D12DecomposeSubresource([NativeTypeName("UINT")] u { MipSlice = T.CreateTruncating(Subresource % MipLevels); ArraySlice = U.CreateTruncating((Subresource / MipLevels) % ArraySize); - PlaneSlice = V.CreateTruncating(Subresource / (MipLevels* ArraySize)); + PlaneSlice = V.CreateTruncating(Subresource / (MipLevels * ArraySize)); } /// @@ -67,8 +67,7 @@ public static ulong UpdateSubresources(ID3D12GraphicsCommandList* pCmdList, ID3D return 0; } - D3D12_MEMCPY_DEST DestData = new D3D12_MEMCPY_DEST - { + D3D12_MEMCPY_DEST DestData = new D3D12_MEMCPY_DEST { pData = pData + pLayouts[i].Offset, RowPitch = pLayouts[i].Footprint.RowPitch, SlicePitch = unchecked((nuint)(pLayouts[i].Footprint.RowPitch) * (nuint)(pNumRows[i])), @@ -123,8 +122,7 @@ public static ulong UpdateSubresources(ID3D12GraphicsCommandList* pCmdList, ID3D return 0; } - D3D12_MEMCPY_DEST DestData = new D3D12_MEMCPY_DEST - { + D3D12_MEMCPY_DEST DestData = new D3D12_MEMCPY_DEST { pData = pData + pLayouts[i].Offset, RowPitch = pLayouts[i].Footprint.RowPitch, SlicePitch = unchecked((nuint)(pLayouts[i].Footprint.RowPitch) * (nuint)(pNumRows[i])), @@ -280,7 +278,7 @@ public static bool D3DX12GetCopyableFootprints([NativeTypeName("const D3D12_RESO D3D12DecomposeSubresource(Subresource, resourceDesc.MipLevels, resourceDesc.ArraySize(), out uint MipLevel, out uint ArraySlice, out uint PlaneSlice); ulong Width = D3DX12AlignAtLeast(resourceDesc.Width >> (int)(MipLevel), WidthAlignment); - uint Height = D3DX12AlignAtLeast(resourceDesc.Height >> (int)(MipLevel), HeightAlignment); + uint Height = D3DX12AlignAtLeast(resourceDesc.Height >> (int)(MipLevel), HeightAlignment); ushort Depth = D3DX12AlignAtLeast((ushort)(resourceDesc.Depth() >> (int)(MipLevel)), DepthAlignment); D3D12_PROPERTY_LAYOUT_FORMAT_TABLE.GetPlaneSubsampledSizeAndFormatForCopyableLayout(PlaneSlice, Format, (uint)(Width), Height, out DXGI_FORMAT PlaneFormat, out uint MinPlanePitchWidth, out uint PlaneWidth, out uint PlaneHeight); @@ -332,11 +330,11 @@ public static bool D3DX12GetCopyableFootprints([NativeTypeName("const D3D12_RESO ulong SubresourceSize = (NumRows * NumSlices - 1) * Placement->RowPitch + MinPlaneRowPitch; TotalBytes += SubresourceSize; - if(TotalBytes < SubresourceSize) + if (TotalBytes < SubresourceSize) { TotalBytes = uint64_max; } - bResourceOverflow = bResourceOverflow || bOverflow; + bResourceOverflow = bResourceOverflow || bOverflow; } // Overflow error @@ -362,7 +360,7 @@ public static bool D3DX12GetCopyableFootprints([NativeTypeName("const D3D12_RESO { *pTotalBytes = TotalBytes; } - if(TotalBytes == uint64_max) + if (TotalBytes == uint64_max) { return false; } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_CPU_DESCRIPTOR_HANDLE.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_CPU_DESCRIPTOR_HANDLE.Manual.cs index 41e9d0de9c..f15689c5fa 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_CPU_DESCRIPTOR_HANDLE.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_CPU_DESCRIPTOR_HANDLE.Manual.cs @@ -28,11 +28,11 @@ public D3D12_CPU_DESCRIPTOR_HANDLE([NativeTypeName("const D3D12_CPU_DESCRIPTOR_H public static bool operator !=(D3D12_CPU_DESCRIPTOR_HANDLE left, D3D12_CPU_DESCRIPTOR_HANDLE right) => left.ptr != right.ptr; - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_CPU_DESCRIPTOR_HANDLE other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_CPU_DESCRIPTOR_HANDLE other) && Equals(other); - public bool Equals(D3D12_CPU_DESCRIPTOR_HANDLE other) => this == other; + public readonly bool Equals(D3D12_CPU_DESCRIPTOR_HANDLE other) => this == other; - public override int GetHashCode() => ptr.GetHashCode(); + public override readonly int GetHashCode() => ptr.GetHashCode(); public void InitOffsetted([NativeTypeName("const D3D12_CPU_DESCRIPTOR_HANDLE &")] in D3D12_CPU_DESCRIPTOR_HANDLE @base, int offsetScaledByIncrementSize) { diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_GPU_DESCRIPTOR_HANDLE.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_GPU_DESCRIPTOR_HANDLE.Manual.cs index 0c108c07a1..6c2fae723a 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_GPU_DESCRIPTOR_HANDLE.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_GPU_DESCRIPTOR_HANDLE.Manual.cs @@ -31,11 +31,11 @@ public D3D12_GPU_DESCRIPTOR_HANDLE([NativeTypeName("const D3D12_GPU_DESCRIPTOR_H public static bool operator !=(D3D12_GPU_DESCRIPTOR_HANDLE left, D3D12_GPU_DESCRIPTOR_HANDLE right) => left.ptr != right.ptr; - public override bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_GPU_DESCRIPTOR_HANDLE other) && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? obj) => (obj is D3D12_GPU_DESCRIPTOR_HANDLE other) && Equals(other); - public bool Equals(D3D12_GPU_DESCRIPTOR_HANDLE other) => this == other; + public readonly bool Equals(D3D12_GPU_DESCRIPTOR_HANDLE other) => this == other; - public override int GetHashCode() => ptr.GetHashCode(); + public override readonly int GetHashCode() => ptr.GetHashCode(); public void InitOffsetted([NativeTypeName("const D3D12_GPU_DESCRIPTOR_HANDLE &")] in D3D12_GPU_DESCRIPTOR_HANDLE @base, int offsetScaledByIncrementSize) { diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_ROOT_DESCRIPTOR1.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_ROOT_DESCRIPTOR1.Manual.cs index 0d957704d9..161588bd55 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_ROOT_DESCRIPTOR1.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_root_signature/D3D12_ROOT_DESCRIPTOR1.Manual.cs @@ -3,7 +3,6 @@ // Ported from d3dx12_root_signature.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license -using System.Runtime.CompilerServices; using static TerraFX.Interop.DirectX.D3D12_ROOT_DESCRIPTOR_FLAGS; namespace TerraFX.Interop.DirectX; diff --git a/sources/Interop/Windows/DirectX/um/d3d11/D3D11_BOX.Manual.cs b/sources/Interop/Windows/DirectX/um/d3d11/D3D11_BOX.Manual.cs index 8db5ceccad..4e27762dfd 100644 --- a/sources/Interop/Windows/DirectX/um/d3d11/D3D11_BOX.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/d3d11/D3D11_BOX.Manual.cs @@ -32,9 +32,9 @@ public D3D11_BOX(int Left, int Top, int Front, int Right, int Bottom, int Back) public static bool operator !=(D3D11_BOX l, D3D11_BOX r) => !(l == r); - public override bool Equals(object? obj) => (obj is D3D11_BOX other) && Equals(other); + public override readonly bool Equals(object? obj) => (obj is D3D11_BOX other) && Equals(other); - public bool Equals(D3D11_BOX other) => this == other; + public readonly bool Equals(D3D11_BOX other) => this == other; - public override int GetHashCode() => HashCode.Combine(left, top, front, right, bottom, back); + public override readonly int GetHashCode() => HashCode.Combine(left, top, front, right, bottom, back); } diff --git a/sources/Interop/Windows/DirectX/um/d3d11/D3D11_VIEWPORT.Manual.cs b/sources/Interop/Windows/DirectX/um/d3d11/D3D11_VIEWPORT.Manual.cs index 39c34ece50..cbfa45726c 100644 --- a/sources/Interop/Windows/DirectX/um/d3d11/D3D11_VIEWPORT.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/d3d11/D3D11_VIEWPORT.Manual.cs @@ -185,9 +185,9 @@ public D3D11_VIEWPORT(ID3D11Texture3D* pTex3D, ID3D11RenderTargetView* pRTView, public static bool operator !=(in D3D11_VIEWPORT l, in D3D11_VIEWPORT r) => !(l == r); - public override bool Equals(object? obj) => (obj is D3D11_VIEWPORT other) && Equals(other); + public override readonly bool Equals(object? obj) => (obj is D3D11_VIEWPORT other) && Equals(other); - public bool Equals(D3D11_VIEWPORT other) => this == other; + public readonly bool Equals(D3D11_VIEWPORT other) => this == other; - public override int GetHashCode() => HashCode.Combine(TopLeftX, TopLeftY, Width, Height, MinDepth, MaxDepth); + public override readonly int GetHashCode() => HashCode.Combine(TopLeftX, TopLeftY, Width, Height, MinDepth, MaxDepth); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.Manual.cs index f064fa88e5..4e81c13c17 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_3X2_F.Manual.cs @@ -171,9 +171,9 @@ public readonly D2D_POINT_2F TransformPoint([NativeTypeName("D2D1_POINT_2F")] D2 public static bool operator !=(D2D_MATRIX_3X2_F l, D2D_MATRIX_3X2_F r) => !(l == r); - public bool Equals(D2D_MATRIX_3X2_F other) => this == other; + public readonly bool Equals(D2D_MATRIX_3X2_F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_MATRIX_3X2_F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_MATRIX_3X2_F other) && this == other; public override int GetHashCode() => HashCode.Combine(m11, m12, m21, m22, dx, dy); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X3_F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X3_F.Manual.cs index 63dd26f21c..ad39068b8e 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X3_F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X3_F.Manual.cs @@ -66,9 +66,9 @@ public static ref readonly D2D_MATRIX_4X3_F Identity public static bool operator !=([NativeTypeName("const D2D_MATRIX_4X3_F &")] in D2D_MATRIX_4X3_F l, [NativeTypeName("const D2D_MATRIX_4X3_F &")] in D2D_MATRIX_4X3_F r) => !(l == r); - public bool Equals(D2D_MATRIX_4X3_F other) => this == other; + public readonly bool Equals(D2D_MATRIX_4X3_F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_MATRIX_4X3_F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_MATRIX_4X3_F other) && this == other; public override int GetHashCode() { diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.Manual.cs index 76df00de13..ffaf6a46b0 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_4X4_F.Manual.cs @@ -269,9 +269,9 @@ public void SetProduct([NativeTypeName("const D2D1_MATRIX_4x4_F &")] in D2D_MATR return result; } - public bool Equals(D2D_MATRIX_4X4_F other) => this == other; + public readonly bool Equals(D2D_MATRIX_4X4_F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_MATRIX_4X4_F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_MATRIX_4X4_F other) && this == other; public override int GetHashCode() { diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_5X4_F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_5X4_F.Manual.cs index 4be172c614..b5430f4ddb 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_5X4_F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_MATRIX_5X4_F.Manual.cs @@ -1,4 +1,4 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License._d in the repository root for more information. +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. // Ported from um/d2d1_1helper.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. @@ -83,9 +83,9 @@ public D2D_MATRIX_5X4_F(float m11, float m12, float m13, float m14, float m21, f public static bool operator !=([NativeTypeName("const D2D1_MATRIX_5X4_F &")] in D2D_MATRIX_5X4_F l, [NativeTypeName("const D2D1_MATRIX_5X4_F &")] in D2D_MATRIX_5X4_F r) => !(l == r); - public bool Equals(D2D_MATRIX_5X4_F other) => this == other; + public readonly bool Equals(D2D_MATRIX_5X4_F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_MATRIX_5X4_F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_MATRIX_5X4_F other) && this == other; public override int GetHashCode() { diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2F.Manual.cs index 61842bf76d..cd111e279d 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2F.Manual.cs @@ -24,9 +24,9 @@ public D2D_POINT_2F(float x = 0.0f, float y = 0.0f) public static bool operator !=([NativeTypeName("const D2D1_POINT_2F &")] in D2D_POINT_2F l, [NativeTypeName("const D2D1_POINT_2F &")] in D2D_POINT_2F r) => !(l == r); - public bool Equals(D2D_POINT_2F other) => this == other; + public readonly bool Equals(D2D_POINT_2F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_POINT_2F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_POINT_2F other) && this == other; - public override int GetHashCode() => HashCode.Combine(x, y); + public override readonly int GetHashCode() => HashCode.Combine(x, y); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2U.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2U.Manual.cs index 1a20013870..3ec9acc9ff 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2U.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_POINT_2U.Manual.cs @@ -24,9 +24,9 @@ public D2D_POINT_2U([NativeTypeName("UINT32")] uint x = 0, [NativeTypeName("UINT public static bool operator !=([NativeTypeName("const D2D1_POINT_2U &")] in D2D_POINT_2U l, [NativeTypeName("const D2D1_POINT_2U &")] in D2D_POINT_2U r) => !(l == r); - public bool Equals(D2D_POINT_2U other) => this == other; + public readonly bool Equals(D2D_POINT_2U other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_POINT_2U other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_POINT_2U other) && this == other; - public override int GetHashCode() => HashCode.Combine(x, y); + public override readonly int GetHashCode() => HashCode.Combine(x, y); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_F.Manual.cs index 81ae869477..5344abba51 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_F.Manual.cs @@ -46,9 +46,9 @@ public D2D_RECT_F(float left = 0.0f, float top = 0.0f, float right = 0.0f, float public static bool operator !=([NativeTypeName("const D2D1_RECT_F &")] in D2D_RECT_F l, [NativeTypeName("const D2D1_RECT_F &")] in D2D_RECT_F r) => !(l == r); - public bool Equals(D2D_RECT_F other) => this == other; + public readonly bool Equals(D2D_RECT_F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_RECT_F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_RECT_F other) && this == other; - public override int GetHashCode() => HashCode.Combine(left, top, right, bottom); + public override readonly int GetHashCode() => HashCode.Combine(left, top, right, bottom); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_U.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_U.Manual.cs index f7819c653b..d4bc1a66a0 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_U.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_RECT_U.Manual.cs @@ -43,9 +43,9 @@ public static D2D_RECT_U Infinite } } - public bool Equals(D2D_RECT_U other) => this == other; + public readonly bool Equals(D2D_RECT_U other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_RECT_U other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_RECT_U other) && this == other; - public override int GetHashCode() => HashCode.Combine(left, top, right, bottom); + public override readonly int GetHashCode() => HashCode.Combine(left, top, right, bottom); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_F.Manual.cs index 83d9b28015..8d645706e1 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_F.Manual.cs @@ -24,9 +24,9 @@ public D2D_SIZE_F(float width = 0.0f, float height = 0.0f) public static bool operator !=([NativeTypeName("const D2D1_SIZE_F &")] in D2D_SIZE_F l, [NativeTypeName("const D2D1_SIZE_F &")] in D2D_SIZE_F r) => !(l == r); - public bool Equals(D2D_SIZE_F other) => this == other; + public readonly bool Equals(D2D_SIZE_F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_SIZE_F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_SIZE_F other) && this == other; - public override int GetHashCode() => HashCode.Combine(width, height); + public override readonly int GetHashCode() => HashCode.Combine(width, height); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_U.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_U.Manual.cs index dd0c7171e1..a5c8c0c8db 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_U.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_SIZE_U.Manual.cs @@ -24,9 +24,9 @@ public D2D_SIZE_U([NativeTypeName("UINT32")] uint width = 0, [NativeTypeName("UI public static bool operator !=([NativeTypeName("const D2D1_SIZE_U &")] in D2D_SIZE_U l, [NativeTypeName("const D2D1_SIZE_U &")] in D2D_SIZE_U r) => !(l == r); - public bool Equals(D2D_SIZE_U other) => this == other; + public readonly bool Equals(D2D_SIZE_U other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_SIZE_U other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_SIZE_U other) && this == other; - public override int GetHashCode() => HashCode.Combine(width, height); + public override readonly int GetHashCode() => HashCode.Combine(width, height); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_2F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_2F.Manual.cs index cf707ba457..27af9da359 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_2F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_2F.Manual.cs @@ -24,9 +24,9 @@ public D2D_VECTOR_2F(float x = 0.0f, float y = 0.0f) public static bool operator !=([NativeTypeName("const D2D_VECTOR_2F &")] in D2D_VECTOR_2F l, [NativeTypeName("const D2D_VECTOR_2F &")] in D2D_VECTOR_2F r) => !(l == r); - public bool Equals(D2D_VECTOR_2F other) => this == other; + public readonly bool Equals(D2D_VECTOR_2F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_VECTOR_2F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_VECTOR_2F other) && this == other; - public override int GetHashCode() => HashCode.Combine(x, y); + public override readonly int GetHashCode() => HashCode.Combine(x, y); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_3F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_3F.Manual.cs index 0125cb25be..35f174101f 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_3F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_3F.Manual.cs @@ -26,9 +26,9 @@ public D2D_VECTOR_3F(float x = 0.0f, float y = 0.0f, float z = 0.0f) public static bool operator !=([NativeTypeName("const D2D_VECTOR_2F &")] in D2D_VECTOR_3F l, [NativeTypeName("const D2D_VECTOR_2F &")] in D2D_VECTOR_3F r) => !(l == r); - public bool Equals(D2D_VECTOR_3F other) => this == other; + public readonly bool Equals(D2D_VECTOR_3F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_VECTOR_3F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_VECTOR_3F other) && this == other; - public override int GetHashCode() => HashCode.Combine(x, y, z); + public override readonly int GetHashCode() => HashCode.Combine(x, y, z); } diff --git a/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_4F.Manual.cs b/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_4F.Manual.cs index c1410ebf8a..70159ae552 100644 --- a/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_4F.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dcommon/D2D_VECTOR_4F.Manual.cs @@ -28,9 +28,9 @@ public D2D_VECTOR_4F(float x, float y, float z, float w) public static bool operator !=([NativeTypeName("const D2D_VECTOR_2F &")] in D2D_VECTOR_4F l, [NativeTypeName("const D2D_VECTOR_2F &")] in D2D_VECTOR_4F r) => !(l == r); - public bool Equals(D2D_VECTOR_4F other) => this == other; + public readonly bool Equals(D2D_VECTOR_4F other) => this == other; - public override bool Equals(object? obj) => (obj is D2D_VECTOR_4F other) && this == other; + public override readonly bool Equals(object? obj) => (obj is D2D_VECTOR_4F other) && this == other; - public override int GetHashCode() => HashCode.Combine(x, y, z, w); + public override readonly int GetHashCode() => HashCode.Combine(x, y, z, w); } diff --git a/sources/Interop/Windows/DirectX/um/dinput/DIJOFS.Manual.cs b/sources/Interop/Windows/DirectX/um/dinput/DIJOFS.Manual.cs index 47ae094175..cb03bbf420 100644 --- a/sources/Interop/Windows/DirectX/um/dinput/DIJOFS.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dinput/DIJOFS.Manual.cs @@ -4,7 +4,6 @@ // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; namespace TerraFX.Interop.DirectX; diff --git a/sources/Interop/Windows/DirectX/um/dinput/DirectX.Manual.cs b/sources/Interop/Windows/DirectX/um/dinput/DirectX.Manual.cs index a8236be3dc..1db72781de 100644 --- a/sources/Interop/Windows/DirectX/um/dinput/DirectX.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/dinput/DirectX.Manual.cs @@ -3,7 +3,6 @@ // Ported from um/dinput.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.DIMOFS; namespace TerraFX.Interop.DirectX; diff --git a/sources/Interop/Windows/DirectX/um/x3daudio/DirectX.Manual.cs b/sources/Interop/Windows/DirectX/um/x3daudio/DirectX.Manual.cs index 5e099a7701..ba13d17280 100644 --- a/sources/Interop/Windows/DirectX/um/x3daudio/DirectX.Manual.cs +++ b/sources/Interop/Windows/DirectX/um/x3daudio/DirectX.Manual.cs @@ -25,7 +25,7 @@ public static ReadOnlySpan X3DAudioDefault_Linear 0x00, 0x00, 0x00, 0x00 ]; - Debug.Assert(data.Length == (Unsafe.SizeOf()* 2)); + Debug.Assert(data.Length == (Unsafe.SizeOf() * 2)); return MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As(ref MemoryMarshal.GetReference(data)), 2); } } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.Manual.cs index 71e9e19be4..f9c6665873 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.Manual.cs @@ -9,7 +9,7 @@ namespace TerraFX.Interop.Gdiplus; public partial struct Color { - public COLORREF ToCOLORREF() + public readonly COLORREF ToCOLORREF() { return (COLORREF)(GetRed() | (GetGreen() << 8) | (GetBlue() << 16)); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.cs b/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.cs index 8343640f63..c1a2b07865 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluscolor/Color.cs @@ -34,48 +34,48 @@ public Color([NativeTypeName("Gdiplus::ARGB")] uint argb) Argb = argb; } - public byte GetAlpha() + public readonly byte GetAlpha() { return (byte)(Argb >> (int)(AlphaShift)); } - public byte GetA() + public readonly byte GetA() { return GetAlpha(); } - public byte GetRed() + public readonly byte GetRed() { return (byte)(Argb >> (int)(RedShift)); } - public byte GetR() + public readonly byte GetR() { return GetRed(); } - public byte GetGreen() + public readonly byte GetGreen() { return (byte)(Argb >> (int)(GreenShift)); } - public byte GetG() + public readonly byte GetG() { return GetGreen(); } - public byte GetBlue() + public readonly byte GetBlue() { return (byte)(Argb >> (int)(BlueShift)); } - public byte GetB() + public readonly byte GetB() { return GetBlue(); } [return: NativeTypeName("Gdiplus::ARGB")] - public uint GetValue() + public readonly uint GetValue() { return Argb; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Blur.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Blur.cs index 89e0aae7ad..085454c037 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Blur.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Blur.cs @@ -14,12 +14,12 @@ public unsafe partial struct Blur { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const BlurParams *")] BlurParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const BlurParams *")] BlurParams* parameters) { uint size = 8; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const BlurParams *")] BlurParams* } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::BlurParams *")] BlurParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::BlurParams *")] BlurParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/BrightnessContrast.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/BrightnessContrast.cs index cccc49116f..8dce7dbfe1 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/BrightnessContrast.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/BrightnessContrast.cs @@ -14,12 +14,12 @@ public unsafe partial struct BrightnessContrast { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const BrightnessContrastParams *")] BrightnessContrastParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const BrightnessContrastParams *")] BrightnessContrastParams* parameters) { uint size = 8; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const BrightnessContrastParams *" } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::BrightnessContrastParams *")] BrightnessContrastParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::BrightnessContrastParams *")] BrightnessContrastParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorBalance.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorBalance.cs index 78e6d63105..616f5245e7 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorBalance.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorBalance.cs @@ -14,12 +14,12 @@ public unsafe partial struct ColorBalance { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const ColorBalanceParams *")] ColorBalanceParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const ColorBalanceParams *")] ColorBalanceParams* parameters) { uint size = 12; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const ColorBalanceParams *")] Col } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorBalanceParams *")] ColorBalanceParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorBalanceParams *")] ColorBalanceParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorCurve.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorCurve.cs index d97d422e2e..bf2e9f630e 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorCurve.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorCurve.cs @@ -14,12 +14,12 @@ public unsafe partial struct ColorCurve { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const ColorCurveParams *")] ColorCurveParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const ColorCurveParams *")] ColorCurveParams* parameters) { uint size = 12; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const ColorCurveParams *")] Color } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorCurveParams *")] ColorCurveParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorCurveParams *")] ColorCurveParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorLUT.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorLUT.cs index f8382d1370..44412c1bae 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorLUT.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorLUT.cs @@ -14,12 +14,12 @@ public unsafe partial struct ColorLUT { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const ColorLUTParams *")] ColorLUTParams* lut) + public readonly GpStatus SetParameters([NativeTypeName("const ColorLUTParams *")] ColorLUTParams* lut) { uint size = 1024; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const ColorLUTParams *")] ColorLU } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorLUTParams *")] ColorLUTParams* lut) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorLUTParams *")] ColorLUTParams* lut) { return Base.GetParameters(size, unchecked((void*)(lut))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorMatrixEffect.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorMatrixEffect.cs index f67f36044e..f068b1da37 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorMatrixEffect.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/ColorMatrixEffect.cs @@ -14,12 +14,12 @@ public unsafe partial struct ColorMatrixEffect { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const ColorMatrix *")] ColorMatrix* matrix) + public readonly GpStatus SetParameters([NativeTypeName("const ColorMatrix *")] ColorMatrix* matrix) { uint size = 100; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const ColorMatrix *")] ColorMatri } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorMatrix *")] ColorMatrix* matrix) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::ColorMatrix *")] ColorMatrix* matrix) { return Base.GetParameters(size, unchecked((void*)(matrix))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Effect.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Effect.cs index 6fdeba0c60..b28549b3a3 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Effect.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Effect.cs @@ -27,12 +27,12 @@ public unsafe partial struct Effect : Effect.Interface /// public BOOL useAuxData; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return auxDataSize; } - public void* GetAuxData() + public readonly void* GetAuxData() { return auxData; } @@ -43,19 +43,19 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return GdipGetEffectParameterSize(nativeEffect, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return GdipSetEffectParameters(nativeEffect, @params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return GdipGetEffectParameters(nativeEffect, size, @params); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/HueSaturationLightness.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/HueSaturationLightness.cs index bc1932fd09..0b18ed9fed 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/HueSaturationLightness.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/HueSaturationLightness.cs @@ -14,12 +14,12 @@ public unsafe partial struct HueSaturationLightness { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const HueSaturationLightnessParams *")] HueSaturationLightnessParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const HueSaturationLightnessParams *")] HueSaturationLightnessParams* parameters) { uint size = 12; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const HueSaturationLightnessParam } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::HueSaturationLightnessParams *")] HueSaturationLightnessParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::HueSaturationLightnessParams *")] HueSaturationLightnessParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Levels.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Levels.cs index f8f08d96c5..ccb5564ba7 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Levels.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Levels.cs @@ -14,12 +14,12 @@ public unsafe partial struct Levels { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const LevelsParams *")] LevelsParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const LevelsParams *")] LevelsParams* parameters) { uint size = 12; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const LevelsParams *")] LevelsPar } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::LevelsParams *")] LevelsParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::LevelsParams *")] LevelsParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/RedEyeCorrection.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/RedEyeCorrection.cs index 42a888152b..50e3f5e3c0 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/RedEyeCorrection.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/RedEyeCorrection.cs @@ -15,12 +15,12 @@ public unsafe partial struct RedEyeCorrection { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -31,25 +31,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const RedEyeCorrectionParams *")] RedEyeCorrectionParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const RedEyeCorrectionParams *")] RedEyeCorrectionParams* parameters) { GpStatus status = InvalidParameter; @@ -65,7 +65,7 @@ public GpStatus SetParameters([NativeTypeName("const RedEyeCorrectionParams *")] } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::RedEyeCorrectionParams *")] RedEyeCorrectionParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::RedEyeCorrectionParams *")] RedEyeCorrectionParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Sharpen.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Sharpen.cs index 0a777be5bf..53e0debf6e 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Sharpen.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Sharpen.cs @@ -14,12 +14,12 @@ public unsafe partial struct Sharpen { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const SharpenParams *")] SharpenParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const SharpenParams *")] SharpenParams* parameters) { uint size = 8; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const SharpenParams *")] SharpenP } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::SharpenParams *")] SharpenParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::SharpenParams *")] SharpenParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Tint.cs b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Tint.cs index 700fa189a1..5429f13cab 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Tint.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluseffects/Tint.cs @@ -14,12 +14,12 @@ public unsafe partial struct Tint { public Effect Base; - public int GetAuxDataSize() + public readonly int GetAuxDataSize() { return Base.GetAuxDataSize(); } - public void* GetAuxData() + public readonly void* GetAuxData() { return Base.GetAuxData(); } @@ -30,25 +30,25 @@ public void UseAuxData([NativeTypeName("const BOOL")] BOOL useAuxDataFlag) } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameterSize(uint* size) + public readonly GpStatus GetParameterSize(uint* size) { return Base.GetParameterSize(size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) + public readonly GpStatus SetParameters([NativeTypeName("const void *")] void* @params, [NativeTypeName("const UINT")] uint size) { return Base.SetParameters(@params, size); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, void* @params) + public readonly GpStatus GetParameters(uint* size, void* @params) { return Base.GetParameters(size, @params); } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus SetParameters([NativeTypeName("const TintParams *")] TintParams* parameters) + public readonly GpStatus SetParameters([NativeTypeName("const TintParams *")] TintParams* parameters) { uint size = 8; @@ -56,7 +56,7 @@ public GpStatus SetParameters([NativeTypeName("const TintParams *")] TintParams* } [return: NativeTypeName("Gdiplus::Status")] - public GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::TintParams *")] TintParams* parameters) + public readonly GpStatus GetParameters(uint* size, [NativeTypeName("Gdiplus::TintParams *")] TintParams* parameters) { return Base.GetParameters(size, unchecked((void*)(parameters))); } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplusgpstubs/GpTexture.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdiplusgpstubs/GpTexture.Manual.cs index ebc2ed028d..35d7cf2d90 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplusgpstubs/GpTexture.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplusgpstubs/GpTexture.Manual.cs @@ -1,3 +1,4 @@ + // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. namespace TerraFX.Interop.Gdiplus; diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInput.cs b/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInput.cs index a22931e739..176616f59c 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInput.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInput.cs @@ -25,7 +25,7 @@ public unsafe partial struct GdiplusStartupInput /// public BOOL SuppressExternalCodecs; - public GdiplusStartupInput([NativeTypeName("Gdiplus::DebugEventProc")] [Optional] delegate* unmanaged debugEventCallback, [Optional] BOOL suppressBackgroundThread, [Optional] BOOL suppressExternalCodecs) + public GdiplusStartupInput([NativeTypeName("Gdiplus::DebugEventProc")][Optional] delegate* unmanaged debugEventCallback, [Optional] BOOL suppressBackgroundThread, [Optional] BOOL suppressExternalCodecs) { GdiplusVersion = 1; DebugEventCallback = debugEventCallback; diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInputEx.cs b/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInputEx.cs index b7cc938c85..5432f5c039 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInputEx.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplusinit/GdiplusStartupInputEx.cs @@ -18,7 +18,7 @@ public unsafe partial struct GdiplusStartupInputEx /// public int StartupParameters; - public GdiplusStartupInputEx([Optional] int startupParameters, [NativeTypeName("Gdiplus::DebugEventProc")] [Optional] delegate* unmanaged debugEventCallback, [Optional] BOOL suppressBackgroundThread, [Optional] BOOL suppressExternalCodecs) + public GdiplusStartupInputEx([Optional] int startupParameters, [NativeTypeName("Gdiplus::DebugEventProc")][Optional] delegate* unmanaged debugEventCallback, [Optional] BOOL suppressBackgroundThread, [Optional] BOOL suppressExternalCodecs) { Base.GdiplusVersion = 2; Base.DebugEventCallback = debugEventCallback; @@ -27,7 +27,7 @@ public GdiplusStartupInputEx([Optional] int startupParameters, [NativeTypeName(" StartupParameters = startupParameters; } - public GdiplusStartupInputEx([NativeTypeName("Gdiplus::GdiplusStartupInputEx::Version")] Version gdiplusVersion, [Optional] int startupParameters, [NativeTypeName("Gdiplus::DebugEventProc")] [Optional] delegate* unmanaged debugEventCallback, [Optional] BOOL suppressBackgroundThread, [Optional] BOOL suppressExternalCodecs) + public GdiplusStartupInputEx([NativeTypeName("Gdiplus::GdiplusStartupInputEx::Version")] Version gdiplusVersion, [Optional] int startupParameters, [NativeTypeName("Gdiplus::DebugEventProc")][Optional] delegate* unmanaged debugEventCallback, [Optional] BOOL suppressBackgroundThread, [Optional] BOOL suppressExternalCodecs) { Base.GdiplusVersion = (uint)(gdiplusVersion); Base.DebugEventCallback = debugEventCallback; diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.Manual.cs index bd624cded8..f4bfa74790 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.Manual.cs @@ -10,12 +10,12 @@ namespace TerraFX.Interop.Gdiplus; public partial struct MetafileHeader { - public BOOL IsEmfOrEmfPlus() + public readonly BOOL IsEmfOrEmfPlus() { return Type >= MetafileTypeEmf; } - public BOOL IsEmfPlus() + public readonly BOOL IsEmfPlus() { return Type >= MetafileTypeEmfPlusOnly; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.cs b/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.cs index 7854d02a00..5d7808828a 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplusmetaheader/MetafileHeader.cs @@ -83,39 +83,39 @@ public ref ENHMETAHEADER3 EmfHeader } [return: NativeTypeName("Gdiplus::MetafileType")] - public new MetafileType GetType() + public new readonly MetafileType GetType() { return Type; } - public uint GetMetafileSize() + public readonly uint GetMetafileSize() { return Size; } - public uint GetVersion() + public readonly uint GetVersion() { return Version; } - public uint GetEmfPlusFlags() + public readonly uint GetEmfPlusFlags() { return EmfPlusFlags; } [return: NativeTypeName("Gdiplus::REAL")] - public float GetDpiX() + public readonly float GetDpiX() { return DpiX; } [return: NativeTypeName("Gdiplus::REAL")] - public float GetDpiY() + public readonly float GetDpiY() { return DpiY; } - public void GetBounds([NativeTypeName("Gdiplus::Rect *")] GpRect* rect) + public readonly void GetBounds([NativeTypeName("Gdiplus::Rect *")] GpRect* rect) { rect->X = X; rect->Y = Y; @@ -123,32 +123,32 @@ public void GetBounds([NativeTypeName("Gdiplus::Rect *")] GpRect* rect) rect->Height = Height; } - public BOOL IsWmf() + public readonly BOOL IsWmf() { return ((Type == MetafileTypeWmf) || (Type == MetafileTypeWmfPlaceable)) ? 1 : 0; } - public BOOL IsWmfPlaceable() + public readonly BOOL IsWmfPlaceable() { return (Type == MetafileTypeWmfPlaceable) ? 1 : 0; } - public BOOL IsEmf() + public readonly BOOL IsEmf() { return (Type == MetafileTypeEmf) ? 1 : 0; } - public BOOL IsEmfPlusDual() + public readonly BOOL IsEmfPlusDual() { return (Type == MetafileTypeEmfPlusDual) ? 1 : 0; } - public BOOL IsEmfPlusOnly() + public readonly BOOL IsEmfPlusOnly() { return (Type == MetafileTypeEmfPlusOnly) ? 1 : 0; } - public BOOL IsDisplay() + public readonly BOOL IsDisplay() { return ((IsEmfPlus()) != 0 && ((EmfPlusFlags & 0x00000001) != 0)) ? 1 : 0; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdipluspixelformats/Gdiplus.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdipluspixelformats/Gdiplus.Manual.cs index df302c2f76..220097561f 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdipluspixelformats/Gdiplus.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdipluspixelformats/Gdiplus.Manual.cs @@ -3,8 +3,6 @@ // Ported from um/gdipluspixelformats.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using TerraFX.Interop.Windows; - namespace TerraFX.Interop.Gdiplus; public static partial class Gdiplus diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Gdiplus.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Gdiplus.Manual.cs index e38d20608a..019e0c27bc 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Gdiplus.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Gdiplus.Manual.cs @@ -3,8 +3,6 @@ // Ported from um/gdiplustypes.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using static TerraFX.Interop.Windows.Windows; - namespace TerraFX.Interop.Gdiplus; public static partial class Gdiplus diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPoint.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPoint.cs index 7991e95be1..1463ab3b8e 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPoint.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPoint.cs @@ -39,7 +39,7 @@ public GpPoint(int x, int y) Y = y; } - public BOOL Equals([NativeTypeName("const Point &")] GpPoint* point) + public readonly BOOL Equals([NativeTypeName("const Point &")] GpPoint* point) { return ((X == point->X) && (Y == point->Y)) ? 1 : 0; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPointF.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPointF.cs index b1c6693b22..b4d381cfb3 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPointF.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpPointF.cs @@ -41,7 +41,7 @@ public GpPointF([NativeTypeName("Gdiplus::REAL")] float x, [NativeTypeName("Gdip Y = y; } - public BOOL Equals([NativeTypeName("const PointF &")] GpPointF* point) + public readonly BOOL Equals([NativeTypeName("const PointF &")] GpPointF* point) { return ((X == point->X) && (Y == point->Y)) ? 1 : 0; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRect.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRect.cs index da614d4ce5..2f47e52505 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRect.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRect.cs @@ -43,19 +43,19 @@ public GpRect([NativeTypeName("const Point &")] GpPoint* location, [NativeTypeNa Height = size->Height; } - public void GetLocation([NativeTypeName("Gdiplus::Point *")] GpPoint* point) + public readonly void GetLocation([NativeTypeName("Gdiplus::Point *")] GpPoint* point) { point->X = X; point->Y = Y; } - public void GetSize([NativeTypeName("Gdiplus::Size *")] Size* size) + public readonly void GetSize([NativeTypeName("Gdiplus::Size *")] Size* size) { size->Width = Width; size->Height = Height; } - public void GetBounds([NativeTypeName("Gdiplus::Rect *")] GpRect* rect) + public readonly void GetBounds([NativeTypeName("Gdiplus::Rect *")] GpRect* rect) { rect->X = X; rect->Y = Y; @@ -63,47 +63,47 @@ public void GetBounds([NativeTypeName("Gdiplus::Rect *")] GpRect* rect) rect->Height = Height; } - public int GetLeft() + public readonly int GetLeft() { return X; } - public int GetTop() + public readonly int GetTop() { return Y; } - public int GetRight() + public readonly int GetRight() { return X + Width; } - public int GetBottom() + public readonly int GetBottom() { return Y + Height; } - public BOOL IsEmptyArea() + public readonly BOOL IsEmptyArea() { return ((Width <= 0) || (Height <= 0)) ? 1 : 0; } - public BOOL Equals([NativeTypeName("const Rect &")] GpRect* rect) + public readonly BOOL Equals([NativeTypeName("const Rect &")] GpRect* rect) { return (X == rect->X && Y == rect->Y && Width == rect->Width && Height == rect->Height) ? 1 : 0; } - public BOOL Contains(int x, int y) + public readonly BOOL Contains(int x, int y) { return (x >= X && x < X + Width && y >= Y && y < Y + Height) ? 1 : 0; } - public BOOL Contains([NativeTypeName("const Point &")] GpPoint* pt) + public readonly BOOL Contains([NativeTypeName("const Point &")] GpPoint* pt) { return Contains(pt->X, pt->Y); } - public BOOL Contains([NativeTypeName("Gdiplus::Rect &")] GpRect* rect) + public readonly BOOL Contains([NativeTypeName("Gdiplus::Rect &")] GpRect* rect) { return ((X <= rect->X) && (rect->GetRight() <= GetRight()) && (Y <= rect->Y) && (rect->GetBottom() <= GetBottom())) ? 1 : 0; } @@ -135,7 +135,7 @@ public static BOOL Intersect([NativeTypeName("Gdiplus::Rect &")] GpRect* c, [Nat return (c->IsEmptyArea() == 0) ? 1 : 0; } - public BOOL IntersectsWith([NativeTypeName("const Rect &")] GpRect* rect) + public readonly BOOL IntersectsWith([NativeTypeName("const Rect &")] GpRect* rect) { return (GetLeft() < rect->GetRight() && GetTop() < rect->GetBottom() && GetRight() > rect->GetLeft() && GetBottom() > rect->GetTop()) ? 1 : 0; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRectF.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRectF.cs index ab8d14ff54..b5fef821c4 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRectF.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpRectF.cs @@ -47,19 +47,19 @@ public GpRectF([NativeTypeName("const PointF &")] GpPointF* location, [NativeTyp Height = size->Height; } - public void GetLocation([NativeTypeName("Gdiplus::PointF *")] GpPointF* point) + public readonly void GetLocation([NativeTypeName("Gdiplus::PointF *")] GpPointF* point) { point->X = X; point->Y = Y; } - public void GetSize([NativeTypeName("Gdiplus::SizeF *")] GpSizeF* size) + public readonly void GetSize([NativeTypeName("Gdiplus::SizeF *")] GpSizeF* size) { size->Width = Width; size->Height = Height; } - public void GetBounds([NativeTypeName("Gdiplus::RectF *")] GpRectF* rect) + public readonly void GetBounds([NativeTypeName("Gdiplus::RectF *")] GpRectF* rect) { rect->X = X; rect->Y = Y; @@ -68,50 +68,50 @@ public void GetBounds([NativeTypeName("Gdiplus::RectF *")] GpRectF* rect) } [return: NativeTypeName("Gdiplus::REAL")] - public float GetLeft() + public readonly float GetLeft() { return X; } [return: NativeTypeName("Gdiplus::REAL")] - public float GetTop() + public readonly float GetTop() { return Y; } [return: NativeTypeName("Gdiplus::REAL")] - public float GetRight() + public readonly float GetRight() { return X + Width; } [return: NativeTypeName("Gdiplus::REAL")] - public float GetBottom() + public readonly float GetBottom() { return Y + Height; } - public BOOL IsEmptyArea() + public readonly BOOL IsEmptyArea() { return ((Width <= 1.192092896e-07F) || (Height <= 1.192092896e-07F)) ? 1 : 0; } - public BOOL Equals([NativeTypeName("const RectF &")] GpRectF* rect) + public readonly BOOL Equals([NativeTypeName("const RectF &")] GpRectF* rect) { return (X == rect->X && Y == rect->Y && Width == rect->Width && Height == rect->Height) ? 1 : 0; } - public BOOL Contains([NativeTypeName("Gdiplus::REAL")] float x, [NativeTypeName("Gdiplus::REAL")] float y) + public readonly BOOL Contains([NativeTypeName("Gdiplus::REAL")] float x, [NativeTypeName("Gdiplus::REAL")] float y) { return (x >= X && x < X + Width && y >= Y && y < Y + Height) ? 1 : 0; } - public BOOL Contains([NativeTypeName("const PointF &")] GpPointF* pt) + public readonly BOOL Contains([NativeTypeName("const PointF &")] GpPointF* pt) { return Contains(pt->X, pt->Y); } - public BOOL Contains([NativeTypeName("const RectF &")] GpRectF* rect) + public readonly BOOL Contains([NativeTypeName("const RectF &")] GpRectF* rect) { return ((X <= rect->X) && (rect->GetRight() <= GetRight()) && (Y <= rect->Y) && (rect->GetBottom() <= GetBottom())) ? 1 : 0; } @@ -143,7 +143,7 @@ public static BOOL Intersect([NativeTypeName("Gdiplus::RectF &")] GpRectF* c, [N return (c->IsEmptyArea() == 0) ? 1 : 0; } - public BOOL IntersectsWith([NativeTypeName("const RectF &")] GpRectF* rect) + public readonly BOOL IntersectsWith([NativeTypeName("const RectF &")] GpRectF* rect) { return (GetLeft() < rect->GetRight() && GetTop() < rect->GetBottom() && GetRight() > rect->GetLeft() && GetBottom() > rect->GetTop()) ? 1 : 0; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.Manual.cs index 7967b9d763..89098b4842 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.Manual.cs @@ -7,7 +7,7 @@ namespace TerraFX.Interop.Gdiplus; public partial struct GpSizeF { - public static GpSizeF operator+(in GpSizeF self, in GpSizeF sz) + public static GpSizeF operator +(in GpSizeF self, in GpSizeF sz) { return new GpSizeF( self.Width + sz.Width, diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.cs index 209d9a712d..ef82b53e75 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/GpSizeF.cs @@ -35,12 +35,12 @@ public GpSizeF([NativeTypeName("Gdiplus::REAL")] float width, [NativeTypeName("G Height = height; } - public BOOL Equals([NativeTypeName("const SizeF &")] GpSizeF* sz) + public readonly BOOL Equals([NativeTypeName("const SizeF &")] GpSizeF* sz) { return ((Width == sz->Width) && (Height == sz->Height)) ? 1 : 0; } - public BOOL Empty() + public readonly BOOL Empty() { return (Width == 0.0f && Height == 0.0f) ? 1 : 0; } diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.Manual.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.Manual.cs index e61da10202..3437d8248d 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.Manual.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.Manual.cs @@ -7,7 +7,7 @@ namespace TerraFX.Interop.Gdiplus; public partial struct Size { - public static Size operator+(in Size self, in Size sz) + public static Size operator +(in Size self, in Size sz) { return new Size( self.Width + sz.Width, diff --git a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.cs b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.cs index 1a932f4112..0609dd8683 100644 --- a/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.cs +++ b/sources/Interop/Windows/Gdiplus/um/gdiplustypes/Size.cs @@ -33,12 +33,12 @@ public Size(int width, int height) Height = height; } - public BOOL Equals([NativeTypeName("const Size &")] Size* sz) + public readonly BOOL Equals([NativeTypeName("const Size &")] Size* sz) { return ((Width == sz->Width) && (Height == sz->Height)) ? 1 : 0; } - public BOOL Empty() + public readonly BOOL Empty() { return (Width == 0 && Height == 0) ? 1 : 0; } diff --git a/sources/Interop/Windows/WinRT/winrt/WeakReference/IWeakReference.Manual.cs b/sources/Interop/Windows/WinRT/winrt/WeakReference/IWeakReference.Manual.cs index 9411387dd4..1289bf0a72 100644 --- a/sources/Interop/Windows/WinRT/winrt/WeakReference/IWeakReference.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/WeakReference/IWeakReference.Manual.cs @@ -3,7 +3,6 @@ // Ported from winrt/WeakReference.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; using static TerraFX.Interop.Windows.Windows; namespace TerraFX.Interop.WinRT; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.applicationmodel.search/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.applicationmodel.search/IID.Manual.cs index 6af8cdd0c5..5e64c1726a 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.applicationmodel.search/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.applicationmodel.search/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.bluetooth.background/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.bluetooth.background/IID.Manual.cs index c658484442..7162e5a249 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.bluetooth.background/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.bluetooth.background/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.devices.gpio.provider/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.devices.gpio.provider/IID.Manual.cs index f1d001aa14..4583165600 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.devices.gpio.provider/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.devices.gpio.provider/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.networking.connectivity/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.networking.connectivity/IID.Manual.cs index d79b25daf5..15cd5ac079 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.networking.connectivity/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.networking.connectivity/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.security.cryptography.core/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.security.cryptography.core/IID.Manual.cs index 49322e70e4..f1ba5f1d90 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.security.cryptography.core/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.security.cryptography.core/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui.core/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui.core/IID.Manual.cs index cc299d826c..791f392b3d 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui.core/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui.core/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui.text.core/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui.text.core/IID.Manual.cs index bac482f652..14916460df 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui.text.core/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui.text.core/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement.core/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement.core/IID.Manual.cs index 78303a4abc..b97ec04952 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement.core/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement.core/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement/IID.Manual.cs b/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement/IID.Manual.cs index 5b6c46db90..18348025da 100644 --- a/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement/IID.Manual.cs +++ b/sources/Interop/Windows/WinRT/winrt/windows.ui.viewmanagement/IID.Manual.cs @@ -7,7 +7,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using TerraFX.Interop.WinRT; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/Windows/other/helper-types/APARTMENT_SHUTDOWN_REGISTRATION_COOKIE.cs b/sources/Interop/Windows/Windows/other/helper-types/APARTMENT_SHUTDOWN_REGISTRATION_COOKIE.cs index b0cf5585bc..fe1fdaa7df 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/APARTMENT_SHUTDOWN_REGISTRATION_COOKIE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/APARTMENT_SHUTDOWN_REGISTRATION_COOKIE.cs @@ -79,7 +79,7 @@ public APARTMENT_SHUTDOWN_REGISTRATION_COOKIE(void* value) public int CompareTo(object? obj) { - if (obj is APARTMENT_SHUTDOWN_REGISTRATION_COOKIE other) + if (obj is APARTMENT_SHUTDOWN_REGISTRATION_COOKIE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/ASYNCCOMPLETIONHANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/ASYNCCOMPLETIONHANDLE.cs index 51a52924bd..62434d070b 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/ASYNCCOMPLETIONHANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/ASYNCCOMPLETIONHANDLE.cs @@ -73,7 +73,7 @@ public ASYNCCOMPLETIONHANDLE(void* value) public int CompareTo(object? obj) { - if (obj is ASYNCCOMPLETIONHANDLE other) + if (obj is ASYNCCOMPLETIONHANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/BOOL.cs b/sources/Interop/Windows/Windows/other/helper-types/BOOL.cs index b95851c6b4..e0831c04a6 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/BOOL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/BOOL.cs @@ -79,7 +79,7 @@ public BOOL(int value) public int CompareTo(object? obj) { - if (obj is BOOL other) + if (obj is BOOL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/COLORREF.cs b/sources/Interop/Windows/Windows/other/helper-types/COLORREF.cs index 082e68b970..1ed6977e99 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/COLORREF.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/COLORREF.cs @@ -67,7 +67,7 @@ public COLORREF(uint value) public int CompareTo(object? obj) { - if (obj is COLORREF other) + if (obj is COLORREF other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/COMPRESSOR_HANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/COMPRESSOR_HANDLE.cs index 9cdf6d0d8f..677f09a5bd 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/COMPRESSOR_HANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/COMPRESSOR_HANDLE.cs @@ -79,7 +79,7 @@ public COMPRESSOR_HANDLE(void* value) public int CompareTo(object? obj) { - if (obj is COMPRESSOR_HANDLE other) + if (obj is COMPRESSOR_HANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/CO_DEVICE_CATALOG_COOKIE.cs b/sources/Interop/Windows/Windows/other/helper-types/CO_DEVICE_CATALOG_COOKIE.cs index 99319a6922..b1431705e8 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/CO_DEVICE_CATALOG_COOKIE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/CO_DEVICE_CATALOG_COOKIE.cs @@ -79,7 +79,7 @@ public CO_DEVICE_CATALOG_COOKIE(void* value) public int CompareTo(object? obj) { - if (obj is CO_DEVICE_CATALOG_COOKIE other) + if (obj is CO_DEVICE_CATALOG_COOKIE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/CO_MTA_USAGE_COOKIE.cs b/sources/Interop/Windows/Windows/other/helper-types/CO_MTA_USAGE_COOKIE.cs index 9859074287..e083e0f28c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/CO_MTA_USAGE_COOKIE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/CO_MTA_USAGE_COOKIE.cs @@ -79,7 +79,7 @@ public CO_MTA_USAGE_COOKIE(void* value) public int CompareTo(object? obj) { - if (obj is CO_MTA_USAGE_COOKIE other) + if (obj is CO_MTA_USAGE_COOKIE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/DPI_AWARENESS_CONTEXT.cs b/sources/Interop/Windows/Windows/other/helper-types/DPI_AWARENESS_CONTEXT.cs index 2ac200900c..28f8f6f4c2 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/DPI_AWARENESS_CONTEXT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/DPI_AWARENESS_CONTEXT.cs @@ -79,7 +79,7 @@ public DPI_AWARENESS_CONTEXT(void* value) public int CompareTo(object? obj) { - if (obj is DPI_AWARENESS_CONTEXT other) + if (obj is DPI_AWARENESS_CONTEXT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/EC_HANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/EC_HANDLE.cs index 34082be73d..fa0a7ae2db 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/EC_HANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/EC_HANDLE.cs @@ -79,7 +79,7 @@ public EC_HANDLE(void* value) public int CompareTo(object? obj) { - if (obj is EC_HANDLE other) + if (obj is EC_HANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/EC_OBJECT_ARRAY_PROPERTY_HANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/EC_OBJECT_ARRAY_PROPERTY_HANDLE.cs index 8dba3dad64..3f7fc4548a 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/EC_OBJECT_ARRAY_PROPERTY_HANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/EC_OBJECT_ARRAY_PROPERTY_HANDLE.cs @@ -79,7 +79,7 @@ public EC_OBJECT_ARRAY_PROPERTY_HANDLE(void* value) public int CompareTo(object? obj) { - if (obj is EC_OBJECT_ARRAY_PROPERTY_HANDLE other) + if (obj is EC_OBJECT_ARRAY_PROPERTY_HANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HACCEL.cs b/sources/Interop/Windows/Windows/other/helper-types/HACCEL.cs index 644226317a..8ab89d84ea 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HACCEL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HACCEL.cs @@ -79,7 +79,7 @@ public HACCEL(void* value) public int CompareTo(object? obj) { - if (obj is HACCEL other) + if (obj is HACCEL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/HANDLE.cs index 3818a7e694..42bc1d2fe9 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HANDLE.cs @@ -75,7 +75,7 @@ public HANDLE(void* value) public int CompareTo(object? obj) { - if (obj is HANDLE other) + if (obj is HANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HANDLE_PTR.cs b/sources/Interop/Windows/Windows/other/helper-types/HANDLE_PTR.cs index 707a16cf1d..3959bb7458 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HANDLE_PTR.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HANDLE_PTR.cs @@ -73,7 +73,7 @@ public HANDLE_PTR(void* value) public int CompareTo(object? obj) { - if (obj is HANDLE_PTR other) + if (obj is HANDLE_PTR other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HANIMATIONBUFFER.cs b/sources/Interop/Windows/Windows/other/helper-types/HANIMATIONBUFFER.cs index a321cd017d..d9a483bd8d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HANIMATIONBUFFER.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HANIMATIONBUFFER.cs @@ -79,7 +79,7 @@ public HANIMATIONBUFFER(void* value) public int CompareTo(object? obj) { - if (obj is HANIMATIONBUFFER other) + if (obj is HANIMATIONBUFFER other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HBITMAP.cs b/sources/Interop/Windows/Windows/other/helper-types/HBITMAP.cs index 345409b7cb..f89a5190a1 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HBITMAP.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HBITMAP.cs @@ -79,7 +79,7 @@ public HBITMAP(void* value) public int CompareTo(object? obj) { - if (obj is HBITMAP other) + if (obj is HBITMAP other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HBRUSH.cs b/sources/Interop/Windows/Windows/other/helper-types/HBRUSH.cs index a6a7f28bef..2c2b2ce4be 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HBRUSH.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HBRUSH.cs @@ -79,7 +79,7 @@ public HBRUSH(void* value) public int CompareTo(object? obj) { - if (obj is HBRUSH other) + if (obj is HBRUSH other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCATADMIN.cs b/sources/Interop/Windows/Windows/other/helper-types/HCATADMIN.cs index f6a23e38e8..f4422a0aa8 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCATADMIN.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCATADMIN.cs @@ -79,7 +79,7 @@ public HCATADMIN(void* value) public int CompareTo(object? obj) { - if (obj is HCATADMIN other) + if (obj is HCATADMIN other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCERTCHAINENGINE.cs b/sources/Interop/Windows/Windows/other/helper-types/HCERTCHAINENGINE.cs index bddaa8f15a..b8ecb3d668 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCERTCHAINENGINE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCERTCHAINENGINE.cs @@ -79,7 +79,7 @@ public HCERTCHAINENGINE(void* value) public int CompareTo(object? obj) { - if (obj is HCERTCHAINENGINE other) + if (obj is HCERTCHAINENGINE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCERTSTORE.cs b/sources/Interop/Windows/Windows/other/helper-types/HCERTSTORE.cs index bffc280e3b..ccd6e0b10b 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCERTSTORE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCERTSTORE.cs @@ -79,7 +79,7 @@ public HCERTSTORE(void* value) public int CompareTo(object? obj) { - if (obj is HCERTSTORE other) + if (obj is HCERTSTORE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCERTSTOREPROV.cs b/sources/Interop/Windows/Windows/other/helper-types/HCERTSTOREPROV.cs index ba699539be..ab2b3fb7d3 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCERTSTOREPROV.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCERTSTOREPROV.cs @@ -79,7 +79,7 @@ public HCERTSTOREPROV(void* value) public int CompareTo(object? obj) { - if (obj is HCERTSTOREPROV other) + if (obj is HCERTSTOREPROV other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCERT_SERVER_OCSP_RESPONSE.cs b/sources/Interop/Windows/Windows/other/helper-types/HCERT_SERVER_OCSP_RESPONSE.cs index 48a8ecf584..c918699cd4 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCERT_SERVER_OCSP_RESPONSE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCERT_SERVER_OCSP_RESPONSE.cs @@ -79,7 +79,7 @@ public HCERT_SERVER_OCSP_RESPONSE(void* value) public int CompareTo(object? obj) { - if (obj is HCERT_SERVER_OCSP_RESPONSE other) + if (obj is HCERT_SERVER_OCSP_RESPONSE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCMTRANSFORM.cs b/sources/Interop/Windows/Windows/other/helper-types/HCMTRANSFORM.cs index 6cc5d070a0..ad13b2b4b7 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCMTRANSFORM.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCMTRANSFORM.cs @@ -79,7 +79,7 @@ public HCMTRANSFORM(void* value) public int CompareTo(object? obj) { - if (obj is HCMTRANSFORM other) + if (obj is HCMTRANSFORM other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCOLORSPACE.cs b/sources/Interop/Windows/Windows/other/helper-types/HCOLORSPACE.cs index 35113ff6c4..2bfaf8d410 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCOLORSPACE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCOLORSPACE.cs @@ -79,7 +79,7 @@ public HCOLORSPACE(void* value) public int CompareTo(object? obj) { - if (obj is HCOLORSPACE other) + if (obj is HCOLORSPACE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCOMDB.cs b/sources/Interop/Windows/Windows/other/helper-types/HCOMDB.cs index 3eed9a2567..5fdc65ea8c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCOMDB.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCOMDB.cs @@ -79,7 +79,7 @@ public HCOMDB(void* value) public int CompareTo(object? obj) { - if (obj is HCOMDB other) + if (obj is HCOMDB other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTASYNC.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTASYNC.cs index 628a6e7f76..1eb086942d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTASYNC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTASYNC.cs @@ -79,7 +79,7 @@ public HCRYPTASYNC(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTASYNC other) + if (obj is HCRYPTASYNC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTDEFAULTCONTEXT.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTDEFAULTCONTEXT.cs index 1afe5794ff..9dfd3fdc6d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTDEFAULTCONTEXT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTDEFAULTCONTEXT.cs @@ -79,7 +79,7 @@ public HCRYPTDEFAULTCONTEXT(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTDEFAULTCONTEXT other) + if (obj is HCRYPTDEFAULTCONTEXT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTHASH.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTHASH.cs index e7766a5738..952caa6bcd 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTHASH.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTHASH.cs @@ -79,7 +79,7 @@ public HCRYPTHASH(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTHASH other) + if (obj is HCRYPTHASH other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTKEY.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTKEY.cs index fa2036f4e6..236f500d00 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTKEY.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTKEY.cs @@ -79,7 +79,7 @@ public HCRYPTKEY(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTKEY other) + if (obj is HCRYPTKEY other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTMSG.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTMSG.cs index 673eb3b6ee..4b03796d66 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTMSG.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTMSG.cs @@ -79,7 +79,7 @@ public HCRYPTMSG(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTMSG other) + if (obj is HCRYPTMSG other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCADDR.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCADDR.cs index e0fc9a8319..3405f2beaa 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCADDR.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCADDR.cs @@ -79,7 +79,7 @@ public HCRYPTOIDFUNCADDR(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTOIDFUNCADDR other) + if (obj is HCRYPTOIDFUNCADDR other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCSET.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCSET.cs index 74f07f96ec..99fda68370 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCSET.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTOIDFUNCSET.cs @@ -79,7 +79,7 @@ public HCRYPTOIDFUNCSET(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTOIDFUNCSET other) + if (obj is HCRYPTOIDFUNCSET other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV.cs index 5d9c5cd62a..5219b3fa2b 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV.cs @@ -79,7 +79,7 @@ public HCRYPTPROV(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTPROV other) + if (obj is HCRYPTPROV other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_LEGACY.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_LEGACY.cs index 87ef53e03b..a98958720a 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_LEGACY.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_LEGACY.cs @@ -79,7 +79,7 @@ public HCRYPTPROV_LEGACY(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTPROV_LEGACY other) + if (obj is HCRYPTPROV_LEGACY other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_OR_NCRYPT_KEY_HANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_OR_NCRYPT_KEY_HANDLE.cs index 1a2e3a74da..b43cb16080 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_OR_NCRYPT_KEY_HANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCRYPTPROV_OR_NCRYPT_KEY_HANDLE.cs @@ -79,7 +79,7 @@ public HCRYPTPROV_OR_NCRYPT_KEY_HANDLE(void* value) public int CompareTo(object? obj) { - if (obj is HCRYPTPROV_OR_NCRYPT_KEY_HANDLE other) + if (obj is HCRYPTPROV_OR_NCRYPT_KEY_HANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HCURSOR.cs b/sources/Interop/Windows/Windows/other/helper-types/HCURSOR.cs index 209ad00ade..d4f2a0b2a4 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HCURSOR.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HCURSOR.cs @@ -79,7 +79,7 @@ public HCURSOR(void* value) public int CompareTo(object? obj) { - if (obj is HCURSOR other) + if (obj is HCURSOR other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDC.cs b/sources/Interop/Windows/Windows/other/helper-types/HDC.cs index eca8815dab..210029f906 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDC.cs @@ -79,7 +79,7 @@ public HDC(void* value) public int CompareTo(object? obj) { - if (obj is HDC other) + if (obj is HDC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDESK.cs b/sources/Interop/Windows/Windows/other/helper-types/HDESK.cs index cb2b3d9cc7..ed433a1cd4 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDESK.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDESK.cs @@ -79,7 +79,7 @@ public HDESK(void* value) public int CompareTo(object? obj) { - if (obj is HDESK other) + if (obj is HDESK other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDEVINFO.cs b/sources/Interop/Windows/Windows/other/helper-types/HDEVINFO.cs index d46e8d0fa6..3ec29fa247 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDEVINFO.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDEVINFO.cs @@ -79,7 +79,7 @@ public HDEVINFO(void* value) public int CompareTo(object? obj) { - if (obj is HDEVINFO other) + if (obj is HDEVINFO other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDEVNOTIFY.cs b/sources/Interop/Windows/Windows/other/helper-types/HDEVNOTIFY.cs index dbe9c579bc..d0f4d44d03 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDEVNOTIFY.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDEVNOTIFY.cs @@ -79,7 +79,7 @@ public HDEVNOTIFY(void* value) public int CompareTo(object? obj) { - if (obj is HDEVNOTIFY other) + if (obj is HDEVNOTIFY other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDROP.cs b/sources/Interop/Windows/Windows/other/helper-types/HDROP.cs index f8c5268520..bf6f129c50 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDROP.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDROP.cs @@ -79,7 +79,7 @@ public HDROP(void* value) public int CompareTo(object? obj) { - if (obj is HDROP other) + if (obj is HDROP other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDSKSPC.cs b/sources/Interop/Windows/Windows/other/helper-types/HDSKSPC.cs index 372658c0e2..7b383c5171 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDSKSPC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDSKSPC.cs @@ -79,7 +79,7 @@ public HDSKSPC(void* value) public int CompareTo(object? obj) { - if (obj is HDSKSPC other) + if (obj is HDSKSPC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HDWP.cs b/sources/Interop/Windows/Windows/other/helper-types/HDWP.cs index 958825e107..a5b32c3abe 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HDWP.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HDWP.cs @@ -79,7 +79,7 @@ public HDWP(void* value) public int CompareTo(object? obj) { - if (obj is HDWP other) + if (obj is HDWP other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HENHMETAFILE.cs b/sources/Interop/Windows/Windows/other/helper-types/HENHMETAFILE.cs index e58dd87497..9346b65556 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HENHMETAFILE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HENHMETAFILE.cs @@ -79,7 +79,7 @@ public HENHMETAFILE(void* value) public int CompareTo(object? obj) { - if (obj is HENHMETAFILE other) + if (obj is HENHMETAFILE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HEVENT.cs b/sources/Interop/Windows/Windows/other/helper-types/HEVENT.cs index aff9677624..a6ef778781 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HEVENT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HEVENT.cs @@ -79,7 +79,7 @@ public HEVENT(void* value) public int CompareTo(object? obj) { - if (obj is HEVENT other) + if (obj is HEVENT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HFONT.cs b/sources/Interop/Windows/Windows/other/helper-types/HFONT.cs index a61b794ccf..ae886146e5 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HFONT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HFONT.cs @@ -79,7 +79,7 @@ public HFONT(void* value) public int CompareTo(object? obj) { - if (obj is HFONT other) + if (obj is HFONT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HGDIOBJ.cs b/sources/Interop/Windows/Windows/other/helper-types/HGDIOBJ.cs index 0ca0f60496..4a21183d44 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HGDIOBJ.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HGDIOBJ.cs @@ -79,7 +79,7 @@ public HGDIOBJ(void* value) public int CompareTo(object? obj) { - if (obj is HGDIOBJ other) + if (obj is HGDIOBJ other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HGESTUREINFO.cs b/sources/Interop/Windows/Windows/other/helper-types/HGESTUREINFO.cs index 5d2a351132..84e2c06f98 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HGESTUREINFO.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HGESTUREINFO.cs @@ -79,7 +79,7 @@ public HGESTUREINFO(void* value) public int CompareTo(object? obj) { - if (obj is HGESTUREINFO other) + if (obj is HGESTUREINFO other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HGLOBAL.cs b/sources/Interop/Windows/Windows/other/helper-types/HGLOBAL.cs index 7ccec70b6c..b695c8024e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HGLOBAL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HGLOBAL.cs @@ -79,7 +79,7 @@ public HGLOBAL(void* value) public int CompareTo(object? obj) { - if (obj is HGLOBAL other) + if (obj is HGLOBAL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HGLRC.cs b/sources/Interop/Windows/Windows/other/helper-types/HGLRC.cs index c1b3714c77..db1f192f38 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HGLRC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HGLRC.cs @@ -79,7 +79,7 @@ public HGLRC(void* value) public int CompareTo(object? obj) { - if (obj is HGLRC other) + if (obj is HGLRC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HHANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/HHANDLE.cs index 374332bcf7..425c002d17 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HHANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HHANDLE.cs @@ -79,7 +79,7 @@ public HHANDLE(void* value) public int CompareTo(object? obj) { - if (obj is HHANDLE other) + if (obj is HHANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HHOOK.cs b/sources/Interop/Windows/Windows/other/helper-types/HHOOK.cs index ca9c26ac53..f03ca89a22 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HHOOK.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HHOOK.cs @@ -79,7 +79,7 @@ public HHOOK(void* value) public int CompareTo(object? obj) { - if (obj is HHOOK other) + if (obj is HHOOK other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HICON.cs b/sources/Interop/Windows/Windows/other/helper-types/HICON.cs index d58d7d9d6d..c65b831d2d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HICON.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HICON.cs @@ -79,7 +79,7 @@ public HICON(void* value) public int CompareTo(object? obj) { - if (obj is HICON other) + if (obj is HICON other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HIFTIMESTAMPCHANGE.cs b/sources/Interop/Windows/Windows/other/helper-types/HIFTIMESTAMPCHANGE.cs index 601d36f8f0..72b4bcc5a6 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HIFTIMESTAMPCHANGE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HIFTIMESTAMPCHANGE.cs @@ -79,7 +79,7 @@ public HIFTIMESTAMPCHANGE(void* value) public int CompareTo(object? obj) { - if (obj is HIFTIMESTAMPCHANGE other) + if (obj is HIFTIMESTAMPCHANGE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HIMAGELIST.cs b/sources/Interop/Windows/Windows/other/helper-types/HIMAGELIST.cs index 434e24b4b8..d120df3027 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HIMAGELIST.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HIMAGELIST.cs @@ -79,7 +79,7 @@ public HIMAGELIST(void* value) public int CompareTo(object? obj) { - if (obj is HIMAGELIST other) + if (obj is HIMAGELIST other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HIMC.cs b/sources/Interop/Windows/Windows/other/helper-types/HIMC.cs index c1cff58ae6..06498c3438 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HIMC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HIMC.cs @@ -79,7 +79,7 @@ public HIMC(void* value) public int CompareTo(object? obj) { - if (obj is HIMC other) + if (obj is HIMC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HIMCC.cs b/sources/Interop/Windows/Windows/other/helper-types/HIMCC.cs index 4dda165804..4d5af69edd 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HIMCC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HIMCC.cs @@ -79,7 +79,7 @@ public HIMCC(void* value) public int CompareTo(object? obj) { - if (obj is HIMCC other) + if (obj is HIMCC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HINF.cs b/sources/Interop/Windows/Windows/other/helper-types/HINF.cs index 1cd7bc0ac6..c4e5c45970 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HINF.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HINF.cs @@ -79,7 +79,7 @@ public HINF(void* value) public int CompareTo(object? obj) { - if (obj is HINF other) + if (obj is HINF other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HINSTANCE.cs b/sources/Interop/Windows/Windows/other/helper-types/HINSTANCE.cs index a93df87f45..8347098ef2 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HINSTANCE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HINSTANCE.cs @@ -79,7 +79,7 @@ public HINSTANCE(void* value) public int CompareTo(object? obj) { - if (obj is HINSTANCE other) + if (obj is HINSTANCE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HINTERACTIONCONTEXT.cs b/sources/Interop/Windows/Windows/other/helper-types/HINTERACTIONCONTEXT.cs index 2501af0861..d77ee3d9fa 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HINTERACTIONCONTEXT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HINTERACTIONCONTEXT.cs @@ -79,7 +79,7 @@ public HINTERACTIONCONTEXT(void* value) public int CompareTo(object? obj) { - if (obj is HINTERACTIONCONTEXT other) + if (obj is HINTERACTIONCONTEXT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HINTERNET.cs b/sources/Interop/Windows/Windows/other/helper-types/HINTERNET.cs index ab62f9471e..e834ed6131 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HINTERNET.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HINTERNET.cs @@ -79,7 +79,7 @@ public HINTERNET(void* value) public int CompareTo(object? obj) { - if (obj is HINTERNET other) + if (obj is HINTERNET other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HKEY.cs b/sources/Interop/Windows/Windows/other/helper-types/HKEY.cs index f4fd345e3a..5988584bd2 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HKEY.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HKEY.cs @@ -79,7 +79,7 @@ public HKEY(void* value) public int CompareTo(object? obj) { - if (obj is HKEY other) + if (obj is HKEY other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HKL.cs b/sources/Interop/Windows/Windows/other/helper-types/HKL.cs index 548773ea4b..683702f87d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HKL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HKL.cs @@ -79,7 +79,7 @@ public HKL(void* value) public int CompareTo(object? obj) { - if (obj is HKL other) + if (obj is HKL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HLOCAL.cs b/sources/Interop/Windows/Windows/other/helper-types/HLOCAL.cs index 7772217c4a..faeb0a6769 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HLOCAL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HLOCAL.cs @@ -79,7 +79,7 @@ public HLOCAL(void* value) public int CompareTo(object? obj) { - if (obj is HLOCAL other) + if (obj is HLOCAL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMENU.cs b/sources/Interop/Windows/Windows/other/helper-types/HMENU.cs index c45f5513ee..9d9d4d59a9 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMENU.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMENU.cs @@ -79,7 +79,7 @@ public HMENU(void* value) public int CompareTo(object? obj) { - if (obj is HMENU other) + if (obj is HMENU other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMETAFILE.cs b/sources/Interop/Windows/Windows/other/helper-types/HMETAFILE.cs index 2de1279651..55e3fd7ca4 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMETAFILE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMETAFILE.cs @@ -79,7 +79,7 @@ public HMETAFILE(void* value) public int CompareTo(object? obj) { - if (obj is HMETAFILE other) + if (obj is HMETAFILE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMETAFILEPICT.cs b/sources/Interop/Windows/Windows/other/helper-types/HMETAFILEPICT.cs index 70236110c1..18cbeef65a 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMETAFILEPICT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMETAFILEPICT.cs @@ -79,7 +79,7 @@ public HMETAFILEPICT(void* value) public int CompareTo(object? obj) { - if (obj is HMETAFILEPICT other) + if (obj is HMETAFILEPICT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMIDI.cs b/sources/Interop/Windows/Windows/other/helper-types/HMIDI.cs index a982e6972d..257646d407 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMIDI.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMIDI.cs @@ -79,7 +79,7 @@ public HMIDI(void* value) public int CompareTo(object? obj) { - if (obj is HMIDI other) + if (obj is HMIDI other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMIDIIN.cs b/sources/Interop/Windows/Windows/other/helper-types/HMIDIIN.cs index a4025eb55a..1620f7a854 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMIDIIN.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMIDIIN.cs @@ -79,7 +79,7 @@ public HMIDIIN(void* value) public int CompareTo(object? obj) { - if (obj is HMIDIIN other) + if (obj is HMIDIIN other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMIDIOUT.cs b/sources/Interop/Windows/Windows/other/helper-types/HMIDIOUT.cs index fc4d57351b..29a141f30e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMIDIOUT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMIDIOUT.cs @@ -79,7 +79,7 @@ public HMIDIOUT(void* value) public int CompareTo(object? obj) { - if (obj is HMIDIOUT other) + if (obj is HMIDIOUT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMIDISTRM.cs b/sources/Interop/Windows/Windows/other/helper-types/HMIDISTRM.cs index fdfd82d370..c5b1a8b220 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMIDISTRM.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMIDISTRM.cs @@ -79,7 +79,7 @@ public HMIDISTRM(void* value) public int CompareTo(object? obj) { - if (obj is HMIDISTRM other) + if (obj is HMIDISTRM other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMIXER.cs b/sources/Interop/Windows/Windows/other/helper-types/HMIXER.cs index 89196fdc4a..5d920abd5d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMIXER.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMIXER.cs @@ -79,7 +79,7 @@ public HMIXER(void* value) public int CompareTo(object? obj) { - if (obj is HMIXER other) + if (obj is HMIXER other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMIXEROBJ.cs b/sources/Interop/Windows/Windows/other/helper-types/HMIXEROBJ.cs index 8bec0a6c76..29ff282352 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMIXEROBJ.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMIXEROBJ.cs @@ -79,7 +79,7 @@ public HMIXEROBJ(void* value) public int CompareTo(object? obj) { - if (obj is HMIXEROBJ other) + if (obj is HMIXEROBJ other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMODULE.cs b/sources/Interop/Windows/Windows/other/helper-types/HMODULE.cs index 32fdeff2d5..6203c15f5c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMODULE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMODULE.cs @@ -79,7 +79,7 @@ public HMODULE(void* value) public int CompareTo(object? obj) { - if (obj is HMODULE other) + if (obj is HMODULE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HMONITOR.cs b/sources/Interop/Windows/Windows/other/helper-types/HMONITOR.cs index a3fc848575..6633923207 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HMONITOR.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HMONITOR.cs @@ -79,7 +79,7 @@ public HMONITOR(void* value) public int CompareTo(object? obj) { - if (obj is HMONITOR other) + if (obj is HMONITOR other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPAINTBUFFER.cs b/sources/Interop/Windows/Windows/other/helper-types/HPAINTBUFFER.cs index 36ef8ff5c4..f7eb98715e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPAINTBUFFER.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPAINTBUFFER.cs @@ -79,7 +79,7 @@ public HPAINTBUFFER(void* value) public int CompareTo(object? obj) { - if (obj is HPAINTBUFFER other) + if (obj is HPAINTBUFFER other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPALETTE.cs b/sources/Interop/Windows/Windows/other/helper-types/HPALETTE.cs index cf9c176d29..a0656fcba1 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPALETTE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPALETTE.cs @@ -79,7 +79,7 @@ public HPALETTE(void* value) public int CompareTo(object? obj) { - if (obj is HPALETTE other) + if (obj is HPALETTE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPCON.cs b/sources/Interop/Windows/Windows/other/helper-types/HPCON.cs index b09c5292fd..b3fc123fcb 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPCON.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPCON.cs @@ -79,7 +79,7 @@ public HPCON(void* value) public int CompareTo(object? obj) { - if (obj is HPCON other) + if (obj is HPCON other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPEN.cs b/sources/Interop/Windows/Windows/other/helper-types/HPEN.cs index 5b849f41bf..1c25456bac 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPEN.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPEN.cs @@ -79,7 +79,7 @@ public HPEN(void* value) public int CompareTo(object? obj) { - if (obj is HPEN other) + if (obj is HPEN other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPOWERNOTIFY.cs b/sources/Interop/Windows/Windows/other/helper-types/HPOWERNOTIFY.cs index 29029e3471..3924bc75f8 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPOWERNOTIFY.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPOWERNOTIFY.cs @@ -79,7 +79,7 @@ public HPOWERNOTIFY(void* value) public int CompareTo(object? obj) { - if (obj is HPOWERNOTIFY other) + if (obj is HPOWERNOTIFY other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPROFILE.cs b/sources/Interop/Windows/Windows/other/helper-types/HPROFILE.cs index cfde0f6980..7021eb034a 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPROFILE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPROFILE.cs @@ -79,7 +79,7 @@ public HPROFILE(void* value) public int CompareTo(object? obj) { - if (obj is HPROFILE other) + if (obj is HPROFILE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPROPSHEETPAGE.cs b/sources/Interop/Windows/Windows/other/helper-types/HPROPSHEETPAGE.cs index d283080b28..8e58ebe659 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPROPSHEETPAGE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPROPSHEETPAGE.cs @@ -79,7 +79,7 @@ public HPROPSHEETPAGE(void* value) public int CompareTo(object? obj) { - if (obj is HPROPSHEETPAGE other) + if (obj is HPROPSHEETPAGE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPSS.cs b/sources/Interop/Windows/Windows/other/helper-types/HPSS.cs index eb6b2b345f..468088f450 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPSS.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPSS.cs @@ -79,7 +79,7 @@ public HPSS(void* value) public int CompareTo(object? obj) { - if (obj is HPSS other) + if (obj is HPSS other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPSSWALK.cs b/sources/Interop/Windows/Windows/other/helper-types/HPSSWALK.cs index b435113f41..7cc8d8b068 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPSSWALK.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPSSWALK.cs @@ -79,7 +79,7 @@ public HPSSWALK(void* value) public int CompareTo(object? obj) { - if (obj is HPSSWALK other) + if (obj is HPSSWALK other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HPSXA.cs b/sources/Interop/Windows/Windows/other/helper-types/HPSXA.cs index 75dadd7793..fea50fccf8 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HPSXA.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HPSXA.cs @@ -79,7 +79,7 @@ public HPSXA(void* value) public int CompareTo(object? obj) { - if (obj is HPSXA other) + if (obj is HPSXA other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HRAWINPUT.cs b/sources/Interop/Windows/Windows/other/helper-types/HRAWINPUT.cs index 37d91a0f89..f04d969882 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HRAWINPUT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HRAWINPUT.cs @@ -79,7 +79,7 @@ public HRAWINPUT(void* value) public int CompareTo(object? obj) { - if (obj is HRAWINPUT other) + if (obj is HRAWINPUT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HRESULT.cs b/sources/Interop/Windows/Windows/other/helper-types/HRESULT.cs index dd8fdc8fe4..13af6420aa 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HRESULT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HRESULT.cs @@ -67,7 +67,7 @@ public HRESULT(int value) public int CompareTo(object? obj) { - if (obj is HRESULT other) + if (obj is HRESULT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HRGN.cs b/sources/Interop/Windows/Windows/other/helper-types/HRGN.cs index fd691a5ed4..6c9748c538 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HRGN.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HRGN.cs @@ -79,7 +79,7 @@ public HRGN(void* value) public int CompareTo(object? obj) { - if (obj is HRGN other) + if (obj is HRGN other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HRSRC.cs b/sources/Interop/Windows/Windows/other/helper-types/HRSRC.cs index d7bb2971f4..a74d87ec7a 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HRSRC.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HRSRC.cs @@ -79,7 +79,7 @@ public HRSRC(void* value) public int CompareTo(object? obj) { - if (obj is HRSRC other) + if (obj is HRSRC other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSEMAPHORE.cs b/sources/Interop/Windows/Windows/other/helper-types/HSEMAPHORE.cs index ad26069a8b..0513a4e3a0 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSEMAPHORE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSEMAPHORE.cs @@ -79,7 +79,7 @@ public HSEMAPHORE(void* value) public int CompareTo(object? obj) { - if (obj is HSEMAPHORE other) + if (obj is HSEMAPHORE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSPFILELOG.cs b/sources/Interop/Windows/Windows/other/helper-types/HSPFILELOG.cs index 1d0080417f..ed630aa229 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSPFILELOG.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSPFILELOG.cs @@ -79,7 +79,7 @@ public HSPFILELOG(void* value) public int CompareTo(object? obj) { - if (obj is HSPFILELOG other) + if (obj is HSPFILELOG other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSPFILEQ.cs b/sources/Interop/Windows/Windows/other/helper-types/HSPFILEQ.cs index 40f205cf44..91bce1492c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSPFILEQ.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSPFILEQ.cs @@ -79,7 +79,7 @@ public HSPFILEQ(void* value) public int CompareTo(object? obj) { - if (obj is HSPFILEQ other) + if (obj is HSPFILEQ other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSTRING.cs b/sources/Interop/Windows/Windows/other/helper-types/HSTRING.cs index 108c0424fc..69dba3a83e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSTRING.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSTRING.cs @@ -80,7 +80,7 @@ public HSTRING(void* value) public int CompareTo(object? obj) { - if (obj is HSTRING other) + if (obj is HSTRING other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSTRING_BUFFER.cs b/sources/Interop/Windows/Windows/other/helper-types/HSTRING_BUFFER.cs index 8e7a32cf27..ab895c8f37 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSTRING_BUFFER.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSTRING_BUFFER.cs @@ -80,7 +80,7 @@ public HSTRING_BUFFER(void* value) public int CompareTo(object? obj) { - if (obj is HSTRING_BUFFER other) + if (obj is HSTRING_BUFFER other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSWDEVICE.cs b/sources/Interop/Windows/Windows/other/helper-types/HSWDEVICE.cs index 64985f64de..70b8dd2f49 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSWDEVICE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSWDEVICE.cs @@ -79,7 +79,7 @@ public HSWDEVICE(void* value) public int CompareTo(object? obj) { - if (obj is HSWDEVICE other) + if (obj is HSWDEVICE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HSYNTHETICPOINTERDEVICE.cs b/sources/Interop/Windows/Windows/other/helper-types/HSYNTHETICPOINTERDEVICE.cs index daca90571b..7ca6ae8a2c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HSYNTHETICPOINTERDEVICE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HSYNTHETICPOINTERDEVICE.cs @@ -79,7 +79,7 @@ public HSYNTHETICPOINTERDEVICE(void* value) public int CompareTo(object? obj) { - if (obj is HSYNTHETICPOINTERDEVICE other) + if (obj is HSYNTHETICPOINTERDEVICE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HTASK.cs b/sources/Interop/Windows/Windows/other/helper-types/HTASK.cs index c8c2ff6812..f003770b27 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HTASK.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HTASK.cs @@ -79,7 +79,7 @@ public HTASK(void* value) public int CompareTo(object? obj) { - if (obj is HTASK other) + if (obj is HTASK other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HTHEME.cs b/sources/Interop/Windows/Windows/other/helper-types/HTHEME.cs index 4d12d0195e..f134789d9e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HTHEME.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HTHEME.cs @@ -79,7 +79,7 @@ public HTHEME(void* value) public int CompareTo(object? obj) { - if (obj is HTHEME other) + if (obj is HTHEME other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HTHUMBNAIL.cs b/sources/Interop/Windows/Windows/other/helper-types/HTHUMBNAIL.cs index 1eda4f137d..8a9d197640 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HTHUMBNAIL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HTHUMBNAIL.cs @@ -79,7 +79,7 @@ public HTHUMBNAIL(void* value) public int CompareTo(object? obj) { - if (obj is HTHUMBNAIL other) + if (obj is HTHUMBNAIL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HTOUCHINPUT.cs b/sources/Interop/Windows/Windows/other/helper-types/HTOUCHINPUT.cs index 71d94f1dc7..c97f10ad08 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HTOUCHINPUT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HTOUCHINPUT.cs @@ -79,7 +79,7 @@ public HTOUCHINPUT(void* value) public int CompareTo(object? obj) { - if (obj is HTOUCHINPUT other) + if (obj is HTOUCHINPUT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HTRANSFORM.cs b/sources/Interop/Windows/Windows/other/helper-types/HTRANSFORM.cs index 15dcab92fd..00ea9e31aa 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HTRANSFORM.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HTRANSFORM.cs @@ -79,7 +79,7 @@ public HTRANSFORM(void* value) public int CompareTo(object? obj) { - if (obj is HTRANSFORM other) + if (obj is HTRANSFORM other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HTREEITEM.cs b/sources/Interop/Windows/Windows/other/helper-types/HTREEITEM.cs index 6fb811fd26..33d65f227b 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HTREEITEM.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HTREEITEM.cs @@ -79,7 +79,7 @@ public HTREEITEM(void* value) public int CompareTo(object? obj) { - if (obj is HTREEITEM other) + if (obj is HTREEITEM other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HUSKEY.cs b/sources/Interop/Windows/Windows/other/helper-types/HUSKEY.cs index b53c444c75..06b6171922 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HUSKEY.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HUSKEY.cs @@ -79,7 +79,7 @@ public HUSKEY(void* value) public int CompareTo(object? obj) { - if (obj is HUSKEY other) + if (obj is HUSKEY other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HWAVEIN.cs b/sources/Interop/Windows/Windows/other/helper-types/HWAVEIN.cs index 72d1010b4a..8f80986fa8 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HWAVEIN.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HWAVEIN.cs @@ -79,7 +79,7 @@ public HWAVEIN(void* value) public int CompareTo(object? obj) { - if (obj is HWAVEIN other) + if (obj is HWAVEIN other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HWAVEOUT.cs b/sources/Interop/Windows/Windows/other/helper-types/HWAVEOUT.cs index 1e0bd2e201..0fe31190ad 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HWAVEOUT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HWAVEOUT.cs @@ -79,7 +79,7 @@ public HWAVEOUT(void* value) public int CompareTo(object? obj) { - if (obj is HWAVEOUT other) + if (obj is HWAVEOUT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HWINEVENTHOOK.cs b/sources/Interop/Windows/Windows/other/helper-types/HWINEVENTHOOK.cs index 537a99f6a9..53796985f3 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HWINEVENTHOOK.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HWINEVENTHOOK.cs @@ -79,7 +79,7 @@ public HWINEVENTHOOK(void* value) public int CompareTo(object? obj) { - if (obj is HWINEVENTHOOK other) + if (obj is HWINEVENTHOOK other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HWINSTA.cs b/sources/Interop/Windows/Windows/other/helper-types/HWINSTA.cs index 5cfd36ea33..867aeab95e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HWINSTA.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HWINSTA.cs @@ -79,7 +79,7 @@ public HWINSTA(void* value) public int CompareTo(object? obj) { - if (obj is HWINSTA other) + if (obj is HWINSTA other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/HWND.cs b/sources/Interop/Windows/Windows/other/helper-types/HWND.cs index 896426715a..7c25300a54 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/HWND.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/HWND.cs @@ -79,7 +79,7 @@ public HWND(void* value) public int CompareTo(object? obj) { - if (obj is HWND other) + if (obj is HWND other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/InstanceHandle.cs b/sources/Interop/Windows/Windows/other/helper-types/InstanceHandle.cs index 22ade93eb2..9b0efdfd2c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/InstanceHandle.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/InstanceHandle.cs @@ -67,7 +67,7 @@ public InstanceHandle(ulong value) public int CompareTo(object? obj) { - if (obj is InstanceHandle other) + if (obj is InstanceHandle other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/LPARAM.cs b/sources/Interop/Windows/Windows/other/helper-types/LPARAM.cs index 699aaa2172..31227689e6 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/LPARAM.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/LPARAM.cs @@ -67,7 +67,7 @@ public LPARAM(nint value) public int CompareTo(object? obj) { - if (obj is LPARAM other) + if (obj is LPARAM other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/LPPROC_THREAD_ATTRIBUTE_LIST.cs b/sources/Interop/Windows/Windows/other/helper-types/LPPROC_THREAD_ATTRIBUTE_LIST.cs index ce2573288e..a04260dd2c 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/LPPROC_THREAD_ATTRIBUTE_LIST.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/LPPROC_THREAD_ATTRIBUTE_LIST.cs @@ -73,7 +73,7 @@ public LPPROC_THREAD_ATTRIBUTE_LIST(void* value) public int CompareTo(object? obj) { - if (obj is LPPROC_THREAD_ATTRIBUTE_LIST other) + if (obj is LPPROC_THREAD_ATTRIBUTE_LIST other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/LRESULT.cs b/sources/Interop/Windows/Windows/other/helper-types/LRESULT.cs index db4949ff8e..8709f66453 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/LRESULT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/LRESULT.cs @@ -67,7 +67,7 @@ public LRESULT(nint value) public int CompareTo(object? obj) { - if (obj is LRESULT other) + if (obj is LRESULT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/MSIHANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/MSIHANDLE.cs index 1611a2fb45..4431c29dd9 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/MSIHANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/MSIHANDLE.cs @@ -67,7 +67,7 @@ public MSIHANDLE(uint value) public int CompareTo(object? obj) { - if (obj is MSIHANDLE other) + if (obj is MSIHANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/MachineGlobalObjectTableRegistrationToken.cs b/sources/Interop/Windows/Windows/other/helper-types/MachineGlobalObjectTableRegistrationToken.cs index 462a09b0d8..4eac07a84e 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/MachineGlobalObjectTableRegistrationToken.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/MachineGlobalObjectTableRegistrationToken.cs @@ -73,7 +73,7 @@ public MachineGlobalObjectTableRegistrationToken(void* value) public int CompareTo(object? obj) { - if (obj is MachineGlobalObjectTableRegistrationToken other) + if (obj is MachineGlobalObjectTableRegistrationToken other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/OAHWND.cs b/sources/Interop/Windows/Windows/other/helper-types/OAHWND.cs index 5e756be2f2..dadb191158 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/OAHWND.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/OAHWND.cs @@ -73,7 +73,7 @@ public OAHWND(void* value) public int CompareTo(object? obj) { - if (obj is OAHWND other) + if (obj is OAHWND other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PACKAGEDEPENDENCY_CONTEXT.cs b/sources/Interop/Windows/Windows/other/helper-types/PACKAGEDEPENDENCY_CONTEXT.cs index fcbe4bf907..3ca495f5f7 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PACKAGEDEPENDENCY_CONTEXT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PACKAGEDEPENDENCY_CONTEXT.cs @@ -73,7 +73,7 @@ public PACKAGEDEPENDENCY_CONTEXT(void* value) public int CompareTo(object? obj) { - if (obj is PACKAGEDEPENDENCY_CONTEXT other) + if (obj is PACKAGEDEPENDENCY_CONTEXT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PACKAGE_INFO_REFERENCE.cs b/sources/Interop/Windows/Windows/other/helper-types/PACKAGE_INFO_REFERENCE.cs index bbfa6a99b6..db35a90e93 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PACKAGE_INFO_REFERENCE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PACKAGE_INFO_REFERENCE.cs @@ -73,7 +73,7 @@ public PACKAGE_INFO_REFERENCE(void* value) public int CompareTo(object? obj) { - if (obj is PACKAGE_INFO_REFERENCE other) + if (obj is PACKAGE_INFO_REFERENCE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PAPPCONSTRAIN_REGISTRATION.cs b/sources/Interop/Windows/Windows/other/helper-types/PAPPCONSTRAIN_REGISTRATION.cs index ed31d47c58..9955172b4b 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PAPPCONSTRAIN_REGISTRATION.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PAPPCONSTRAIN_REGISTRATION.cs @@ -73,7 +73,7 @@ public PAPPCONSTRAIN_REGISTRATION(void* value) public int CompareTo(object? obj) { - if (obj is PAPPCONSTRAIN_REGISTRATION other) + if (obj is PAPPCONSTRAIN_REGISTRATION other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PAPPSTATE_REGISTRATION.cs b/sources/Interop/Windows/Windows/other/helper-types/PAPPSTATE_REGISTRATION.cs index 14bfb05837..8b586230a9 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PAPPSTATE_REGISTRATION.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PAPPSTATE_REGISTRATION.cs @@ -73,7 +73,7 @@ public PAPPSTATE_REGISTRATION(void* value) public int CompareTo(object? obj) { - if (obj is PAPPSTATE_REGISTRATION other) + if (obj is PAPPSTATE_REGISTRATION other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PCUSERIALIZEDPROPSTORAGE.cs b/sources/Interop/Windows/Windows/other/helper-types/PCUSERIALIZEDPROPSTORAGE.cs index ce50f09e69..b88094748d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PCUSERIALIZEDPROPSTORAGE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PCUSERIALIZEDPROPSTORAGE.cs @@ -73,7 +73,7 @@ public PCUSERIALIZEDPROPSTORAGE(void* value) public int CompareTo(object? obj) { - if (obj is PCUSERIALIZEDPROPSTORAGE other) + if (obj is PCUSERIALIZEDPROPSTORAGE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PHIDP_PREPARSED_DATA.cs b/sources/Interop/Windows/Windows/other/helper-types/PHIDP_PREPARSED_DATA.cs index a9c8155a69..9f614d2345 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PHIDP_PREPARSED_DATA.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PHIDP_PREPARSED_DATA.cs @@ -73,7 +73,7 @@ public PHIDP_PREPARSED_DATA(void* value) public int CompareTo(object? obj) { - if (obj is PHIDP_PREPARSED_DATA other) + if (obj is PHIDP_PREPARSED_DATA other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PRJ_DIR_ENTRY_BUFFER_HANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/PRJ_DIR_ENTRY_BUFFER_HANDLE.cs index d73c025363..02acbdcef1 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PRJ_DIR_ENTRY_BUFFER_HANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PRJ_DIR_ENTRY_BUFFER_HANDLE.cs @@ -79,7 +79,7 @@ public PRJ_DIR_ENTRY_BUFFER_HANDLE(void* value) public int CompareTo(object? obj) { - if (obj is PRJ_DIR_ENTRY_BUFFER_HANDLE other) + if (obj is PRJ_DIR_ENTRY_BUFFER_HANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT.cs b/sources/Interop/Windows/Windows/other/helper-types/PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT.cs index d4c6fed40f..3224dcb7d2 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT.cs @@ -79,7 +79,7 @@ public PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT(void* value) public int CompareTo(object? obj) { - if (obj is PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT other) + if (obj is PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PTP_CALLBACK_INSTANCE.cs b/sources/Interop/Windows/Windows/other/helper-types/PTP_CALLBACK_INSTANCE.cs index b8e56213ad..1c118a3ad9 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PTP_CALLBACK_INSTANCE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PTP_CALLBACK_INSTANCE.cs @@ -73,7 +73,7 @@ public PTP_CALLBACK_INSTANCE(void* value) public int CompareTo(object? obj) { - if (obj is PTP_CALLBACK_INSTANCE other) + if (obj is PTP_CALLBACK_INSTANCE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PTP_CLEANUP_GROUP.cs b/sources/Interop/Windows/Windows/other/helper-types/PTP_CLEANUP_GROUP.cs index a0e68d956e..e28894ba9d 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PTP_CLEANUP_GROUP.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PTP_CLEANUP_GROUP.cs @@ -73,7 +73,7 @@ public PTP_CLEANUP_GROUP(void* value) public int CompareTo(object? obj) { - if (obj is PTP_CLEANUP_GROUP other) + if (obj is PTP_CLEANUP_GROUP other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/PTP_POOL.cs b/sources/Interop/Windows/Windows/other/helper-types/PTP_POOL.cs index fcc0163671..78ffcd1aaa 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/PTP_POOL.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/PTP_POOL.cs @@ -73,7 +73,7 @@ public PTP_POOL(void* value) public int CompareTo(object? obj) { - if (obj is PTP_POOL other) + if (obj is PTP_POOL other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/ROPARAMIIDHANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/ROPARAMIIDHANDLE.cs index 87ed8011fa..02a9e027cd 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/ROPARAMIIDHANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/ROPARAMIIDHANDLE.cs @@ -79,7 +79,7 @@ public ROPARAMIIDHANDLE(void* value) public int CompareTo(object? obj) { - if (obj is ROPARAMIIDHANDLE other) + if (obj is ROPARAMIIDHANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/RO_REGISTRATION_COOKIE.cs b/sources/Interop/Windows/Windows/other/helper-types/RO_REGISTRATION_COOKIE.cs index d4c674a68c..2339a829b5 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/RO_REGISTRATION_COOKIE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/RO_REGISTRATION_COOKIE.cs @@ -73,7 +73,7 @@ public RO_REGISTRATION_COOKIE(void* value) public int CompareTo(object? obj) { - if (obj is RO_REGISTRATION_COOKIE other) + if (obj is RO_REGISTRATION_COOKIE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/SPSTATEHANDLE.cs b/sources/Interop/Windows/Windows/other/helper-types/SPSTATEHANDLE.cs index e384e0316b..6fb54a837a 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/SPSTATEHANDLE.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/SPSTATEHANDLE.cs @@ -79,7 +79,7 @@ public SPSTATEHANDLE(void* value) public int CompareTo(object? obj) { - if (obj is SPSTATEHANDLE other) + if (obj is SPSTATEHANDLE other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/UI_ANIMATION_KEYFRAME.cs b/sources/Interop/Windows/Windows/other/helper-types/UI_ANIMATION_KEYFRAME.cs index 9f288179eb..954210a4c3 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/UI_ANIMATION_KEYFRAME.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/UI_ANIMATION_KEYFRAME.cs @@ -73,7 +73,7 @@ public UI_ANIMATION_KEYFRAME(int* value) public int CompareTo(object? obj) { - if (obj is UI_ANIMATION_KEYFRAME other) + if (obj is UI_ANIMATION_KEYFRAME other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/other/helper-types/WPARAM.cs b/sources/Interop/Windows/Windows/other/helper-types/WPARAM.cs index 821ba966f9..dceaf11599 100644 --- a/sources/Interop/Windows/Windows/other/helper-types/WPARAM.cs +++ b/sources/Interop/Windows/Windows/other/helper-types/WPARAM.cs @@ -67,7 +67,7 @@ public WPARAM(nuint value) public int CompareTo(object? obj) { - if (obj is WPARAM other) + if (obj is WPARAM other) { return CompareTo(other); } diff --git a/sources/Interop/Windows/Windows/shared/guiddef/IID.Manual.cs b/sources/Interop/Windows/Windows/shared/guiddef/IID.Manual.cs index d70009cd91..719ddc0929 100644 --- a/sources/Interop/Windows/Windows/shared/guiddef/IID.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/guiddef/IID.Manual.cs @@ -16,7 +16,7 @@ public static ref readonly Guid IID_NULL { get { - ReadOnlySpan data = new byte[] { + ReadOnlySpan data = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -28,7 +28,7 @@ public static ref readonly Guid IID_NULL 0x00, 0x00, 0x00 - }; + ]; Debug.Assert(data.Length == Unsafe.SizeOf()); return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); diff --git a/sources/Interop/Windows/Windows/shared/hidpi/HIDP_LINK_COLLECTION_NODE.Manual.cs b/sources/Interop/Windows/Windows/shared/hidpi/HIDP_LINK_COLLECTION_NODE.Manual.cs index a775e9c28f..2a742b3807 100644 --- a/sources/Interop/Windows/Windows/shared/hidpi/HIDP_LINK_COLLECTION_NODE.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/hidpi/HIDP_LINK_COLLECTION_NODE.Manual.cs @@ -31,7 +31,7 @@ public unsafe partial struct HIDP_LINK_COLLECTION_NODE public uint CollectionType { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield & 0xFFu; } @@ -47,7 +47,7 @@ public uint CollectionType public uint IsAlias { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield >> 8) & 0x1u; } @@ -63,7 +63,7 @@ public uint IsAlias public uint Reserved { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield >> 9) & 0x7FFFFFu; } diff --git a/sources/Interop/Windows/Windows/shared/hidpi/Windows.Manual.cs b/sources/Interop/Windows/Windows/shared/hidpi/Windows.Manual.cs index 7c8b563639..a46a19e34a 100644 --- a/sources/Interop/Windows/Windows/shared/hidpi/Windows.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/hidpi/Windows.Manual.cs @@ -3,9 +3,7 @@ // Ported from shared/hidpi.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using static TerraFX.Interop.Windows.FACILITY; using static TerraFX.Interop.Windows.HIDP; diff --git a/sources/Interop/Windows/Windows/shared/in6addr/IN6_ADDR.Manual.cs b/sources/Interop/Windows/Windows/shared/in6addr/IN6_ADDR.Manual.cs index eb9609e30a..e879dcb087 100644 --- a/sources/Interop/Windows/Windows/shared/in6addr/IN6_ADDR.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/in6addr/IN6_ADDR.Manual.cs @@ -4,8 +4,6 @@ // Original source is Copyright © Microsoft. All rights reserved. using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/Windows/shared/windef/POINT.Manual.cs b/sources/Interop/Windows/Windows/shared/windef/POINT.Manual.cs index 887886fcb7..c3feafba33 100644 --- a/sources/Interop/Windows/Windows/shared/windef/POINT.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/windef/POINT.Manual.cs @@ -24,9 +24,9 @@ public POINT([NativeTypeName("INT32")] int x = 0, [NativeTypeName("INT32")] int public static bool operator !=([NativeTypeName("const POINT &")] in POINT l, [NativeTypeName("const POINT &")] in POINT r) => !(l == r); - public override bool Equals(object? obj) => (obj is POINT other) && Equals(other); + public override readonly bool Equals(object? obj) => (obj is POINT other) && Equals(other); - public bool Equals(POINT other) => this == other; + public readonly bool Equals(POINT other) => this == other; - public override int GetHashCode() => HashCode.Combine(x, y); + public override readonly int GetHashCode() => HashCode.Combine(x, y); } diff --git a/sources/Interop/Windows/Windows/shared/windef/RECT.Manual.cs b/sources/Interop/Windows/Windows/shared/windef/RECT.Manual.cs index 98938c154a..85cf203017 100644 --- a/sources/Interop/Windows/Windows/shared/windef/RECT.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/windef/RECT.Manual.cs @@ -28,9 +28,9 @@ public RECT([NativeTypeName("LONG")] int Left, [NativeTypeName("LONG")] int Top, public static bool operator !=([NativeTypeName("const RECT &")] in RECT l, [NativeTypeName("const RECT &")] in RECT r) => !(l == r); - public override bool Equals(object? obj) => (obj is RECT other) && Equals(other); + public override readonly bool Equals(object? obj) => (obj is RECT other) && Equals(other); - public bool Equals(RECT other) => this == other; + public readonly bool Equals(RECT other) => this == other; - public override int GetHashCode() => HashCode.Combine(left, top, right, bottom); + public override readonly int GetHashCode() => HashCode.Combine(left, top, right, bottom); } diff --git a/sources/Interop/Windows/Windows/shared/windef/SIZE.Manual.cs b/sources/Interop/Windows/Windows/shared/windef/SIZE.Manual.cs index a35bf53d7e..16ff3f106c 100644 --- a/sources/Interop/Windows/Windows/shared/windef/SIZE.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/windef/SIZE.Manual.cs @@ -24,9 +24,9 @@ public SIZE([NativeTypeName("INT32")] int cx = 0, [NativeTypeName("INT32")] int public static bool operator !=([NativeTypeName("const SIZE &")] in SIZE l, [NativeTypeName("const SIZE &")] in SIZE r) => !(l == r); - public override bool Equals(object? obj) => (obj is SIZE other) && Equals(other); + public override readonly bool Equals(object? obj) => (obj is SIZE other) && Equals(other); - public bool Equals(SIZE other) => this == other; + public readonly bool Equals(SIZE other) => this == other; - public override int GetHashCode() => HashCode.Combine(cx, cy); + public override readonly int GetHashCode() => HashCode.Combine(cx, cy); } diff --git a/sources/Interop/Windows/Windows/shared/ws2ipdef/Windows.Manual.cs b/sources/Interop/Windows/Windows/shared/ws2ipdef/Windows.Manual.cs index 9ae1a9809e..a295b25544 100644 --- a/sources/Interop/Windows/Windows/shared/ws2ipdef/Windows.Manual.cs +++ b/sources/Interop/Windows/Windows/shared/ws2ipdef/Windows.Manual.cs @@ -5,7 +5,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using static TerraFX.Interop.Windows.AF; namespace TerraFX.Interop.Windows; @@ -55,21 +54,21 @@ public static byte IN6_IS_ADDR_LOOPBACK([NativeTypeName("CONST IN6_ADDR *")] IN6 [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_MULTICAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_MULTICAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)((a->s6_bytes[0] == 0xFF) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_EUI64([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_EUI64([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)((((a->s6_bytes[0] & 0xE0) != 0) && !(IN6_IS_ADDR_MULTICAST(a) != 0)) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_EUI64(a) != 0) && (a->s6_words[4] == 0) && @@ -80,7 +79,7 @@ public static byte IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST([NativeTypeName("CONST IN6_ [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_EUI64(a) != 0) && (a->s6_words[4] == 0xFFFD) && @@ -91,7 +90,7 @@ public static byte IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST([NativeTypeName("CONST IN [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(a) != 0) | (IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(a) != 0)) ? 1 : 0); @@ -99,7 +98,7 @@ public static byte IN6_IS_ADDR_ANYCAST([NativeTypeName("CONST IN6_ADDR *")] IN6_ [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_LINKLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_LINKLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((a->s6_bytes[0] == 0xFE) && ((a->s6_bytes[1] & 0xC0) == 0x80)) ? 1 : 0); @@ -107,7 +106,7 @@ public static byte IN6_IS_ADDR_LINKLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_SITELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_SITELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((a->s6_bytes[0] == 0xFE) && ((a->s6_bytes[1] & 0xC0) == 0xC0)) ? 1 : 0); @@ -115,7 +114,7 @@ public static byte IN6_IS_ADDR_SITELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_GLOBAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_GLOBAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { uint High = (a->s6_bytes[0] & 0xF0u); return (byte)(((High != 0) && (High != 0xF0)) ? 1 : 0); @@ -123,7 +122,7 @@ public static byte IN6_IS_ADDR_GLOBAL([NativeTypeName("CONST IN6_ADDR *")] IN6_A [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_V4MAPPED([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_V4MAPPED([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((a->s6_words[0] == 0) && (a->s6_words[1] == 0) && @@ -135,7 +134,7 @@ public static byte IN6_IS_ADDR_V4MAPPED([NativeTypeName("CONST IN6_ADDR *")] IN6 [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_V4COMPAT([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_V4COMPAT([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((a->s6_words[0] == 0) && (a->s6_words[1] == 0) && @@ -150,7 +149,7 @@ public static byte IN6_IS_ADDR_V4COMPAT([NativeTypeName("CONST IN6_ADDR *")] IN6 [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_V4TRANSLATED([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_V4TRANSLATED([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((a->s6_words[0] == 0) && (a->s6_words[1] == 0) && @@ -162,42 +161,42 @@ public static byte IN6_IS_ADDR_V4TRANSLATED([NativeTypeName("CONST IN6_ADDR *")] [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_MC_NODELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_MC_NODELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_MULTICAST(a) != 0) && ((a->s6_bytes[1] & 0xF) == 1)) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_MC_LINKLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_MC_LINKLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_MULTICAST(a) != 0) && ((a->s6_bytes[1] & 0xF) == 2)) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_MC_SITELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_MC_SITELOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_MULTICAST(a) != 0) && ((a->s6_bytes[1] & 0xF) == 5)) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_MC_ORGLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_MC_ORGLOCAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_MULTICAST(a) != 0) && ((a->s6_bytes[1] & 0xF) == 8)) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6_IS_ADDR_MC_GLOBAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR*a) + public static byte IN6_IS_ADDR_MC_GLOBAL([NativeTypeName("CONST IN6_ADDR *")] IN6_ADDR* a) { return (byte)(((IN6_IS_ADDR_MULTICAST(a) != 0) && ((a->s6_bytes[1] & 0xF) == 0xE)) ? 1 : 0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6ADDR_ISANY([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6*a) + public static byte IN6ADDR_ISANY([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6* a) { Debug.Assert(a->sin6_family == AF_INET6); return IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr); @@ -205,7 +204,7 @@ public static byte IN6ADDR_ISANY([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKAD [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6ADDR_ISLOOPBACK([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6*a) + public static byte IN6ADDR_ISLOOPBACK([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6* a) { Debug.Assert(a->sin6_family == AF_INET6); return IN6_IS_ADDR_LOOPBACK(&a->sin6_addr); @@ -213,7 +212,7 @@ public static byte IN6ADDR_ISLOOPBACK([NativeTypeName("CONST SOCKADDR_IN6 *")] S [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6ADDR_ISEQUAL([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6*a, [NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6*b) + public static byte IN6ADDR_ISEQUAL([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6* a, [NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6* b) { Debug.Assert(a->sin6_family == AF_INET6); return (byte)(((a->sin6_scope_id == b->sin6_scope_id) && (IN6_ADDR_EQUAL(&a->sin6_addr, &b->sin6_addr) != 0)) ? 1 : 0); @@ -221,7 +220,7 @@ public static byte IN6ADDR_ISEQUAL([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCK [MethodImpl(MethodImplOptions.AggressiveInlining)] [return: NativeTypeName("BOOLEAN")] - public static byte IN6ADDR_ISUNSPECIFIED([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6*a) + public static byte IN6ADDR_ISUNSPECIFIED([NativeTypeName("CONST SOCKADDR_IN6 *")] SOCKADDR_IN6* a) { Debug.Assert(a->sin6_family == AF_INET6); return (byte)(((a->sin6_scope_id == 0) && (IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr) != 0)) ? 1 : 0); diff --git a/sources/Interop/Windows/Windows/um/DbgHelp/Windows.Manual.cs b/sources/Interop/Windows/Windows/um/DbgHelp/Windows.Manual.cs index 8469a7be02..94781ffd8d 100644 --- a/sources/Interop/Windows/Windows/um/DbgHelp/Windows.Manual.cs +++ b/sources/Interop/Windows/Windows/um/DbgHelp/Windows.Manual.cs @@ -3,9 +3,6 @@ // Ported from um/DbgHelp.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; -using System.Runtime.InteropServices; - namespace TerraFX.Interop.Windows; public static unsafe partial class Windows diff --git a/sources/Interop/Windows/Windows/um/UIAnimation/IUIAnimationStoryboard2.cs b/sources/Interop/Windows/Windows/um/UIAnimation/IUIAnimationStoryboard2.cs index 048d6ddb42..29c5819c77 100644 --- a/sources/Interop/Windows/Windows/um/UIAnimation/IUIAnimationStoryboard2.cs +++ b/sources/Interop/Windows/Windows/um/UIAnimation/IUIAnimationStoryboard2.cs @@ -89,7 +89,7 @@ public HRESULT AddTransitionBetweenKeyframes(IUIAnimationVariable2* variable, IU /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] - public HRESULT RepeatBetweenKeyframes(UI_ANIMATION_KEYFRAME startKeyframe, UI_ANIMATION_KEYFRAME endKeyframe, double cRepetition, UI_ANIMATION_REPEAT_MODE repeatMode, [Optional] IUIAnimationLoopIterationChangeHandler2* pIterationChangeHandler, [NativeTypeName("UINT_PTR")] [Optional] nuint id, [Optional] BOOL fRegisterForNextAnimationEvent) + public HRESULT RepeatBetweenKeyframes(UI_ANIMATION_KEYFRAME startKeyframe, UI_ANIMATION_KEYFRAME endKeyframe, double cRepetition, UI_ANIMATION_REPEAT_MODE repeatMode, [Optional] IUIAnimationLoopIterationChangeHandler2* pIterationChangeHandler, [NativeTypeName("UINT_PTR")][Optional] nuint id, [Optional] BOOL fRegisterForNextAnimationEvent) { return ((delegate* unmanaged[MemberFunction])(lpVtbl[8]))((IUIAnimationStoryboard2*)Unsafe.AsPointer(ref this), startKeyframe, endKeyframe, cRepetition, repeatMode, pIterationChangeHandler, id, fRegisterForNextAnimationEvent); } @@ -208,7 +208,7 @@ public interface Interface : IUnknown.Interface HRESULT AddTransitionBetweenKeyframes(IUIAnimationVariable2* variable, IUIAnimationTransition2* transition, UI_ANIMATION_KEYFRAME startKeyframe, UI_ANIMATION_KEYFRAME endKeyframe); [VtblIndex(8)] - HRESULT RepeatBetweenKeyframes(UI_ANIMATION_KEYFRAME startKeyframe, UI_ANIMATION_KEYFRAME endKeyframe, double cRepetition, UI_ANIMATION_REPEAT_MODE repeatMode, [Optional] IUIAnimationLoopIterationChangeHandler2* pIterationChangeHandler, [NativeTypeName("UINT_PTR")] [Optional] nuint id, [Optional] BOOL fRegisterForNextAnimationEvent); + HRESULT RepeatBetweenKeyframes(UI_ANIMATION_KEYFRAME startKeyframe, UI_ANIMATION_KEYFRAME endKeyframe, double cRepetition, UI_ANIMATION_REPEAT_MODE repeatMode, [Optional] IUIAnimationLoopIterationChangeHandler2* pIterationChangeHandler, [NativeTypeName("UINT_PTR")][Optional] nuint id, [Optional] BOOL fRegisterForNextAnimationEvent); [VtblIndex(9)] HRESULT HoldVariable(IUIAnimationVariable2* variable); diff --git a/sources/Interop/Windows/Windows/um/WinUser/Windows.Manual.cs b/sources/Interop/Windows/Windows/um/WinUser/Windows.Manual.cs index 90bb0fe71c..cee8f8c5a2 100644 --- a/sources/Interop/Windows/Windows/um/WinUser/Windows.Manual.cs +++ b/sources/Interop/Windows/Windows/um/WinUser/Windows.Manual.cs @@ -3,7 +3,6 @@ // Ported from um/winuser.h in the Windows SDK for Windows 10.0.26100.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using static TerraFX.Interop.Windows.EWX; diff --git a/sources/Interop/Windows/Windows/um/oleauto/Windows.Manual.cs b/sources/Interop/Windows/Windows/um/oleauto/Windows.Manual.cs index 50517650b0..477d92e85e 100644 --- a/sources/Interop/Windows/Windows/um/oleauto/Windows.Manual.cs +++ b/sources/Interop/Windows/Windows/um/oleauto/Windows.Manual.cs @@ -5,7 +5,6 @@ // VarI4FromUI8 and VarI4FromI8 show up twice in OleAuto.h. -using System; using System.Runtime.InteropServices; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/Windows/um/shellapi/Windows.Manual.cs b/sources/Interop/Windows/Windows/um/shellapi/Windows.Manual.cs index 0f7f28e139..8b78ef3bc0 100644 --- a/sources/Interop/Windows/Windows/um/shellapi/Windows.Manual.cs +++ b/sources/Interop/Windows/Windows/um/shellapi/Windows.Manual.cs @@ -4,7 +4,6 @@ // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/Windows/um/winioctl/FS.Manual.cs b/sources/Interop/Windows/Windows/um/winioctl/FS.Manual.cs index 41e9e07ec6..745013eef0 100644 --- a/sources/Interop/Windows/Windows/um/winioctl/FS.Manual.cs +++ b/sources/Interop/Windows/Windows/um/winioctl/FS.Manual.cs @@ -4,7 +4,6 @@ // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; namespace TerraFX.Interop.Windows; diff --git a/sources/Interop/Windows/Windows/um/winioctl/Windows.cs b/sources/Interop/Windows/Windows/um/winioctl/Windows.cs index 075546f299..4b44faa805 100644 --- a/sources/Interop/Windows/Windows/um/winioctl/Windows.cs +++ b/sources/Interop/Windows/Windows/um/winioctl/Windows.cs @@ -50,7 +50,7 @@ public static void DeviceDsmInitializeInput([NativeTypeName("PDEVICE_DSM_DEFINIT } NativeMemory.Copy((Parameters), (DeviceDsmParameterBlock(Input)), (Input->ParameterBlockLength)); - Cleanup: + Cleanup: return; } @@ -124,7 +124,7 @@ public static byte DeviceDsmValidateInput([NativeTypeName("PDEVICE_DSM_DEFINITIO } Valid = 1; - Cleanup: + Cleanup: return Valid; } @@ -160,7 +160,7 @@ public static uint DeviceDsmGetOutputLength([NativeTypeName("PDEVICE_DSM_DEFINIT Bytes = (((Bytes) + ((Definition->OutputBlockAlignment) - 1)) / (Definition->OutputBlockAlignment) * (Definition->OutputBlockAlignment)); Bytes += OutputBlockLength; - Cleanup: + Cleanup: return Bytes; } @@ -187,7 +187,7 @@ public static uint DeviceDsmGetOutputBlockLength([NativeTypeName("PDEVICE_DSM_DE Bytes = unchecked((uint)(sizeof(DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT))); Bytes = (((Bytes) + ((Definition->OutputBlockAlignment) - 1)) / (Definition->OutputBlockAlignment) * (Definition->OutputBlockAlignment)); Bytes = OutputLength - Bytes; - Cleanup: + Cleanup: return Bytes; } @@ -255,7 +255,7 @@ public static byte DeviceDsmValidateOutput([NativeTypeName("PDEVICE_DSM_DEFINITI } Valid = 1; - Cleanup: + Cleanup: return Valid; } diff --git a/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_AMD64.Manual.cs b/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_AMD64.Manual.cs index 0b00c5f478..48a34b0b73 100644 --- a/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_AMD64.Manual.cs +++ b/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_AMD64.Manual.cs @@ -57,7 +57,7 @@ public partial struct _HeaderX64_e__Struct public ulong Depth { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield1 & 0xFFFFUL; } @@ -73,7 +73,7 @@ public ulong Depth public ulong Sequence { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield1 >> 16) & 0xFFFFUL; } @@ -91,7 +91,7 @@ public ulong Sequence public ulong Reserved { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield2 & 0xFUL; } @@ -107,7 +107,7 @@ public ulong Reserved public ulong NextEntry { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield2 >> 4) & 0xFFFFFFFUL; } diff --git a/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_ARM64.Manual.cs b/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_ARM64.Manual.cs index d4e0624b61..c9f39a68b9 100644 --- a/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_ARM64.Manual.cs +++ b/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_ARM64.Manual.cs @@ -57,7 +57,7 @@ public partial struct _HeaderArm64_e__Struct public ulong Depth { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield1 & 0xFFFFUL; } @@ -73,7 +73,7 @@ public ulong Depth public ulong Sequence { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield1 >> 16) & 0xFFFFUL; } @@ -91,7 +91,7 @@ public ulong Sequence public ulong Reserved { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield2 & 0xFUL; } @@ -107,7 +107,7 @@ public ulong Reserved public ulong NextEntry { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield2 >> 4) & 0xFFFFFFFUL; } diff --git a/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_X86.Manual.cs b/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_X86.Manual.cs index 9f2ef6b59b..71e807231d 100644 --- a/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_X86.Manual.cs +++ b/sources/Interop/Windows/Windows/um/winnt/SLIST_HEADER_X86.Manual.cs @@ -57,7 +57,7 @@ public partial struct _HeaderX64_e__Struct public ulong Depth { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield1 & 0xFFFFUL; } @@ -73,7 +73,7 @@ public ulong Depth public ulong Sequence { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield1 >> 16) & 0xFFFFUL; } @@ -91,7 +91,7 @@ public ulong Sequence public ulong Reserved { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return _bitfield2 & 0xFUL; } @@ -107,7 +107,7 @@ public ulong Reserved public ulong NextEntry { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get + readonly get { return (_bitfield2 >> 4) & 0xFFFFFFFUL; } diff --git a/tests/Interop/.editorconfig b/tests/Interop/.editorconfig index 94ffcc6b65..b084fd908c 100644 --- a/tests/Interop/.editorconfig +++ b/tests/Interop/.editorconfig @@ -28,14 +28,30 @@ dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.severit # Set dotnet style options to: # disable certain parent style options since they are not applicable to interop ############################################################################### -csharp_style_expression_bodied_methods = when_on_single_line:none +dotnet_style_namespace_match_folder = true:none dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:none dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none dotnet_style_parentheses_in_other_operators = never_if_unnecessary:none dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:none +dotnet_style_prefer_compound_assignment = true:none dotnet_style_prefer_conditional_expression_over_assignment = true:none dotnet_style_prefer_conditional_expression_over_return = true:none + +############################################################################### +# Set csharp style options to: +# disable certain parent style options since they are not applicable to interop +############################################################################### +csharp_style_expression_bodied_methods = when_on_single_line:none csharp_style_prefer_pattern_matching = true:none +csharp_style_prefer_primary_constructors = true:none csharp_style_var_elsewhere = true:none csharp_style_var_for_built_in_types = true:none csharp_style_var_when_type_is_apparent = true:none + +############################################################################### +# Set dotnet diagnostic options to ignore: +# IDE0004 - Remove unnecessary cast +# IDE0005 - Remove unnecessary using directives +############################################################################### +dotnet_diagnostic.IDE0004.severity = none +dotnet_diagnostic.IDE0005.severity = none