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

Replace Dictionary.Add #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ramsay
Copy link
Contributor

@ramsay ramsay commented Mar 2, 2018

Currently the function parameter parametersis sent by reference to every method call. Inside the methods we were using the Dictionary.Add method in the method body to add phone_number and other key/value pairs to the the parameters variable. The problem is that if the key already exists then Dictionary.Add will raise an exception. And since parameters is passed by reference the mutation carries over to additional method calls in the same stack which will almost certainly raise an exception unless the parameters instance is instantiated fresh every time.

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.

1 participant