Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Specialized
Imports System.Diagnostics
Imports System.IO
Imports System.Windows.Forms
Imports Nexamas.UI.Controls
Imports Nexamas.UI.Composition
Imports Nexamas.UI.FileSystem
Imports Nexamas.UI.General
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.Theming
Imports Nexamas.UI.Values
Imports Nexamas.UI.Layout
Imports SkiaSharp

Namespace Nexamas.UI.Components


    Partial Public NotInheritable Class MASFilePickerControl
#Region "Runtime helper utilities"

        Private Sub ThrowIfDisposed()
            If _disposedLocal Then
                Throw New ObjectDisposedException(NameOf(MASFilePickerControl))
            End If
        End Sub


        Private Sub SafeInvalidate()
            Try
                InvalidateVisual()
            Catch masCaughtException31 As Exception
                Nexamas.UI.Diagnostics.MASExceptionSilencer.SwallowFileSystemBoundary(masCaughtException31)
            End Try
        End Sub

        Private Shared Sub PostFluentCallback(action As Action)
            If action Is Nothing Then Return

            Dim ctx As Threading.SynchronizationContext =
        Threading.SynchronizationContext.Current

            If ctx IsNot Nothing Then
                ctx.Post(
            Sub(state As Object)
                Try
                    action.Invoke()
                Catch masCaughtException32 As Exception
                    Nexamas.UI.Diagnostics.MASExceptionSilencer.SwallowFileSystemBoundary(masCaughtException32)
                End Try
            End Sub,
            Nothing
        )
                Return
            End If

            Try
                action.Invoke()
            Catch masCaughtException33 As Exception
                Nexamas.UI.Diagnostics.MASExceptionSilencer.SwallowFileSystemBoundary(masCaughtException33)
            End Try
        End Sub


#End Region

    End Class

End Namespace
