/// <inheritdoc /> protected override Stream CurrentOpen(PathDefinition definition, string virtualPath) { var controlPresentation = this.GetControlPresentation(definition, virtualPath); if (controlPresentation != null && !controlPresentation.Data.IsNullOrEmpty()) { var bytes = RouteHelper.GetContentWithPreamble(controlPresentation.Data); return(new MemoryStream(bytes)); } throw new ArgumentException("Could not find resource at " + virtualPath + " in the database."); }