Skip to content

Move generic code to strategies library. #5972

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

Merged
merged 24 commits into from
Apr 24, 2018
Merged

Move generic code to strategies library. #5972

merged 24 commits into from
Apr 24, 2018

Conversation

sergey-shandar
Copy link
Contributor

@sergey-shandar sergey-shandar commented Apr 17, 2018

Description

Depends on #5933

Checklist

@sergey-shandar sergey-shandar mentioned this pull request Apr 18, 2018
10 tasks
@markcowl markcowl self-assigned this Apr 18, 2018

public static string UpdateLocation(
this IState current, string location, IResourceConfig config)
=> location ?? current.GetLocation(config) ?? "eastus";
Copy link
Member

Choose a reason for hiding this comment

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

do we always want to default to eastus for all usages of the strategies library?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. We need to discuss this.

{
// create a DAG of configs.
var config = await parameters.CreateConfigAsync();

Copy link
Member

Choose a reason for hiding this comment

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

remove extra vertical space between lines (only vertical space after ending }

{
return string.Join(",", e.Cast<object>().Select(ToPowerShellString));
}
return value.ToString();
Copy link
Member

Choose a reason for hiding this comment

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

needs vertical space after }

var config = taskProgress.Config;
activeTasks.Add(config.GetFullName());
}
progress += taskProgress.GetProgress();
Copy link
Member

Choose a reason for hiding this comment

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

vertical space after '}' (please apply throughout file)

{
public static class AsyncCmdletExtensions
{
public static void WriteVerbose(this IAsyncCmdlet cmdlet, string message, params object[] p)
Copy link
Member

Choose a reason for hiding this comment

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

Please provide documentation comments for this class, and for all public properties and methoids (you have most of the methods)

{
interface IAsyncCmdlet
public interface IAsyncCmdlet
Copy link
Member

Choose a reason for hiding this comment

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

Please provide documentation comments for this public interface and each of its methods and properties.

{
public interface ICmdlet
{
void WriteVerbose(string message);
Copy link
Member

Choose a reason for hiding this comment

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

WriteVerbose, WriteObject, and WriteProgress are already in ICommandRuntime. Not sure why we need this - seems like just for Parameters.

Also, please provide documentation comemnts on the interface and properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to use ICommandRuntime if I can use it in the Strategy library without introducing dependencies on PowerShell.

{
internal sealed class ShouldProcess : IShouldProcess
public interface IParameters<TModel>
Copy link
Member

Choose a reason for hiding this comment

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

Can we retroactively add documentation comments here?

return newState.Get(config) ?? current.Get(config);
}

static string UpdateLocation(
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that the default should be east us, I think this is something that should be set for each client (perhaps a DefaultLocation property.

The fear is that services that are not available in eastus will default to this value inadvertently

@markcowl markcowl removed their assignment Apr 24, 2018
@markcowl
Copy link
Member

@cormacpayne cormacpayne merged commit 1a87746 into Azure:preview Apr 24, 2018
@sergey-shandar sergey-shandar deleted the sergey-strategies-update2 branch April 24, 2018 17:31
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.

4 participants