Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Forms.Form})(ByVal Instance As T) As T
If Instance Is Nothing Then
If m_FormBeingCreated IsNot Nothing Then
If m_FormBeingCreated.ContainsKey(GetType(T)) = True Then
Throw New Global.System.InvalidOperationException(Global.Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_RecursiveFormCreate"))
End If
Else
m_FormBeingCreated = New Global.System.Collections.Hashtable()
End If
m_FormBeingCreated.Add(GetType(T), Nothing)
Try
Return New T()
Catch ex As Global.System.Reflection.TargetInvocationException When ex.InnerException IsNot Nothing
Dim BetterMessage As String = Global.Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_SeeInnerException", ex.InnerException.Message)
Throw New Global.System.InvalidOperationException(BetterMessage, ex.InnerException)
Finally
m_FormBeingCreated.Remove(GetType(T))
End Try
Else
Return Instance
End If
End Function
<Global.System.Diagnostics.DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T As Global.System.Windows.Forms.Form)(ByRef instance As T)
Private Shared m_FormBeingCreated As Global.System.Collections.Hashtable
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(o)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function GetHashCode() As Integer