Skip to content

CloudServiceConfigurationMaker to customize .cscfg#156

Open
smoothdeveloper wants to merge 2 commits intombraceproject:masterfrom
smoothdeveloper:cloudservice-createconfiguration-parameter
Open

CloudServiceConfigurationMaker to customize .cscfg#156
smoothdeveloper wants to merge 2 commits intombraceproject:masterfrom
smoothdeveloper:cloudservice-createconfiguration-parameter

Conversation

@smoothdeveloper
Copy link
Copy Markdown

See #155

…is expecting a function to generate the .cscfg as a string)
@isaacabraham
Copy link
Copy Markdown
Contributor

LGTM. Thoughts @eiriktsarpalis ?

@eiriktsarpalis
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

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

@eiriktsarpalis
Copy link
Copy Markdown
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