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

adding utility to make binding resolution easier for custom IResolutionPolicy authors #1576

Closed
wants to merge 1 commit into from

Conversation

brettsam
Copy link
Member

No description provided.

/// <param name="token">A token string to resolve from the binding data. For example, "a.b.c".</param>
/// <param name="bindingData">The binding data to resolve the parameter against.</param>
/// <returns>The resolved parameter.</returns>
public static string ResolveToken(string token, IReadOnlyDictionary<string, object> bindingData)
Copy link
Member

@mathewc mathewc Feb 15, 2018

Choose a reason for hiding this comment

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

Is this equivalent to the below? Wondering who is going to use this new method and if the below isn't sufficient.

var template = BindingTemplate.FromString(token);
var resolved = template.Bind(bindingData);

}

[Fact]
public void ResolveToken()
Copy link
Contributor

Choose a reason for hiding this comment

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

Great test!

@mathewc
Copy link
Member

mathewc commented Aug 11, 2018

@brettsam Can this be closed?

@brettsam
Copy link
Member Author

Yeah, the issue is captured in #1726. I put this together first before we realized it required much larger changes.

@brettsam brettsam closed this Aug 15, 2018
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.

3 participants