Fix struct reordering (#3247)

This commit is contained in:
Vita Chumakova 2024-07-10 15:08:06 +04:00 committed by GitHub
parent 530743cf97
commit b14d5de641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 2 deletions

View file

@ -524,6 +524,22 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WRAP_LINES/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CSharpFileLayoutPatterns/Pattern/@EntryValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&#xD;
&lt;Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"&gt;&#xD;
&lt;TypePattern DisplayName=&quot;Non-reorderable types&quot; Priority=&quot;99999999&quot;&gt;
&lt;TypePattern.Match&gt;
&lt;Or&gt;
&lt;And&gt;
&lt;Kind Is=&quot;Interface&quot; /&gt;
&lt;Or&gt;
&lt;HasAttribute Name=&quot;System.Runtime.InteropServices.InterfaceTypeAttribute&quot; /&gt;
&lt;HasAttribute Name=&quot;System.Runtime.InteropServices.ComImport&quot; /&gt;
&lt;/Or&gt;
&lt;/And&gt;
&lt;Kind Is=&quot;Struct&quot; /&gt;
&lt;HasAttribute Name=&quot;System.Runtime.InteropServices.StructLayoutAttribute&quot; /&gt;
&lt;HasAttribute Name=&quot;JetBrains.Annotations.NoReorderAttribute&quot; /&gt;
&lt;/Or&gt;
&lt;/TypePattern.Match&gt;
&lt;/TypePattern&gt;
&lt;TypePattern DisplayName="ArchiPattern" Priority="150"&gt;&#xD;
&lt;Entry DisplayName="Public (Events and Delegates)"&gt;&#xD;
&lt;Entry.Match&gt;&#xD;

View file

@ -108,12 +108,10 @@ internal static partial class NativeMethods {
[StructLayout(LayoutKind.Sequential)]
[SupportedOSPlatform("Windows")]
internal struct FlashWindowInfo {
#pragma warning disable Reordering // TODO: This silly pragma doesn't do anything, but it stops Rider from reordering, we may be able to get rid of it later
public uint StructSize;
public nint WindowHandle;
public EFlashFlags Flags;
public uint Count;
public uint TimeoutBetweenFlashes;
#pragma warning restore Reordering // TODO: This silly pragma doesn't do anything, but it stops Rider from reordering, we may be able to get rid of it later
}
}