Skip to content

Support for indexing via Key#71

Merged
pdenny merged 6 commits intomasterfrom
string_indexing
Oct 13, 2016
Merged

Support for indexing via Key#71
pdenny merged 6 commits intomasterfrom
string_indexing

Conversation

@pdenny
Copy link
Copy Markdown
Contributor

@pdenny pdenny commented Oct 13, 2016

Take 2 on PR 69

In short this enables C# to generate key names and reference them dynamically.

Before, the key had to be hardcoded, e.g. config.task.task1.param1. With this change you can do something like:

foreach (var ii in new[] {"task1", "task2", "task3"})
{
   Console.WriteLine("Value for {0}.param1 is {1}", ii, config.task[ii].param1);
}

* Automatic whitespace changes (remove BOM, trim trailing whitespace)
* Explicitly set methods as private instead of leaving it to C#
* Gimme for python and ruby
* This is needed in .net to dynamically reference configuration values
  based on class name. The referencing code is in a base class, and the
  named configuration key is that of the derived class
* Tests merging the given environment block into the 'all' block
Copy link
Copy Markdown
Contributor

@jtroe jtroe left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tests pass. Appears to be backwards compatible.

:shipit: and create a version bump PR and I'll see if I can find all the stuff to ship the packages! 😄

@pdenny pdenny merged commit 6920807 into master Oct 13, 2016
@pdenny pdenny deleted the string_indexing branch October 13, 2016 00:48
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