public void CustomRoute(string uiPath, Assembly resourceAssembly, string resourceName) { CustomRoutes[uiPath] = new CustomResourceDescriptor { UiPath = uiPath, ResourceAssembly = resourceAssembly, ResourceName = resourceName, }; }
private Stream GetCustomResourceStream(CustomResourceDescriptor resourceDescriptor) { var resourceName = resourceDescriptor.ResourceName; var stream = resourceDescriptor.ResourceAssembly.GetManifestResourceStream(resourceName); if (stream == null) throw new FileNotFoundException("Ensure the Build Action is set to \"Embedded Resource\"", resourceName); return stream; }
private Stream GetCustomResourceStream(CustomResourceDescriptor resourceDescriptor) { var resourceName = resourceDescriptor.ResourceName; var stream = resourceDescriptor.ResourceAssembly.GetManifestResourceStream(resourceName); if (stream == null) { throw new FileNotFoundException("Ensure the Build Action is set to \"Embedded Resource\"", resourceName); } return(stream); }