Skip to content

Added support for runtime expressions embedded in string literals - #290

Merged
Darrel (darrelmiller) merged 5 commits into
vnextfrom
dm/callbackkey
Jul 13, 2018
Merged

Darrel (darrelmiller) merged 5 commits into
vnextfrom
dm/callbackkey

Conversation

@darrelmiller

Copy link
Copy Markdown
Member

Addresses issue #287

/// </summary>
public class CompositeExpression : RuntimeExpression
{
private readonly string template;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

template [](start = 32, length = 8)

not sure if template is the right word here... maybe "originalExpression" ?

{
private readonly string template;
private Regex expressionPattern = new Regex("{(?<exp>[^}]+)");
/// <summary>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit, please add one newline for readability


foreach (var item in matches.Cast<Match>())
{
var value = item.Groups["exp"].Captures.Cast<Capture>().First().Value;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

value [](start = 20, length = 5)

nit, call this runtimeExpression instead of value

@PerthCharern

Copy link
Copy Markdown
Contributor

@PerthCharern PerthCharern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

@darrelmiller

Copy link
Copy Markdown
Member Author

PerthCharern I will make these changes. How do feel about releasing 1.1, rather than me back porting these changes to 1.0?

@PerthCharern

PerthCharern commented Jul 9, 2018 via email •

Copy link
Copy Markdown
Contributor

@darrelmiller
Darrel (darrelmiller) merged commit b454f27 into vnext Jul 13, 2018
@darrelmiller
Darrel (darrelmiller) deleted the dm/callbackkey branch July 13, 2018 18:55
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.

2 participants