Skip to content

Commit c1bd7fd

Browse files
Minor template fixes and adjustments
1 parent 8cc7e0a commit c1bd7fd

11 files changed

Lines changed: 25 additions & 56 deletions

EventHub.RestClientGenerator/App.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Application x:Class="ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:EventHub.RestClientGenerator"
5-
StartupUri="MainWindow.xaml">
4+
StartupUri="View/MainWindow.xaml">
65
<Application.Resources>
76
<BooleanToVisibilityConverter x:Key="BooleanToVisiblityConverter"/>
87
<Style TargetType="TextBox">

EventHub.RestClientGenerator/EventHub.RestClientGenerator.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@
6464
<Compile Include="EventHubLogic\ConnectionDetails.cs" />
6565
<Compile Include="EventHubLogic\ConnectionStringExtractor.cs" />
6666
<Compile Include="EventHubLogic\RestUriAndSharedAccessSignatureGenerator.cs" />
67-
<Compile Include="UwpTemplate\EventHubClientTemplate.cs">
67+
<Compile Include="UwpTextTemplate\EventHubClientTemplate.cs">
6868
<AutoGen>True</AutoGen>
6969
<DesignTime>True</DesignTime>
7070
<DependentUpon>EventHubClientTemplate.tt</DependentUpon>
7171
</Compile>
72-
<Compile Include="UwpTemplate\EventHubClientTemplate.partial.cs" />
72+
<Compile Include="UwpTextTemplate\EventHubClientTemplate.partial.cs" />
7373
<Compile Include="ViewModel\MainViewModel.cs" />
7474
<Compile Include="ViewModel\ViewModelBase.cs" />
7575
<Compile Include="View\InputView.xaml.cs">
@@ -135,7 +135,7 @@
135135
<None Include="App.config" />
136136
</ItemGroup>
137137
<ItemGroup>
138-
<Content Include="UwpTemplate\EventHubClientTemplate.tt">
138+
<Content Include="UwpTextTemplate\EventHubClientTemplate.tt">
139139
<Generator>TextTemplatingFilePreprocessor</Generator>
140140
<LastGenOutput>EventHubClientTemplate.cs</LastGenOutput>
141141
</Content>

EventHub.RestClientGenerator/UwpTemplate/EventHubClientTemplate.cs renamed to EventHub.RestClientGenerator/UwpTextTemplate/EventHubClientTemplate.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// the code is regenerated.
88
// </auto-generated>
99
// ------------------------------------------------------------------------------
10-
namespace ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.UwpTemplate
10+
namespace ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.UwpTextTemplate
1111
{
1212
using System.Linq;
1313
using System.Text;
@@ -18,7 +18,7 @@ namespace ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.UwpTemplate
1818
/// Class to produce the template output
1919
/// </summary>
2020

21-
#line 1 "D:\temp2\EventHub.SharedAccessSignatureGenerator\EventHub.RestClientGenerator\UwpTemplate\EventHubClientTemplate.tt"
21+
#line 1 "D:\temp2\EventHub.RestClientGenerator\EventHub.RestClientGenerator\UwpTextTemplate\EventHubClientTemplate.tt"
2222
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "14.0.0.0")]
2323
public partial class EventHubClientTemplate : EventHubClientTemplateBase
2424
{
@@ -32,14 +32,14 @@ public virtual string TransformText()
3232
".Tasks;\r\n\r\nnamespace YourNamespace\r\n{\r\n public class EventHubClient\r\n {\r\n c" +
3333
"onst string SharedAccessSignature = ");
3434

35-
#line 15 "D:\temp2\EventHub.SharedAccessSignatureGenerator\EventHub.RestClientGenerator\UwpTemplate\EventHubClientTemplate.tt"
35+
#line 15 "D:\temp2\EventHub.RestClientGenerator\EventHub.RestClientGenerator\UwpTextTemplate\EventHubClientTemplate.tt"
3636
this.Write(this.ToStringHelper.ToStringWithCulture(SharedAccessSignature));
3737

3838
#line default
3939
#line hidden
4040
this.Write(";\r\n const string Url = ");
4141

42-
#line 16 "D:\temp2\EventHub.SharedAccessSignatureGenerator\EventHub.RestClientGenerator\UwpTemplate\EventHubClientTemplate.tt"
42+
#line 16 "D:\temp2\EventHub.RestClientGenerator\EventHub.RestClientGenerator\UwpTextTemplate\EventHubClientTemplate.tt"
4343
this.Write(this.ToStringHelper.ToStringWithCulture(EventHubRestUri));
4444

4545
#line default

