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

dotnetcore #8

Merged
merged 8 commits into from
Oct 6, 2016
Merged

dotnetcore #8

merged 8 commits into from
Oct 6, 2016

Conversation

Dirtypaws
Copy link
Contributor

#2 Rebuilt the solution like Nancy to allow linked code files across xproj and csproj. Had some merge conflicts with the nuget updates, but, they should be working correctly now.

@efaruk
Copy link
Owner

efaruk commented Oct 5, 2016

Well done Matt, you are just amazing, I'm really happy to work with you...

@Dirtypaws
Copy link
Contributor Author

I should also mention - one other thing I did in there. Because my local Redis instance is at a different IP. I abstracted that out into two helper files in the Demo and the tests. Because the two frameworks have different conventions for using config files they each maintain their own helper files to read the config respective to the environment.

Example:
In the .NET framework demo project there's a Helper/SettingsHelper.cs to get the Redis instance:

public static string Redis => ConfigurationManager.AppSettings["redis"]

While the same file in the dotnetcore project looks like this:

        static string _env;
        static string Env => _env ?? (_env = Environment.GetEnvironmentVariable("env"));

        static bool IsDevelopment => Env == "Dev";

        public static IConfigurationRoot Configuration
        {
            get
            {
                var builder = new ConfigurationBuilder()
                    .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                    .AddJsonFile($"appsettings.{Env}.json", optional: true);

                if (IsDevelopment) builder.AddUserSecrets();

                builder.AddEnvironmentVariables();
                return builder.Build();
            }
        }

        public static string Redis => Configuration["redis"];

That's probably something that it should do anyway - and the nuget can provide it's own configuration settings file when installed - like NLog. So essentially, the Framework solutions are in the .Build folders and maintain their csproj file as well as any framework specific files and their packages.config. the non '.build' folders house the xproj files and their project.json files.

@efaruk
Copy link
Owner

efaruk commented Oct 5, 2016

Thank you very much Matt...

@efaruk
Copy link
Owner

efaruk commented Oct 5, 2016

Also i'm trying to create basic flows and drawings right now...

@Dirtypaws
Copy link
Contributor Author

Mind if I merge this pull request? It'll help me from dealing with conflicts to nuget updates and such.

@efaruk
Copy link
Owner

efaruk commented Oct 6, 2016

Of course keep going...

On Thu, Oct 6, 2016, 21:38 Matt Krizanac [email protected] wrote:

Mind if I merge this pull request? It'll help me from dealing with
conflicts to nuget updates and such.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#8 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACtflbm9fg4bb6f6LtjWx87hHd8OiDZOks5qxUAfgaJpZM4KPK4r
.

@Dirtypaws Dirtypaws merged commit 1b9247b into efaruk:master Oct 6, 2016
@efaruk
Copy link
Owner

efaruk commented Oct 6, 2016

I was looked forward for that one ;)

On Thu, Oct 6, 2016, 21:47 Matt Krizanac [email protected] wrote:

Merged #8 #8.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#8 (comment), or mute the
thread
https://github.com/notifications/unsubscribe-auth/ACtflZzp8u0m5Bp4YwQ4S1tKXCzPoEhPks5qxUIvgaJpZM4KPK4r
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants