Closes the underlying resource file or stream, ensuring all the data has been written to the file.
If necessary, IResourceWriter.Close will call the IResourceWriter.Generate method to output the resources to the underlying file or stream before closing it.