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

CloudServiceConfigurationMaker to customize .cscfg #156

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

Conversation

smoothdeveloper
Copy link

See #155

@isaacabraham
Copy link
Contributor

LGTM. Thoughts @eiriktsarpalis ?

@eiriktsarpalis
Copy link
Member

eiriktsarpalis commented Jul 14, 2016

Could you possibly replace the CloudServiceConfigurationMaker type with an interface? Then Default could be represented as a singleton instance just use an optional on the interface internally. I'd prefer it if the public APIs remained as C# friendly as possible.

@smoothdeveloper
Copy link
Author

@eiriktsarpalis:

public interface ICloudServiceConfigurationMaker{
    string BuildConfiguration();
}

and if None is passed, we use the original function (like I'm doing now with Default)?

What if I'm doing an overload? the interface idea is not really F# friendly (despite object expression, this will be noisy in F#)

Shouldn't we pester roslyn/C# team so they introduce DU the way F# has them and also start to support FSharpFunc as first class way to compile their lambda? 😄

@smoothdeveloper
Copy link
Author

Note that all optional parameters are using FSharpOption which currently is not too C# friendly neither (without additional helpers).

@eiriktsarpalis
Copy link
Member

@smoothdeveloper If the builder function does not take any parameters (as that Custom lambda currently does), then it might as well be replaced by string.

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