Skip to content

Commit

Permalink
Refactor method access modifier and fix method casing
Browse files Browse the repository at this point in the history
Changed SetPriceCode method to private in Movie class to encapsulate it. Corrected the casing of the Main and Stop methods in GreetingServer to adhere to C# naming conventions. This enhances code encapsulation and readability while maintaining consistency.
  • Loading branch information
marsen committed Nov 14, 2024
1 parent f913f26 commit 56f97a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public Movie(string title, MoveType moveType)
SetPriceCode(moveType);
}

public void SetPriceCode(MoveType arg)
private void SetPriceCode(MoveType arg)
{
switch (arg)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Marsen.NetCore.Dojo/Classes/GOOS/GreetingServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static class GreetingServer
{
private static HttpListener _httpListener;

public static void main(params string[] args)
public static void Main(params string[] args)
{
_httpListener = new HttpListener();
_httpListener.Prefixes.Add(SampleUri);
Expand All @@ -33,7 +33,7 @@ private static void GetContext(IAsyncResult ar)
}
}

public static void stop()
public static void Stop()
{
_httpListener.Stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public class InitializationTest : IDisposable
{
protected InitializationTest()
{
GreetingServer.main();
GreetingServer.Main();
}

public void Dispose()
{
GreetingServer.stop();
GreetingServer.Stop();
SystemDateTime.Reset();
}
}
Expand Down

0 comments on commit 56f97a6

Please sign in to comment.