public override object GetEntity(Uri absolute_uri, string role, Type of_object_to_return) { string relative_uri = Resolve(absolute_uri); // Ignore the path and load the file from the manifest resources. Stream stream = PreprocessorTest.GetManifestResourceStream( relative_uri); if (stream == null) { Utils.ThrowAppException("Resource '{0}' not found", relative_uri); } return(stream); }
public override object GetEntity(Uri absolute_uri, string role, Type of_object_to_return) { string relative_uri = Resolve(absolute_uri); // Ignore the path and load the file from the manifest resources. // Don't assert that the resource exists, we need that to fall through // for testing purposes. Stream stream = PreprocessorTest.GetManifestResourceStream(relative_uri, false); if (stream == null) { throw new FileNotFoundException("Test resource not found.", absolute_uri.OriginalString); } return(stream); }