forked from microsoft/botframework-solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update skill template (microsoft#989)
* update skill template for proactive dependencies * update skill doc * update response template file * update response generate c# code
- Loading branch information
Showing
11 changed files
with
76 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...te/src/csharp/SkillTemplate/Skills/Skill Template/Dialogs/Main/Resources/MainResponses.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<#@ template debug="false" hostspecific="true" language="C#" #> | ||
<#@ output extension=".cs" #> | ||
<#@ include file="..\..\..\..\..\..\Microsoft.Bot.Solutions\Responses\ResponseIdCollection.t4"#> | ||
<#@ include file="..\..\Shared\Resources\ResponseIdCollection.t4"#> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/csharp/SkillTemplate/Skills/Skill Template/Dialogs/Sample/Resources/SampleResponses.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<#@ template debug="false" hostspecific="true" language="C#" #> | ||
<#@ output extension=".cs" #> | ||
<#@ include file="..\..\..\..\..\..\Microsoft.Bot.Solutions\Responses\ResponseIdCollection.t4"#> | ||
<#@ include file="..\..\Shared\Resources\ResponseIdCollection.t4"#> |
31 changes: 31 additions & 0 deletions
31
...harp/SkillTemplate/Skills/Skill Template/Dialogs/Shared/Resources/ResponseIdCollection.t4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<#@ assembly name="Newtonsoft.Json.dll" #> | ||
<# | ||
var className = System.IO.Path.GetFileNameWithoutExtension(Host.TemplateFile); | ||
var namespaceName = System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("NamespaceHint"); | ||
string myFile = System.IO.File.ReadAllText(this.Host.ResolvePath(className + ".json")); | ||
var json = Newtonsoft.Json.JsonConvert.DeserializeObject<System.Collections.Generic.Dictionary<string, dynamic>>(myFile); | ||
var responses = string.Empty; | ||
var cards = string.Empty; | ||
#> | ||
// https://docs.microsoft.com/en-us/visualstudio/modeling/t4-include-directive?view=vs-2017 | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.Bot.Builder.Solutions.Responses; | ||
|
||
namespace <#= namespaceName #> | ||
{ | ||
/// <summary> | ||
/// Contains bot responses. | ||
/// </summary> | ||
public class <#= className #> : IResponseIdCollection | ||
{ | ||
// Generated accessors | ||
<# | ||
// This code runs in the text json: | ||
foreach (var propertyName in json) { | ||
#> | ||
public const string <#= propertyName.Key.Substring(0, 1).ToUpperInvariant() + propertyName.Key.Substring(1) #> = "<#= propertyName.Key #>"; | ||
<# } #> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/csharp/SkillTemplate/Skills/Skill Template/Dialogs/Shared/Resources/SharedResponses.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<#@ template debug="false" hostspecific="true" language="C#" #> | ||
<#@ output extension=".cs" #> | ||
<#@ include file="..\..\..\..\..\..\Microsoft.Bot.Solutions\Responses\ResponseIdCollection.t4"#> | ||
<#@ include file="..\..\Shared\Resources\ResponseIdCollection.t4"#> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters