Index: Riskeer/Common/src/Riskeer.Common.Forms/Helpers/TargetProbabilityCalculationsDisplayNameHelper.cs
===================================================================
diff -u -r0041ff12405429f1df2a3ddd3db05728e5bde8f3 -r1d15c66956e219f4557f7219c5176f40f17f0ba0
--- Riskeer/Common/src/Riskeer.Common.Forms/Helpers/TargetProbabilityCalculationsDisplayNameHelper.cs (.../TargetProbabilityCalculationsDisplayNameHelper.cs) (revision 0041ff12405429f1df2a3ddd3db05728e5bde8f3)
+++ Riskeer/Common/src/Riskeer.Common.Forms/Helpers/TargetProbabilityCalculationsDisplayNameHelper.cs (.../TargetProbabilityCalculationsDisplayNameHelper.cs) (revision 1d15c66956e219f4557f7219c5176f40f17f0ba0)
@@ -115,7 +115,7 @@
if (!nonUniqueCalculationsDisplayNameLookup.ContainsKey(calculations))
{
- throw new InvalidOperationException("The provided calculations object is not part of the enumeration.");
+ throw new InvalidOperationException("The provided calculations object is not part of the enumeration that contains all calculations.");
}
return GetUniqueDisplayNameLookup(nonUniqueCalculationsDisplayNameLookup)[calculations];
Index: Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/LocationCalculationsContext.cs
===================================================================
diff -u -r199a6d4cf0278995877dab1a4e4e90da3f07f2d0 -r1d15c66956e219f4557f7219c5176f40f17f0ba0
--- Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/LocationCalculationsContext.cs (.../LocationCalculationsContext.cs) (revision 199a6d4cf0278995877dab1a4e4e90da3f07f2d0)
+++ Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/LocationCalculationsContext.cs (.../LocationCalculationsContext.cs) (revision 1d15c66956e219f4557f7219c5176f40f17f0ba0)
@@ -29,7 +29,7 @@
namespace Riskeer.Common.Forms.PresentationObjects
{
///
- /// Base class for location calculation related presentation objects that should be uniquely identifiable.
+ /// Base class for location calculations related presentation objects that should be uniquely identifiable.
///
/// The object type of the wrapped instance.
/// The object type of the instances that effect the unique identification.
@@ -38,9 +38,9 @@
{
private readonly Collection observers = new Collection();
- private Observer locationCalculationsListObserver;
+ private Observer locationCalculationsEnumerationObserver;
- private RecursiveObserver, TObservable> locationCalculationsObserver;
+ private RecursiveObserver, TObservable> locationCalculationsObserver;
///
/// Creates a new instance of .
@@ -56,17 +56,17 @@
{
if (!observers.Any())
{
- if (!(LocationCalculationsListToObserve is TObservable))
+ if (!(LocationCalculationsEnumerationToObserve is TObservable))
{
- locationCalculationsListObserver = new Observer(NotifyObservers)
+ locationCalculationsEnumerationObserver = new Observer(NotifyObservers)
{
- Observable = LocationCalculationsListToObserve
+ Observable = LocationCalculationsEnumerationToObserve
};
}
- locationCalculationsObserver = new RecursiveObserver, TObservable>(NotifyObservers, list => list)
+ locationCalculationsObserver = new RecursiveObserver, TObservable>(NotifyObservers, enumerable => enumerable)
{
- Observable = LocationCalculationsListToObserve
+ Observable = LocationCalculationsEnumerationToObserve
};
}
@@ -79,9 +79,9 @@
if (!observers.Any())
{
- if (!(LocationCalculationsListToObserve is TObservable))
+ if (!(LocationCalculationsEnumerationToObserve is TObservable))
{
- locationCalculationsListObserver.Dispose();
+ locationCalculationsEnumerationObserver.Dispose();
}
locationCalculationsObserver.Dispose();
@@ -104,8 +104,8 @@
}
///
- /// Gets the list of instances that effect the unique identification.
+ /// Gets the enumeration of instances that effect the unique identification.
///
- protected abstract ObservableList LocationCalculationsListToObserve { get; }
+ protected abstract IObservableEnumerable LocationCalculationsEnumerationToObserve { get; }
}
}
\ No newline at end of file
Index: Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/WaterLevelCalculationsForUserDefinedTargetProbabilityContext.cs
===================================================================
diff -u -rfa5bb22f946712b854b0762ad126ed5f0cb7ceef -r1d15c66956e219f4557f7219c5176f40f17f0ba0
--- Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/WaterLevelCalculationsForUserDefinedTargetProbabilityContext.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityContext.cs) (revision fa5bb22f946712b854b0762ad126ed5f0cb7ceef)
+++ Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/WaterLevelCalculationsForUserDefinedTargetProbabilityContext.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityContext.cs) (revision 1d15c66956e219f4557f7219c5176f40f17f0ba0)
@@ -41,6 +41,6 @@
IAssessmentSection assessmentSection)
: base(wrappedData, assessmentSection) {}
- protected override ObservableList LocationCalculationsListToObserve => AssessmentSection.WaterLevelCalculationsForUserDefinedTargetProbabilities;
+ protected override IObservableEnumerable LocationCalculationsEnumerationToObserve => AssessmentSection.WaterLevelCalculationsForUserDefinedTargetProbabilities;
}
}
\ No newline at end of file
Index: Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/WaveHeightCalculationsForUserDefinedTargetProbabilityContext.cs
===================================================================
diff -u -rfa5bb22f946712b854b0762ad126ed5f0cb7ceef -r1d15c66956e219f4557f7219c5176f40f17f0ba0
--- Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/WaveHeightCalculationsForUserDefinedTargetProbabilityContext.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityContext.cs) (revision fa5bb22f946712b854b0762ad126ed5f0cb7ceef)
+++ Riskeer/Common/src/Riskeer.Common.Forms/PresentationObjects/WaveHeightCalculationsForUserDefinedTargetProbabilityContext.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityContext.cs) (revision 1d15c66956e219f4557f7219c5176f40f17f0ba0)
@@ -41,6 +41,6 @@
IAssessmentSection assessmentSection)
: base(wrappedData, assessmentSection) {}
- protected override ObservableList LocationCalculationsListToObserve => AssessmentSection.WaveHeightCalculationsForUserDefinedTargetProbabilities;
+ protected override IObservableEnumerable LocationCalculationsEnumerationToObserve => AssessmentSection.WaveHeightCalculationsForUserDefinedTargetProbabilities;
}
}
\ No newline at end of file
Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/HydraulicBoundaryLocationCalculationsForUserDefinedTargetProbabilityContextTest.cs
===================================================================
diff -u -rfa5bb22f946712b854b0762ad126ed5f0cb7ceef -r1d15c66956e219f4557f7219c5176f40f17f0ba0
--- Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/HydraulicBoundaryLocationCalculationsForUserDefinedTargetProbabilityContextTest.cs (.../HydraulicBoundaryLocationCalculationsForUserDefinedTargetProbabilityContextTest.cs) (revision fa5bb22f946712b854b0762ad126ed5f0cb7ceef)
+++ Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/HydraulicBoundaryLocationCalculationsForUserDefinedTargetProbabilityContextTest.cs (.../HydraulicBoundaryLocationCalculationsForUserDefinedTargetProbabilityContextTest.cs) (revision 1d15c66956e219f4557f7219c5176f40f17f0ba0)
@@ -72,7 +72,7 @@
HydraulicBoundaryLocationCalculationsForTargetProbability wrappedData, IAssessmentSection assessmentSection)
: base(wrappedData, assessmentSection) {}
- protected override ObservableList LocationCalculationsListToObserve { get; }
+ protected override IObservableEnumerable LocationCalculationsEnumerationToObserve { get; }
= new ObservableList();
}
}
Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/LocationCalculationsContextTest.cs
===================================================================
diff -u -r199a6d4cf0278995877dab1a4e4e90da3f07f2d0 -r1d15c66956e219f4557f7219c5176f40f17f0ba0
--- Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/LocationCalculationsContextTest.cs (.../LocationCalculationsContextTest.cs) (revision 199a6d4cf0278995877dab1a4e4e90da3f07f2d0)
+++ Riskeer/Common/test/Riskeer.Common.Forms.Test/PresentationObjects/LocationCalculationsContextTest.cs (.../LocationCalculationsContextTest.cs) (revision 1d15c66956e219f4557f7219c5176f40f17f0ba0)
@@ -84,28 +84,28 @@
}
[Test]
- public void GivenContextWithObserverAttached_WhenNotifyingLocationCalculationsListToObserve_ThenObserverCorrectlyNotified()
+ public void GivenContextWithObserverAttached_WhenNotifyingLocationCalculationsEnumerationToObserve_ThenObserverCorrectlyNotified()
{
// Given
var mockRepository = new MockRepository();
var observer = mockRepository.StrictMock();
observer.Expect(o => o.UpdateObserver());
mockRepository.ReplayAll();
- var locationCalculationsListToObserve = new ObservableList();
- var context = new TestLocationCalculationsContext(new object(), locationCalculationsListToObserve);
+ var locationCalculationsEnumerationToObserve = new ObservableList();
+ var context = new TestLocationCalculationsContext(new object(), locationCalculationsEnumerationToObserve);
context.Attach(observer);
// When
- locationCalculationsListToObserve.NotifyObservers();
+ locationCalculationsEnumerationToObserve.NotifyObservers();
// Then
mockRepository.VerifyAll();
}
[Test]
- public void GivenContextWithObserverAttached_WhenNotifyingLocationCalculationsElementInListToObserve_ThenObserverCorrectlyNotified()
+ public void GivenContextWithObserverAttached_WhenNotifyingLocationCalculationsElementInEnumerationToObserve_ThenObserverCorrectlyNotified()
{
// Given
var mockRepository = new MockRepository();
@@ -114,12 +114,12 @@
mockRepository.ReplayAll();
var observable = new TestObservable();
- var locationCalculationsListToObserve = new ObservableList
+ var locationCalculationsEnumerationToObserve = new ObservableList
{
observable
};
- var context = new TestLocationCalculationsContext(new object(), locationCalculationsListToObserve);
+ var context = new TestLocationCalculationsContext(new object(), locationCalculationsEnumerationToObserve);
context.Attach(observer);
@@ -131,28 +131,28 @@
}
[Test]
- public void GivenContextWithObserverAttachedThatThrowsInvalidOperationException_WhenNotifyingLocationCalculationsListToObserve_ThenNoExceptionThrown()
+ public void GivenContextWithObserverAttachedThatThrowsInvalidOperationException_WhenNotifyingLocationCalculationsEnumerationToObserve_ThenNoExceptionThrown()
{
// Given
var mockRepository = new MockRepository();
var observer = mockRepository.StrictMock();
observer.Expect(o => o.UpdateObserver()).Do((Action) (() => throw new InvalidOperationException()));
mockRepository.ReplayAll();
- var locationCalculationsListToObserve = new ObservableList();
- var context = new TestLocationCalculationsContext(new object(), locationCalculationsListToObserve);
+ var locationCalculationsEnumerationToObserve = new ObservableList();
+ var context = new TestLocationCalculationsContext(new object(), locationCalculationsEnumerationToObserve);
context.Attach(observer);
// When
- locationCalculationsListToObserve.NotifyObservers();
+ locationCalculationsEnumerationToObserve.NotifyObservers();
// Then
mockRepository.VerifyAll();
}
[Test]
- public void GivenContextWithObserverAttachedThatThrowsInvalidOperationException_WhenNotifyingLocationCalculationsElementInListToObserve_ThenNoExceptionThrown()
+ public void GivenContextWithObserverAttachedThatThrowsInvalidOperationException_WhenNotifyingLocationCalculationsElementInEnumerationToObserve_ThenNoExceptionThrown()
{
// Given
var mockRepository = new MockRepository();
@@ -161,12 +161,12 @@
mockRepository.ReplayAll();
var observable = new TestObservable();
- var locationCalculationsListToObserve = new ObservableList
+ var locationCalculationsEnumerationToObserve = new ObservableList
{
observable
};
- var context = new TestLocationCalculationsContext(new object(), locationCalculationsListToObserve);
+ var context = new TestLocationCalculationsContext(new object(), locationCalculationsEnumerationToObserve);
context.Attach(observer);
@@ -179,12 +179,12 @@
private class TestLocationCalculationsContext : LocationCalculationsContext