/// <summary> /// Gets the source object. /// </summary> /// <param name="throwOnError"> /// true to throw an exception if the source is not valid; false to return false. /// </param> public object GetSource(bool throwOnError) { return(_observer.GetActualSource(throwOnError)); }
internal static void BindingSourceShouldBeValid(IObserver bindingSource, string path, object source) { var src = bindingSource.GetActualSource(true); var resourceObject = src as ISourceValue; if (resourceObject == null) { src.ShouldEqual(source); bindingSource.Path.Path.ShouldEqual(path); } else { resourceObject.Value.ShouldEqual(source); bindingSource.Path.Path.ShouldEqual(path); } }