diff options
Diffstat (limited to 'src/test/Example.Extension')
| -rw-r--r-- | src/test/Example.Extension/Example.Extension.csproj | 2 | ||||
| -rw-r--r-- | src/test/Example.Extension/ExampleCompilerExtension.cs | 10 | ||||
| -rw-r--r-- | src/test/Example.Extension/ExampleTableDefinitions.cs | 10 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/test/Example.Extension/Example.Extension.csproj b/src/test/Example.Extension/Example.Extension.csproj index d9ac2509..7f375cb6 100644 --- a/src/test/Example.Extension/Example.Extension.csproj +++ b/src/test/Example.Extension/Example.Extension.csproj | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | </ItemGroup> | 33 | </ItemGroup> |
| 34 | </Target> | 34 | </Target> |
| 35 | 35 | ||
| 36 | <Target Name="BuildExtensionWixlib" AfterTargets="ResolveProjectReferences" DependsOnTargets="SetExtensionWixlib" Inputs="@(ExtensionWxs);$(CompileWixlibExePath)" Outputs="$(WixlibPath)"> | 36 | <Target Name="BuildExtensionWixlib" AfterTargets="ResolveProjectReferences" DependsOnTargets="ResolveProjectReferences;SetExtensionWixlib" Inputs="@(ExtensionWxs);$(CompileWixlibExePath)" Outputs="$(WixlibPath)"> |
| 37 | <Exec Command='$(CompileWixlibExePath) "$(IntermediateOutputPath)\" "$(WixlibPath)" "@(ExtensionWxs)"' /> | 37 | <Exec Command='$(CompileWixlibExePath) "$(IntermediateOutputPath)\" "$(WixlibPath)" "@(ExtensionWxs)"' /> |
| 38 | </Target> | 38 | </Target> |
| 39 | </Project> | 39 | </Project> |
diff --git a/src/test/Example.Extension/ExampleCompilerExtension.cs b/src/test/Example.Extension/ExampleCompilerExtension.cs index e821b7b6..9f0abd4c 100644 --- a/src/test/Example.Extension/ExampleCompilerExtension.cs +++ b/src/test/Example.Extension/ExampleCompilerExtension.cs | |||
| @@ -23,6 +23,10 @@ namespace Example.Extension | |||
| 23 | case "Fragment": | 23 | case "Fragment": |
| 24 | switch (element.Name.LocalName) | 24 | switch (element.Name.LocalName) |
| 25 | { | 25 | { |
| 26 | case "ExampleEnsureTable": | ||
| 27 | this.ParseExampleEnsureTableElement(intermediate, section, element); | ||
| 28 | processed = true; | ||
| 29 | break; | ||
| 26 | case "ExampleSearch": | 30 | case "ExampleSearch": |
| 27 | this.ParseExampleSearchElement(intermediate, section, element); | 31 | this.ParseExampleSearchElement(intermediate, section, element); |
| 28 | processed = true; | 32 | processed = true; |
| @@ -93,6 +97,12 @@ namespace Example.Extension | |||
| 93 | } | 97 | } |
| 94 | } | 98 | } |
| 95 | 99 | ||
| 100 | private void ParseExampleEnsureTableElement(Intermediate intermediate, IntermediateSection section, XElement element) | ||
| 101 | { | ||
| 102 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
| 103 | this.ParseHelper.EnsureTable(section, sourceLineNumbers, ExampleTableDefinitions.NotInAll); | ||
| 104 | } | ||
| 105 | |||
| 96 | private void ParseExampleSearchElement(Intermediate intermediate, IntermediateSection section, XElement element) | 106 | private void ParseExampleSearchElement(Intermediate intermediate, IntermediateSection section, XElement element) |
| 97 | { | 107 | { |
| 98 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 108 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
diff --git a/src/test/Example.Extension/ExampleTableDefinitions.cs b/src/test/Example.Extension/ExampleTableDefinitions.cs index 124e2406..3532ffc3 100644 --- a/src/test/Example.Extension/ExampleTableDefinitions.cs +++ b/src/test/Example.Extension/ExampleTableDefinitions.cs | |||
| @@ -17,6 +17,16 @@ namespace Example.Extension | |||
| 17 | tupleIdIsPrimaryKey: true | 17 | tupleIdIsPrimaryKey: true |
| 18 | ); | 18 | ); |
| 19 | 19 | ||
| 20 | public static readonly TableDefinition NotInAll = new TableDefinition( | ||
| 21 | "TableDefinitionNotExposedByExtension", | ||
| 22 | new[] | ||
| 23 | { | ||
| 24 | new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier), | ||
| 25 | new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted), | ||
| 26 | }, | ||
| 27 | tupleIdIsPrimaryKey: true | ||
| 28 | ); | ||
| 29 | |||
| 20 | public static readonly TableDefinition[] All = new[] { ExampleTable }; | 30 | public static readonly TableDefinition[] All = new[] { ExampleTable }; |
| 21 | } | 31 | } |
| 22 | } | 32 | } |
