[longomatch] add last modified filed
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] add last modified filed
- Date: Sun, 18 Dec 2011 21:42:35 +0000 (UTC)
commit d265c1bf3007864ea007fde8c031173d534d3952
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Dec 10 01:55:46 2011 +0100
add last modified filed
LongoMatch.Core/Store/ProjectDescription.cs | 5 +++++
LongoMatch.Services/Services/DataBase.cs | 2 ++
LongoMatch.Services/Services/FileDB.cs | 3 +++
3 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Core/Store/ProjectDescription.cs b/LongoMatch.Core/Store/ProjectDescription.cs
index 216a7af..4f61d61 100644
--- a/LongoMatch.Core/Store/ProjectDescription.cs
+++ b/LongoMatch.Core/Store/ProjectDescription.cs
@@ -119,6 +119,11 @@ namespace LongoMatch.Store
File.VideoWidth, File.VideoHeight, File.Fps);
}
}
+
+ public DateTime LastModified {
+ get;
+ set;
+ }
public int CompareTo(object obj) {
if(obj is ProjectDescription) {
diff --git a/LongoMatch.Services/Services/DataBase.cs b/LongoMatch.Services/Services/DataBase.cs
index 2c6d0c4..cac9d4a 100644
--- a/LongoMatch.Services/Services/DataBase.cs
+++ b/LongoMatch.Services/Services/DataBase.cs
@@ -195,6 +195,7 @@ namespace LongoMatch.DB
public void AddProject(Project project) {
IObjectContainer db = Db4oFactory.OpenFile(file);
+ project.Description.LastModified = DateTime.Now;
Log.Debug("Adding new project: " + project);
try {
db.Store(project);
@@ -249,6 +250,7 @@ namespace LongoMatch.DB
SetDeleteCascadeOptions();
IObjectContainer db = Db4oFactory.OpenFile(file);
+ project.Description.LastModified = DateTime.Now;
Log.Debug("Updating project " + project);
try {
IQuery query = GetQueryProjectById(db, project.UUID);
diff --git a/LongoMatch.Services/Services/FileDB.cs b/LongoMatch.Services/Services/FileDB.cs
index 0b1a25c..11ddc67 100644
--- a/LongoMatch.Services/Services/FileDB.cs
+++ b/LongoMatch.Services/Services/FileDB.cs
@@ -63,6 +63,8 @@ namespace LongoMatch.Services
public void AddProject(Project project){
string path = Path.Combine(project_path, project.UUID.ToString());
+
+ project.Description.LastModified = DateTime.Now;
if (File.Exists(path))
File.Delete(path);
SerializableObject.Save(project, path);
@@ -80,6 +82,7 @@ namespace LongoMatch.Services
}
public void UpdateProject(Project project) {
+ project.Description.LastModified = DateTime.Now;
AddProject(project);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]