Skip to content

Commit

Permalink
Fix to use ObservableBase class.
Browse files Browse the repository at this point in the history
  • Loading branch information
clown committed Jun 17, 2021
1 parent b94ed95 commit f3704ec
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 51 deletions.
94 changes: 47 additions & 47 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
*_i.c
*_p.c
*.aps
*.bak
*.cache
*.db
*.dll
*.exe
*.ilk
*.lib
*.log
*.ncb
*.nupkg
*.obj
*.pch
*.pdb
*.resharper
*.sdf
*.suo
*.tlb
*.tlh
*.user
*.vspscc
*.vssscc
*.sbr
*.sdf
*.sh
*.VisualState.xml

[Bb]in/
[Bb]uild/
[Dd]ebug*/
[Ii]pch/
[Oo]bj/
[Rr]elease*/
[Rr]esults/
[Tt]mp/
[Tt]emp/

.svn
.vs

~$*
_ReSharper*/
Ankh.NoLoad
UpgradeLog.htm
[Tt]est[Rr]esult*
*_i.c
*_p.c
*.aps
*.bak
*.cache
*.db
*.dll
*.exe
*.ilk
*.lib
*.log
*.ncb
*.nupkg
*.obj
*.pch
*.pdb
*.resharper
*.sdf
*.suo
*.tlb
*.tlh
*.user
*.vspscc
*.vssscc
*.sbr
*.sdf
*.sh
*.VisualState.xml

[Bb]in/
[Bb]uild/
[Dd]ebug*/
[Ii]pch/
[Oo]bj/
[Rr]elease*/
[Rr]esults/
[Tt]mp/
[Tt]emp/

.svn
.vs

~$*
_ReSharper*/
Ankh.NoLoad
UpgradeLog.htm
[Tt]est[Rr]esult*
14 changes: 11 additions & 3 deletions Libraries/FileSystem/Sources/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Cube.FileSystem
/// </summary>
///
/* --------------------------------------------------------------------- */
public class Startup : DisposableBase
public class Startup : ObservableBase
{
#region Constructors

Expand Down Expand Up @@ -100,7 +100,11 @@ public Startup(string name, IO io)
/// </summary>
///
/* ----------------------------------------------------------------- */
public bool Enabled { get; set; }
public bool Enabled
{
get => Get<bool>();
set => Set(value);
}

/* ----------------------------------------------------------------- */
///
Expand All @@ -112,7 +116,11 @@ public Startup(string name, IO io)
/// </summary>
///
/* ----------------------------------------------------------------- */
public string Source { get; set; }
public string Source
{
get => Get(() => string.Empty);
set => Set(value);
}

/* ----------------------------------------------------------------- */
///
Expand Down
2 changes: 1 addition & 1 deletion Tests/FileSystem/Sources/StartupTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Create()
var src = new Startup(nameof(StartupTest));
Assert.That(src.Name, Is.EqualTo(nameof(StartupTest)));
Assert.That(src.Enabled, Is.False);
Assert.That(src.Source, Is.Null);
Assert.That(src.Source, Is.EqualTo(string.Empty));
Assert.That(src.Arguments, Is.Not.Null);
Assert.That(src.Command, Is.Empty);

Expand Down

0 comments on commit f3704ec

Please sign in to comment.