Skip to content

Commit

Permalink
Update method signatures.
Browse files Browse the repository at this point in the history
Update method signatures.
  • Loading branch information
rlhagerm committed Sep 27, 2022
1 parent 071c109 commit b1710be
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions dotnetv3/RDS/Scenarios/RDSInstanceScenario/RDSInstanceScenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ 10. Create an RDS database instance that contains a MySql database and uses the
private static RDSWrapper rdsWrapper = null!;
private static ILogger logger = null!;
private static readonly string engine = "mysql";

static async Task Main(string[] args)
{
// Set up dependency injection for the Amazon RDS service.
Expand Down Expand Up @@ -121,7 +120,7 @@ static async Task Main(string[] args)
/// Choose the RDS DB parameter group family from a list of available options.
/// </summary>
/// <returns>The selected parameter group family.</returns>
private static async Task<string> ChooseParameterGroupFamily()
public static async Task<string> ChooseParameterGroupFamily()
{
Console.WriteLine(sepBar);
// 1. Get a list of available engines.
Expand Down Expand Up @@ -155,7 +154,7 @@ private static async Task<string> ChooseParameterGroupFamily()
/// </summary>
/// <param name="dbParameterGroupFamily">The DBParameterGroupFamily for the new DB parameter group.</param>
/// <returns>The new DBParameterGroup.</returns>
private static async Task<DBParameterGroup> CreateDbParameterGroup(string dbParameterGroupFamily)
public static async Task<DBParameterGroup> CreateDbParameterGroup(string dbParameterGroupFamily)
{
Console.WriteLine(sepBar);
Console.WriteLine($"2. Create new DB parameter group with family {dbParameterGroupFamily}:");
Expand All @@ -180,7 +179,7 @@ await rdsWrapper.DescribeDBParameterGroups(parameterGroup
/// <param name="parameterGroupName">Name of the DBParameterGroup.</param>
/// <param name="parameterNames">Optional specific names of parameters to describe.</param>
/// <returns>The list of requested parameters.</returns>
private static async Task<List<Parameter>> DescribeParametersInGroup(string parameterGroupName, List<string>? parameterNames = null)
public static async Task<List<Parameter>> DescribeParametersInGroup(string parameterGroupName, List<string>? parameterNames = null)
{
Console.WriteLine(sepBar);
Console.WriteLine("4. Get some parameters from the group.");
Expand Down Expand Up @@ -211,7 +210,7 @@ private static async Task<List<Parameter>> DescribeParametersInGroup(string para
/// <param name="parameterGroupName">Name of the DBParameterGroup.</param>
/// <param name="parameters">The parameters to modify.</param>
/// <returns>Async task.</returns>
private static async Task ModifyParameters(string parameterGroupName, List<Parameter> parameters)
public static async Task ModifyParameters(string parameterGroupName, List<Parameter> parameters)
{
Console.WriteLine(sepBar);
Console.WriteLine("6. Modify some parameters in the group.");
Expand Down Expand Up @@ -244,7 +243,7 @@ private static async Task ModifyParameters(string parameterGroupName, List<Param
/// </summary>
/// <param name="parameterGroupName">Name of the DBParameterGroup.</param>
/// <returns></returns>
private static async Task DescribeUserSourceParameters(string parameterGroupName)
public static async Task DescribeUserSourceParameters(string parameterGroupName)
{
Console.WriteLine(sepBar);
Console.WriteLine("7. Describe user source parameters in the group.");
Expand All @@ -269,7 +268,7 @@ private static async Task DescribeUserSourceParameters(string parameterGroupName
/// </summary>
/// <param name="dbParameterGroupFamily">DB parameter group family for engine choice.</param>
/// <returns></returns>
private static async Task<DBEngineVersion> ChooseDbEngineVersion(string dbParameterGroupFamily)
public static async Task<DBEngineVersion> ChooseDbEngineVersion(string dbParameterGroupFamily)
{
Console.WriteLine(sepBar);
// get list of allowed engines
Expand Down Expand Up @@ -304,7 +303,7 @@ private static async Task<DBEngineVersion> ChooseDbEngineVersion(string dbParame
/// <param name="engine">DB engine for instance choice.</param>
/// <param name="engineVersion">DB engine version for instance choice.</param>
/// <returns>The selected orderable DB instance option.</returns>
private static async Task<OrderableDBInstanceOption> ChooseDbInstanceClass(string engine, string engineVersion)
public static async Task<OrderableDBInstanceOption> ChooseDbInstanceClass(string engine, string engineVersion)
{
Console.WriteLine(sepBar);
// Get a list of allowed instance classes.
Expand Down Expand Up @@ -347,7 +346,7 @@ private static async Task<OrderableDBInstanceOption> ChooseDbInstanceClass(strin
/// <param name="instanceClass">Instance class to use for the instance.</param>
/// <param name="instanceIdentifier">Instance identifier to use for the instance.</param>
/// <returns></returns>
private static async Task<DBInstance?> CreateRdsNewInstance(DBParameterGroup parameterGroup,
public static async Task<DBInstance?> CreateRdsNewInstance(DBParameterGroup parameterGroup,
string engineName, string engineVersion, string instanceClass, string instanceIdentifier)
{
Console.WriteLine(sepBar);
Expand Down Expand Up @@ -402,7 +401,7 @@ private static async Task<OrderableDBInstanceOption> ChooseDbInstanceClass(strin
/// Display a connection string for an RDS instance.
/// </summary>
/// <param name="instance">The DB instance to use to get a connection string.</param>
private static void DisplayConnectionString(DBInstance instance)
public static void DisplayConnectionString(DBInstance instance)
{
Console.WriteLine(sepBar);
// Display the connection string
Expand All @@ -419,7 +418,7 @@ private static void DisplayConnectionString(DBInstance instance)
/// </summary>
/// <param name="instance">Instance to use when creating a snapshot.</param>
/// <returns>The snapshot object.</returns>
private static async Task<DBSnapshot> CreateSnapshot(DBInstance instance)
public static async Task<DBSnapshot> CreateSnapshot(DBInstance instance)
{
Console.WriteLine(sepBar);
// Create a snapshot.
Expand Down Expand Up @@ -448,7 +447,7 @@ private static async Task<DBSnapshot> CreateSnapshot(DBInstance instance)
/// </summary>
/// <param name="instance">The instance to delete.</param>
/// <returns>Async task.</returns>
private static async Task DeleteRdsInstance(DBInstance newInstance)
public static async Task DeleteRdsInstance(DBInstance newInstance)
{
Console.WriteLine(sepBar);
// Delete the DB instance.
Expand All @@ -474,7 +473,7 @@ private static async Task DeleteRdsInstance(DBInstance newInstance)
/// </summary>
/// <param name="parameterGroup">The parameter group to delete.</param>
/// <returns>Async task.</returns>
private static async Task DeleteParameterGroup(DBParameterGroup parameterGroup)
public static async Task DeleteParameterGroup(DBParameterGroup parameterGroup)
{
Console.WriteLine(sepBar);
// Delete the parameter group.
Expand Down

0 comments on commit b1710be

Please sign in to comment.