Skip to content
Prev Previous commit
Next Next commit
Reintroduce StructLayout attribute on SortKey class
  • Loading branch information
lscorcia committed Mar 15, 2022
commit 76029df42e9677711df9f363fbe9b5906a41c9ce
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace System.DirectoryServices.Protocols
{
// Declared as partial in order to be able to set the different StructLayout
// attributes in the Windows and Linux specific files.
// This is a layout-controlled struct, do not alter property ordering.
internal partial struct SortKeyInterop
{
public SortKeyInterop(SortKey sortKey)
Expand All @@ -25,10 +26,10 @@ public SortKeyInterop(SortKey sortKey)
ReverseOrder = sortKey.ReverseOrder;
}

public string AttributeName { get; set; }
internal string AttributeName { get; set; }

public string MatchingRule { get; set; }
internal string MatchingRule { get; set; }

public bool ReverseOrder { get; set; }
internal bool ReverseOrder { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ internal static class UtilityHandle
public static ConnectionHandle GetHandle() => s_handle;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public class SortKey
{
private string _name;
Expand Down