33 lines
No EOL
751 B
C#
33 lines
No EOL
751 B
C#
using JD.Collections;
|
|
using JD.Kernel.Classes;
|
|
using TeaBox;
|
|
using JD.Serialization;
|
|
|
|
namespace JD.Timeline.Model
|
|
{
|
|
public class TapeCollection : ObservableKeyedCollection<string, Tape>
|
|
{
|
|
private readonly Scope _replicationOperation = new Scope();
|
|
|
|
protected override string GetKeyForItem(Tape tape)
|
|
{
|
|
return tape.Id;
|
|
}
|
|
|
|
public Tape GetOrCreate(string id)
|
|
{
|
|
Tape Tape;
|
|
if (!TryGetValue(id, out Tape))
|
|
{
|
|
Tape = new Tape { Id = id };
|
|
Add(Tape);
|
|
}
|
|
return Tape;
|
|
}
|
|
|
|
public Scope ReplicationOperation
|
|
{
|
|
get { return _replicationOperation; }
|
|
}
|
|
}
|
|
} |