Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Push/Pop services to TurnContextStateCollection. #3594

Merged
merged 7 commits into from
Mar 19, 2020

Conversation

tomlm
Copy link
Contributor

@tomlm tomlm commented Mar 18, 2020

#3577

  • Add unit tests for TurnContextStateCollection
  • Add tracing to NullDialogDebugger, cause it's super damn useful and I needed it to debug the unit tests.
  • Fix DialogExpression which wasn't evaluating the dialog.id (messing up debugger output and id's)

Tom Laird-McConnell added 5 commits March 12, 2020 14:26
…ension method

* Move DialogStateManager/ScopesPathResolvers into Dialogs assembly
* Make all IMemory implementations evaluate ExpressionProperties
* Fix layering between expressions and dialogs via MemoryFactory.Create() and internal ducktyping memory
* Move ComponentRegistration into Builder assembly
* Fix path CAPS names in paths: NOTE I have marked old values as [Obsolete]  We should remove these obsolete properties right before we release or we will get broken builds for every PR because of backward compat issues.
Add unit tests for TurnContextStateCollection
Add tracing to NullDialogDebugger, cause it's super damn useful and I needed it to debug the unit tests.
Fix DialogExpression which wasn't evaluating the dialog.id (messing up debugger output and id's)
@tomlm tomlm added DCR R9 Release 9 - May 15th, 2020 labels Mar 18, 2020
return this.Value.Id;
}

return base.ToString();
Copy link
Contributor Author

@tomlm tomlm Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

. [](start = 23, length = 1)

This was mucking up Id calculation, was ending up with id's == type name instead of dialog id. #ByDesign

namespace Microsoft.Bot.Builder.Tests
{
[TestClass]
public class TurnContextStateCollectionTests
Copy link
Contributor Author

@tomlm tomlm Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TurnContextStateCollectionTests [](start = 17, length = 31)

there were no unit tests for TurnContextStateCollection
#ByDesign

if (result.Status == DialogTurnStatus.Empty && GetUniqueInstanceId(actionContext) == instanceId)
{
// Call begin dialog on our next step, passing the effective options we computed
var nextAction = actionContext.Actions.First();
Copy link
Member

@carlosscastro carlosscastro Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you guarantee that there is an action in the Actions collection here? #ByDesign

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, actioncontext creates empty actions


In reply to: 394775062 [](ancestors = 394775062)

while (parent != null)
{
var ac = parent as ActionContext;
if (ac != null && ac.Changes != null && ac.Changes.Count > 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer ac.Changes.Any() instead of ac.Changes.Count > 0 but not a big deal, up to you

@@ -67,5 +67,15 @@ public override void SetValue(object value)

base.SetValue(value);
}

public new string ToString()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the base base class, ExpressionProperty using public new string ToString() instead of override? Wouldn't it be healthier to use override in ExpressionProperty and here?

@@ -1,4 +1,5 @@
using System.Threading;
using System.Diagnostics;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copyright

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R9 Release 9 - May 15th, 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants