Skip to content

feat(api): Decision Notification Listener for activate and getVariation APIs. #148

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

Merged
merged 5 commits into from
Apr 4, 2019

Conversation

mfahadahmed
Copy link
Contributor

@mfahadahmed mfahadahmed commented Mar 25, 2019

Summary

  • Implemented Decision Notification Listener for activate and getVariation APIs.

Test plan

  • Added unit tests.

@mfahadahmed mfahadahmed changed the title Decision Notification Listener for activate and getVariation APIs. feat(api): Decision Notification Listener for activate and getVariation APIs. Mar 25, 2019
@msohailhussain msohailhussain requested a review from a team April 1, 2019 18:25
<Compile Include="..\OptimizelySDK\Utils\ExperimentUtils.cs" />
<Compile Include="..\OptimizelySDK\Utils\ConditionParser.cs" />
<Compile Include="..\OptimizelySDK\Utils\AttributeMatchTypes.cs" />
<Compile Include="..\OptimizelySDK\Utils\ControlAttributes.cs" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Please indent.
Why all these files are included in .netstandard16? Not in other Projects?

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

lgtm, just have some minor comments

{ "variationKey", variation?.Key },
};

NotificationCenter.SendNotifications(NotificationCenter.NotificationType.Decision, DecisionInfoTypes.EXPERIMENT, userId,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe initialize userAttributes as an empty UserAttributes object before calling sendNotification

@@ -59,6 +60,15 @@ public enum NotificationType
public delegate void TrackCallback(string eventKey, string userId, UserAttributes userAttributes, EventTags eventTags,
LogEvent logEvent);

/// <summary>
/// Delegate for decision notifcations.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: typo notifications

@aliabbasrizvi
Copy link

@mfahadahmed @msohailhussain just minor feedback from Mike.

@mikeproeng37 mikeproeng37 merged commit c0dc13c into master Apr 4, 2019
@mfahadahmed mfahadahmed deleted the fahad/decision-listener-activate branch May 9, 2019 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants