Skip to content

Commit

Permalink
Remove STA thread affinitisation (servicing) (#5953)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussKie committed Oct 13, 2021
1 parent 14ae9f8 commit b7b6ae8
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
{2}
}}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.SetDefaultFont(new Font(new FontFamily("Tahoma"), 12f, (FontStyle)0, (GraphicsUnit)3));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.SetDefaultFont(new Font(Control.DefaultFont.FontFamily, 12f, (FontStyle)3, (GraphicsUnit)6));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.SetCompatibleTextRenderingDefault(false);
Application.SetHighDpiMode(HighDpiMode.SystemAware);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.{|CS0117:SetHighDpiMode|}({|CS0103:HighDpiMode|}.SystemAware);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.{|CS0117:SetDefaultFont|}(new Font(new FontFamily("Microsoft Sans Serif"), 8.25f, (FontStyle)0, (GraphicsUnit)2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal static partial class ApplicationConfiguration
/// </summary>
public static void Initialize()
{
// Set STAThread
Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown);
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Expand Down

0 comments on commit b7b6ae8

Please sign in to comment.