Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 34dc09e

Browse files
committed
refatração de código fonte
1 parent b4c2fc9 commit 34dc09e

File tree

16 files changed

+21
-28
lines changed

16 files changed

+21
-28
lines changed
14.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

‎SignalRNotificationsApi/SignalRNotificationsApi/Controllers/CustomersController.cs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using Microsoft.AspNetCore.Mvc;
22
using Microsoft.AspNetCore.SignalR;
3-
using SignalRNotificationsApi.Core;
3+
using SignalRNotificationsApi.Hubs;
4+
using SignalRNotificationsApi.Infra;
5+
using SignalRNotificationsApi.Models;
46
using System;
57
using System.Collections.Generic;
68
using System.Threading.Tasks;
@@ -44,7 +46,8 @@ public async Task<IActionResult> Post([FromBody] Customer customer)
4446

4547
await _repository.Add(customer);
4648

47-
await _notifyHub.Clients.All.SendAsync("Notify", $"Customer: {customer.Name} created at {DateTime.Now.ToShortDateString()}");
49+
await _notifyHub.Clients.All.SendAsync("Notify",
50+
$"Customer: {customer.Name} created at {DateTime.Now.ToShortDateString()}");
4851

4952
return CreatedAtAction("GetCustomer", new { id = customer.Id }, customer);
5053
}

‎SignalRNotificationsApi/SignalRNotificationsApi/Core/ITypedHubClient.cs‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎SignalRNotificationsApi/SignalRNotificationsApi/Core/NotifyHub.cs‎ renamed to ‎SignalRNotificationsApi/SignalRNotificationsApi/Hubs/NotifyHub.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using Microsoft.AspNetCore.SignalR;
2-
using System.Threading.Tasks;
1+
using System.Threading.Tasks;
2+
using Microsoft.AspNetCore.SignalR;
33

4-
namespace SignalRNotificationsApi.Core
4+
namespace SignalRNotificationsApi.Hubs
55
{
66
public class NotifyHub : Hub
77
{

‎SignalRNotificationsApi/SignalRNotificationsApi/Core/CustomerRepository.cs‎ renamed to ‎SignalRNotificationsApi/SignalRNotificationsApi/Infra/CustomerRepository.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
5+
using SignalRNotificationsApi.Models;
56

6-
namespace SignalRNotificationsApi.Core
7+
namespace SignalRNotificationsApi.Infra
78
{
89
public class CustomerRepository : ICustomerRepository
910
{

‎SignalRNotificationsApi/SignalRNotificationsApi/Core/ICustomerRepository.cs‎ renamed to ‎SignalRNotificationsApi/SignalRNotificationsApi/Infra/ICustomerRepository.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
4+
using SignalRNotificationsApi.Models;
45

5-
namespace SignalRNotificationsApi.Core
6+
namespace SignalRNotificationsApi.Infra
67
{
78
public interface ICustomerRepository
89
{

‎SignalRNotificationsApi/SignalRNotificationsApi/Core/InMemoryContext.cs‎ renamed to ‎SignalRNotificationsApi/SignalRNotificationsApi/Infra/InMemoryContext.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Collections.ObjectModel;
2+
using SignalRNotificationsApi.Models;
23

3-
namespace SignalRNotificationsApi.Core
4+
namespace SignalRNotificationsApi.Infra
45
{
56
public sealed class InMemoryContext
67
{

‎SignalRNotificationsApi/SignalRNotificationsApi/Core/Customer.cs‎ renamed to ‎SignalRNotificationsApi/SignalRNotificationsApi/Models/Customer.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace SignalRNotificationsApi.Core
3+
namespace SignalRNotificationsApi.Models
44
{
55
public class Customer
66
{

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /