Skip to content

Commit

Permalink
Use new IReadOnlyObservableList interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jbe2277 committed Nov 19, 2023
1 parent 16dbcf7 commit 5473cdc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Waf.Wpf" Version="7.0.1-alpha.0.51" />
<PackageReference Include="System.Waf.Wpf" Version="7.0.1-alpha.0.53" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.8.0-3.final" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="4.8.0-3.final" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/DotNetPad/DotNetPad.Applications/Services/FileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ internal sealed class FileService : Model, IFileService
public FileService()
{
documentFiles = [];
DocumentFiles = new(documentFiles);
DocumentFiles = new ReadOnlyObservableList<DocumentFile>(documentFiles);
}

public ReadOnlyObservableList<DocumentFile> DocumentFiles { get; }
public IReadOnlyObservableList<DocumentFile> DocumentFiles { get; }

public DocumentFile? ActiveDocumentFile
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Waf.DotNetPad.Applications.Services;

public interface IDocumentService : INotifyPropertyChanged
{
ReadOnlyObservableList<DocumentFile> DocumentFiles { get; }
IReadOnlyObservableList<DocumentFile> DocumentFiles { get; }

DocumentFile? ActiveDocumentFile { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/DotNetPad/DotNetPad.Domain/DotNetPad.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Waf.Core" Version="7.0.1-alpha.0.51" />
<PackageReference Include="System.Waf.Core" Version="7.0.1-alpha.0.53" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Waf.DotNetPad.Presentation.DesignData;

internal sealed class MockDocumentService : Model, IDocumentService
{
public ReadOnlyObservableList<DocumentFile> DocumentFiles { get; set; } = null!;
public IReadOnlyObservableList<DocumentFile> DocumentFiles { get; set; } = null!;

public DocumentFile? ActiveDocumentFile { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class MockFileService : Model, IFileService

public ICommand SaveAsCommand { get; set; } = null!;

public ReadOnlyObservableList<DocumentFile> DocumentFiles { get; set; } = null!;
public IReadOnlyObservableList<DocumentFile> DocumentFiles { get; set; } = null!;

public DocumentFile? ActiveDocumentFile { get; set; }

Expand Down

0 comments on commit 5473cdc

Please sign in to comment.