Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
inline functions (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninggao authored Feb 25, 2020
1 parent b28cf40 commit 99b33fa
Show file tree
Hide file tree
Showing 38 changed files with 46 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"actions": [
{
"$kind": "Microsoft.Ask",
"activity": "@{callAsk()}",
"activity": "@\{template(concat('Ask',$PropertyToRemember))}",
"expectedProperties":
"createArray($PropertyToRemember)"

Expand All @@ -26,7 +26,4 @@
}
]
}
```

# callAsk()
- @\{template(concat('Ask',$PropertyToRemember))}
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
]
}
```

# callChooseProperty
- @\{chooseProperty()}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"elseActions":[
{
"$kind": "Microsoft.Ask",
"activity": "@{callChooseProperty()}",
"activity": "@\{chooseProperty()}",
"expectedProperties": [
"PropertyToChange"
]
Expand All @@ -32,6 +32,3 @@
]
}
```

# callChooseProperty
- @\{chooseProperty()}
5 changes: 1 addition & 4 deletions packages/dialog/templates/assign-ageEntity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}', concat(string(@age.number), ' ', @age.units))}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +28,4 @@
}
```

# callSetMessage()
- @\{setObjectPropertyMessage('@{property}', concat(string(@age.number), ' ', @age.units))}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/assign-datetimeEntity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}', concat(@datetime.type, ' ', string(@datetime.timex)))}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +28,4 @@
}
```

# callSetMessage
- @\{setObjectPropertyMessage('@{property}', concat(@datetime.type, ' ', string(@datetime.timex)))}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/assign-dimensionEntity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}',concat(string(@dimension.number), ' ', @dimension.units))}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +28,4 @@
}
```

# callSetMessage
- @\{setObjectPropertyMessage('@{property}',concat(string(@dimension.number), ' ', @dimension.units))}

[generator.lg](generator.lg)
6 changes: 2 additions & 4 deletions packages/dialog/templates/assign-geographyV2Entity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}', concat(@geographyV2.type, ' ', @geographyV2.location))}
"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +29,4 @@
}
```

# callSetMessage
- @\{setObjectPropertyMessage('@{property}', concat(@geographyV2.type, ' ', @geographyV2.location))}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/assign-moneyEntity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}', concat(string(@money.number), ' ', @money.units))}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +28,4 @@
}
```

# callSetMessage
- @\{setObjectPropertyMessage('@{property}', concat(string(@money.number), ' ', @money.units))}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/assign-ordinalV2Entity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}', concat(string(@ordinalV2.offset), ' ', @ordinalV2.relativeTo))}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +28,4 @@
}
```

# callSetMessage
- @\{setObjectPropertyMessage('@{property}', concat(string(@ordinalV2.offset), ' ', @ordinalV2.relativeTo))}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/assign-temperatureEntity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setObjectPropertyMessage('@{property}', concat(string(@temperature.number), ' ', @temperature.units))}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -28,7 +28,4 @@
}
```

# callSetMessage
- @\{setObjectPropertyMessage('@{property}', concat(string(@temperature.number), ' ', @temperature.units))}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/boolean-assign-boolean.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setPropertyMessage('@{property}', @boolean)}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -23,7 +23,4 @@
}
```

# callSetMessage
- @\{setPropertyMessage('@{property}', @boolean)}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/boolean-missing.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"actions": [
{
"$kind": "Microsoft.Ask",
"activity": "@{callAsk()}",
"activity": "@\{Ask@{property}()}",
"expectedProperties": [
"@{property}"
]
Expand All @@ -20,7 +20,4 @@
}
```

# callAsk
- @\{Ask@{property}()}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/enum-assign-enumEntity.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callSetMessage()}"
"activity": "@\{setPropertyMessage('@{property}', @@{property}Entity)}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -22,7 +22,4 @@
}
```

# callSetMessage
- @\{setPropertyMessage('@{property}', @@{property}Entity)}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/enum-missing.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"actions": [
{
"$kind": "Microsoft.Ask",
"activity": "@{callAsk()}",
"activity": "@\{Ask@{property}()}",
"expectedProperties": [
"@{property}"
]
Expand All @@ -20,7 +20,4 @@
}
```

# callAsk
- @\{Ask@{property}()}

[generator.lg](generator.lg)
5 changes: 1 addition & 4 deletions packages/dialog/templates/enumEntity-choose.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
"actions": [
{
"$kind": "Microsoft.Ask",
"activity": "@{callChoose()}",
"activity": "@\{choose@{property}Entity()}",
"expectedProperties": ["@{property}"]
}
]
}
```

# callChoose
- @\{choose@{property}Entity()}
4 changes: 1 addition & 3 deletions packages/dialog/templates/library-BeginDialog.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callWelcome()}"
"activity": "@\{welcome()}"
}
]
}
```

# callWelcome
- @\{welcome()}
5 changes: 1 addition & 4 deletions packages/dialog/templates/library-CancelIntent.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
"actions": [
{
"$kind": "Microsoft.Ask",
"activity": "@{callCancel()}",
"activity": "@\{cancel()}",
"expectedProperties": [
"CancelConfirmation"
]
}
]
}
```

# callCancel
- @\{cancel()}
5 changes: 1 addition & 4 deletions packages/dialog/templates/library-ChooseProperty.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
"actions": [
{
"$kind": "Microsoft.Ask",
"activity": "@{callChooseProperties()}",
"activity": "@\{chooseProperties()}",
"expectedProperties": ["PropertyToChange"]
}
]
}
```

# callChooseProperties
- @\{chooseProperties()}
10 changes: 2 additions & 8 deletions packages/dialog/templates/library-CompleteConfirmation.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callReadForm()}"
"activity": "@\{readForm('@{schemaName}')}"
},
{
"$kind": "Microsoft.Ask",
"activity": "@{callConfirmChange()}",
"activity": "@\{confirmChange()}",
"expectedProperties": [
"CompleteConfirmation"
]
}
]
}
```

# callReadForm
- @\{readForm('@{schemaName}')}

# callConfirmChange
- @\{confirmChange()}
5 changes: 1 addition & 4 deletions packages/dialog/templates/library-HelpIntent.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callHelp()}"
"activity": "@\{help(@PropertyName)}"
}
]
}
```

# callHelp
- @\{help(@PropertyName)}
5 changes: 1 addition & 4 deletions packages/dialog/templates/library-NotUnderstood.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callNotUnderstood()}"
"activity": "@\{notUnderstood()}"
}
]
}
```

# callNotUnderstood
- @\{notUnderstood()}
10 changes: 2 additions & 8 deletions packages/dialog/templates/library-ReadPropertyIntent.dialog.lg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callTextProperty()}"
"activity": "@\{textProperty(@PropertyName)}"
},
{
"$kind": "Microsoft.SetProperty",
Expand All @@ -16,17 +16,11 @@
},
{
"$kind": "Microsoft.Ask",
"activity": "@{callConfirmChangeProperty()}",
"activity": "@\{confirmChangeProperty(@PropertyName)}",
"expectedProperties": [
"ChangePropertyConfirmation"
]
}
]
}
```

# callTextProperty
- @\{textProperty(@PropertyName)}

# callConfirmChangeProperty
- @\{confirmChangeProperty(@PropertyName)}
Loading

0 comments on commit 99b33fa

Please sign in to comment.