Browse Source
- Added possibility to set a different service environment for view models (needed for unit testing).pull/32/head
19 changed files with 232 additions and 23 deletions
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using ICSharpCode.SharpDevelop; |
||||
|
||||
namespace ICSharpCode.AddInManager2.Model |
||||
{ |
||||
/// <summary>
|
||||
/// Handler for managing all persisted settings of AddInManager AddIn.
|
||||
/// </summary>
|
||||
public class AddInManagerSettings : IAddInManagerSettings |
||||
{ |
||||
public string[] PackageRepositories |
||||
{ |
||||
get |
||||
{ |
||||
return SD.PropertyService.Get<string[]>("AddInManager2.PackageRepositories", null); |
||||
} |
||||
set |
||||
{ |
||||
SD.PropertyService.Set<string[]>("AddInManager2.PackageRepositories", value ?? new string[0]); |
||||
} |
||||
} |
||||
|
||||
public bool ShowPreinstalledAddIns |
||||
{ |
||||
get |
||||
{ |
||||
return SD.PropertyService.Get<bool>("AddInManager2.ShowPreinstalledAddIns", false); |
||||
} |
||||
set |
||||
{ |
||||
SD.PropertyService.Set<bool>("AddInManager2.ShowPreinstalledAddIns", value); |
||||
} |
||||
} |
||||
|
||||
public bool ShowPrereleases |
||||
{ |
||||
get |
||||
{ |
||||
return SD.PropertyService.Get<bool>("AddInManager2.ShowPrereleases", false); |
||||
} |
||||
set |
||||
{ |
||||
SD.PropertyService.Set<bool>("AddInManager2.ShowPrereleases", value); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.AddInManager2.Model |
||||
{ |
||||
/// <summary>
|
||||
/// Description of ISettings.
|
||||
/// </summary>
|
||||
public interface IAddInManagerSettings |
||||
{ |
||||
string[] PackageRepositories |
||||
{ |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
bool ShowPreinstalledAddIns |
||||
{ |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
bool ShowPrereleases |
||||
{ |
||||
get; |
||||
set; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue