[longomatch] Make sure to add the system templates
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make sure to add the system templates
- Date: Wed, 18 Mar 2015 14:46:39 +0000 (UTC)
commit f6f5ca1a8e8f11271c89c44dfd6610724be08a90
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date: Tue Mar 17 12:13:10 2015 +0100
Make sure to add the system templates
LongoMatch.Services/Services/TemplatesService.cs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Services/Services/TemplatesService.cs
b/LongoMatch.Services/Services/TemplatesService.cs
index d8e0749..f8ea6d4 100644
--- a/LongoMatch.Services/Services/TemplatesService.cs
+++ b/LongoMatch.Services/Services/TemplatesService.cs
@@ -98,7 +98,12 @@ namespace LongoMatch.Services
/// <value>The templates.</value>
public List<T> Templates {
get {
- return storage.RetrieveAll<T>();
+ List<T> templates = storage.RetrieveAll<T>();
+ // Now add the system templates, use a copy to prevent modification of system
templates.
+ foreach (T stemplate in systemTemplates) {
+ templates.Add (Cloner.Clone(stemplate));
+ }
+ return templates;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]