Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of clean-up. Added support for synchronizing workitem ordinal to…
… get correct order
- Loading branch information
1 parent
7ede38d
commit 6f95fb5
Showing
37 changed files
with
1,314 additions
and
1,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,7 @@ h1 | |
border-left:solid 1px black; | ||
} | ||
|
||
|
||
.tasks h1 | ||
{ | ||
left:0px; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Collections.Specialized; | ||
|
||
namespace WhiskWork.Core | ||
{ | ||
public interface IWorkflow | ||
{ | ||
bool ExistsWorkItem(string workItemId); | ||
bool ExistsWorkStep(string path); | ||
void UpdateWorkItem(WorkItem workItem); | ||
void CreateWorkStep(WorkStep workStep); | ||
void CreateWorkItem(WorkItem workItem); | ||
WorkItem GetWorkItem(string workItemId); | ||
void DeleteWorkItem(string workItemId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Linq; | ||
|
||
namespace WhiskWork.Core.Synchronization | ||
{ | ||
public class DataSynchronizer | ||
{ | ||
private readonly ISynchronizationAgent _master; | ||
private readonly ISynchronizationAgent _slave; | ||
|
||
public DataSynchronizer(ISynchronizationAgent master, ISynchronizationAgent slave) | ||
{ | ||
_master = master; | ||
_slave = slave; | ||
} | ||
|
||
public void Synchronize() | ||
{ | ||
var masterEntries = _master.GetAll().ToDictionary(e => e.Id); | ||
var slaveEntries = _slave.GetAll().ToDictionary(e => e.Id); | ||
|
||
foreach (var masterId in masterEntries.Keys) | ||
{ | ||
if (slaveEntries.ContainsKey(masterId)) | ||
{ | ||
var slaveEntry = slaveEntries[masterId]; | ||
|
||
var updateEntry = new SynchronizationEntry(masterId, slaveEntry.Status, | ||
masterEntries[masterId].Properties) | ||
{Ordinal = masterEntries[masterId].Ordinal}; | ||
|
||
_slave.UpdateData(updateEntry); | ||
} | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.