EventHub.RestClientGenerator/UwpTemplate/EventHubClientTemplate.partial.cs renamed to EventHub.RestClientGenerator/UwpTextTemplate/EventHubClientTemplate.partial.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7-
namespace ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.UwpTemplate
7+
namespace ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.UwpTextTemplate
88
{
99
public partial class EventHubClientTemplate
1010
{

EventHub.RestClientGenerator/UwpTemplate/EventHubClientTemplate.tt renamed to EventHub.RestClientGenerator/UwpTextTemplate/EventHubClientTemplate.tt

File renamed without changes.

EventHub.RestClientGenerator/View/InputView.xaml.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515

1616
namespace ThomasClaudiusHuber.Azure.EventHub.SharedAccessSignatureGenerator.View
1717
{
18-
/// <summary>
19-
/// Interaction logic for InputView.xaml
20-
/// </summary>
2118
public partial class InputView : UserControl
2219
{
2320
public InputView()

EventHub.RestClientGenerator/View/MainWindow.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:local="clr-namespace:EventHub.RestClientGenerator"
76
xmlns:view="clr-namespace:ThomasClaudiusHuber.Azure.EventHub.SharedAccessSignatureGenerator.View"
87
mc:Ignorable="d"
98
Title="Event Hub Rest Client Generator - by Thomas Claudius Huber" Height="600" Width="800" Background="#222222">
@@ -13,6 +12,7 @@
1312
<RowDefinition Height="Auto"/>
1413
<RowDefinition Height="Auto"/>
1514
<RowDefinition Height="*"/>
15+
<RowDefinition Height="Auto"/>
1616
</Grid.RowDefinitions>
1717

1818
<TextBlock FontWeight="Bold" Foreground="#CCCCCC" Margin="5" TextWrapping="Wrap">This tool generates the Shared Access Signature and a smal UWP-client-class to access the Rest-API of an Event Hub.
@@ -23,5 +23,7 @@
2323
<view:OutputView Grid.Row="2" Margin="0 10 0 0"/>
2424

2525
<view:UwpOutputView Grid.Row="3" Margin="0 10 0 0"/>
26+
27+
<TextBlock Grid.Row="4" FontSize="10" TextAlignment="Right" Padding="5" Foreground="DarkGray" Background="Black">Event hub rest client generator by <Hyperlink NavigateUri="http://www.thomasclaudiushuber.com" RequestNavigate="Hyperlink_RequestNavigate">Thomas Claudius Huber</Hyperlink></TextBlock>
2628
</Grid>
2729
</Window>
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
using System.Windows;
1+
using System.Diagnostics;
2+
using System.Windows;
23
using ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.ViewModel;
34

45
namespace ThomasClaudiusHuber.Azure.EventHub.RestClientGenerator.View
56
{
6-
/// <summary>
7-
/// Interaction logic for MainWindow.xaml
8-
/// </summary>
97
public partial class MainWindow : Window
108
{
119
public MainWindow()
1210
{
1311
InitializeComponent();
1412
DataContext = new MainViewModel();
1513
}
14+
15+
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
16+
{
17+
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
18+
e.Handled = true;
19+
}
1620
}
1721
}

EventHub.RestClientGenerator/View/OutputView.xaml.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using System.Windows;
7-
using System.Windows.Controls;
8-
using System.Windows.Data;
9-
using System.Windows.Documents;
10-
using System.Windows.Input;
11-
using System.Windows.Media;
12-
using System.Windows.Media.Imaging;
13-
using System.Windows.Navigation;
14-
using System.Windows.Shapes;
1+
using System.Windows.Controls;
152

163
namespace ThomasClaudiusHuber.Azure.EventHub.SharedAccessSignatureGenerator.View
174
{
18-
/// <summary>
19-
/// Interaction logic for OutputView.xaml
20-
/// </summary>
215
public partial class OutputView : UserControl
226
{
237
public OutputView()

EventHub.RestClientGenerator/View/UwpOutputView.xaml.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using System.Windows;
7-
using System.Windows.Controls;
8-
using System.Windows.Data;
9-
using System.Windows.Documents;
10-
using System.Windows.Input;
11-
using System.Windows.Media;
12-
using System.Windows.Media.Imaging;
13-
using System.Windows.Navigation;
14-
using System.Windows.Shapes;
1+
using System.Windows.Controls;
152

163
namespace ThomasClaudiusHuber.Azure.EventHub.SharedAccessSignatureGenerator.View
174
{
18-
/// <summary>
19-
/// Interaction logic for UwpOutputView.xaml
20-
/// </summary>
215
public partial class UwpOutputView : UserControl
226
{
237
public UwpOutputView()

0 commit comments

Comments
 (0)