Skip to content

Commit c9bf353

Browse files
committed
Fixes to namespaces
1 parent 3dea05f commit c9bf353

29 files changed

+62
-71
lines changed

sample/src/Components/ForecastDataTable.razor

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@using Egil.RazorComponents.Testing.Library.SampleApp.Data
2-
3-
<table class="table">
1+
<table class="table">
42
<thead>
53
<tr>
64
<th>Date</th>

sample/src/Components/ThemeInfo.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7-
namespace Egil.RazorComponents.Testing.Library.SampleApp.Components
7+
namespace Egil.RazorComponents.Testing.SampleApp.Components
88
{
99
public class ThemeInfo
1010
{
1111
public string? Value { get; set; }
1212
}
13-
14-
// <script>
15-
// function queryWiki(query) {
16-
// return fetch('https://en.wikipedia.org/w/api.php?origin=*&action=opensearch&search=' + query)
17-
// .then(x => x.text());
18-
// }
19-
// </script>
20-
2113
}

sample/src/Components/ThemedButton.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
</button>
44
@code {
55
[Parameter(CaptureUnmatchedValues = true)]
6-
public IReadOnlyDictionary<string, object> Attributes { get; set; }
6+
public IReadOnlyDictionary<string, object>? Attributes { get; set; }
77

88
[CascadingParameter]
99
public ThemeInfo? Theme { get; set; }
1010

1111
[Parameter]
12-
public RenderFragment ChildContent { get; set; }
12+
public RenderFragment? ChildContent { get; set; }
1313

1414
protected override void OnAfterRender(bool firstRender)
1515
{

sample/src/Data/ITodoService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System.Collections.Generic;
22
using System.Threading.Tasks;
33

4-
namespace Egil.RazorComponents.Testing.Library.SampleApp.Data
4+
namespace Egil.RazorComponents.Testing.SampleApp.Data
55
{
66
public interface ITodoService
77
{
88
void Add(Todo todo);
99
void Complete(int todoId);
10-
Task<IReadOnlyList<Todo>> Get();
10+
Task<IReadOnlyList<Todo>> GetAll();
1111
}
1212
}

sample/src/Data/IWeatherForecastService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Threading.Tasks;
33

4-
namespace Egil.RazorComponents.Testing.Library.SampleApp.Data
4+
namespace Egil.RazorComponents.Testing.SampleApp.Data
55
{
66
public interface IWeatherForecastService
77
{

sample/src/Data/Todo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Egil.RazorComponents.Testing.Library.SampleApp.Data
1+
namespace Egil.RazorComponents.Testing.SampleApp.Data
22
{
33
public class Todo
44
{

sample/src/Data/TodoService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7-
namespace Egil.RazorComponents.Testing.Library.SampleApp.Data
7+
namespace Egil.RazorComponents.Testing.SampleApp.Data
88
{
99
public class TodoService : ITodoService
1010
{
1111
private readonly List<Todo> _todos = new List<Todo>();
1212

13-
public Task<IReadOnlyList<Todo>> Get()
13+
public Task<IReadOnlyList<Todo>> GetAll()
1414
{
1515
return Task.FromResult((IReadOnlyList<Todo>)_todos);
1616
}
1717

1818
public void Add(Todo todo)
1919
{
20+
if(todo is null) throw new ArgumentNullException(nameof(todo));
2021
todo.Id = _todos.Count;
2122
_todos.Add(todo);
2223
}

sample/src/Data/WeatherForecast.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 Egil.RazorComponents.Testing.Library.SampleApp.Data
3+
namespace Egil.RazorComponents.Testing.SampleApp.Data
44
{
55
public class WeatherForecast
66
{

sample/src/Data/WeatherForecastService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Linq;
33
using System.Threading.Tasks;
44

5-
namespace Egil.RazorComponents.Testing.Library.SampleApp.Data
5+
namespace Egil.RazorComponents.Testing.SampleApp.Data
66
{
77
public class WeatherForecastService : IWeatherForecastService
88
{

sample/src/Egil.RazorComponents.Testing.Library.SampleApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<RootNamespace>Egil.RazorComponents.Testing.SampleApp</RootNamespace>
56
</PropertyGroup>
67

78
</Project>

0 commit comments

Comments
 (0)