-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVisualBasicAppPass1.tt
More file actions
110 lines (93 loc) · 4.36 KB
/
VisualBasicAppPass1.tt
File metadata and controls
110 lines (93 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<#@ template language="C#" inherits="VB_CodeGenerator<PageDefinition>" visibility="internal" linePragmas="false"#>
<#@ assembly name="System.Core" #>
<# foreach(var pair in Model.XamlFileFullPathAndCheckSums) #>
<# { #>
#ExternalChecksum("<#=pair.FileName#>", "<#=Model.ChecksumAlgorithmGuid#>", "<#=pair.Checksum#>")
<# } #>
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Namespace <#=Globalize(Model.CodeInfo.ClassName.Namespace)#>
#If Not DISABLE_XAML_GENERATED_MAIN Then
Partial Module Program
<# if (!ProjectInfo.IsWin32App) { #>
<MTAThread>
<# } #>
<#=GeneratedCodeAttribute#>
<#=DebuggerNonUserCodeAttribute#>
Sub Main()
<# if (ProjectInfo.UsingCSWinRT) { #>
Global.WinRT.ComWrappersSupport.InitializeComWrappers()
<# } #>
<# if (ProjectInfo.UsingCSWinRT) { #>
<#=Globalize(KnownNamespaces.Xaml)#>.Application.Start(Sub(p)
Dim context = New Global.Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext(Global.Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread())
Global.System.Threading.SynchronizationContext.SetSynchronizationContext(context)
Dim app = New Global.<#=Model.CodeInfo.ClassName.FullName#>()
End Sub)
<# } else { #>
<#=Globalize(KnownNamespaces.Xaml)#>.Application.Start(
Sub()
Dim synchronizationContext As New DispatcherQueueSynchronizationContext(DispatcherQueue.GetForCurrentThread())
Threading.SynchronizationContext.SetSynchronizationContext(synchronizationContext)
Dim app = New Global.<#=Model.CodeInfo.ClassName.FullName#>()
End Sub)
<# } #>
End Sub
End Module
#End If
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class <#=Model.CodeInfo.ClassName.ShortName#>
Inherits Global.<#=Model.CodeInfo.BaseTypeName#>
<#=GeneratedCodeAttribute#>
Private _contentLoaded As Boolean
<# if ((!ProjectInfo.GenerateProviderCode) && (!ProjectInfo.EnableTypeInfoReflection)) #>
<# {#>
<#=GeneratedCodeAttribute#>
<#=DebuggerNonUserCodeAttribute#>
Public Sub AddOtherProvider(otherProvider as <#=Globalize(KnownNamespaces.XamlMarkup)#>.IXamlMetadataProvider)
_AddOtherProvider(otherProvider)
End Sub
Private Partial Sub _AddOtherProvider(otherProvider as <#=Globalize(KnownNamespaces.XamlMarkup)#>.IXamlMetadataProvider)
End Sub
<# }#>
<#=GeneratedCodeAttribute#>
<#=DebuggerNonUserCodeAttribute#>
Public Sub InitializeComponent()
If _contentLoaded Then
Return
End If
_contentLoaded = true
Dim resourceLocator As New Global.System.Uri("<#=Model.GetLoadComponentUri(Model.CodeInfo.PriIndexName, Model.CodeInfo.BaseApparentRelativePath)#>")
<#=Globalize(KnownNamespaces.Xaml)#>.Application.LoadComponent(Me, resourceLocator)
#If Debug AndAlso Not DISABLE_XAML_GENERATED_BINDING_DEBUG_OUTPUT Then
AddHandler Me.DebugSettings.BindingFailed,
Sub(Sender As Global.System.Object, bindingFailedArgs As <#=Globalize(KnownNamespaces.Xaml)#>.BindingFailedEventArgs)
Global.System.Diagnostics.Debug.WriteLine(bindingFailedArgs.Message)
End Sub
#End If
#If Debug AndAlso Not DISABLE_XAML_GENERATED_RESOURCE_REFERENCE_DEBUG_OUTPUT Then
AddHandler Me.DebugSettings.XamlResourceReferenceFailed,
Sub(Sender As Global.System.Object, args As <#=Globalize(KnownNamespaces.Xaml)#>.XamlResourceReferenceFailedEventArgs)
Global.System.Diagnostics.Debug.WriteLine(args.Message)
End Sub
#End If
#If Debug AndAlso Not DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION Then
AddHandler Me.UnhandledException,
Sub(sender As Global.System.Object, unhandledExceptionArgs As <#=Globalize(KnownNamespaces.Xaml)#>.UnhandledExceptionEventArgs)
If Global.System.Diagnostics.Debugger.IsAttached Then
Global.System.Diagnostics.Debugger.Break()
End If
End Sub
#End If
End Sub
End Class
End Namespace
<#+ #>