Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SheetContainerBase overridable, extendable #27

Open
laicasaane opened this issue May 24, 2023 · 4 comments
Open

Make SheetContainerBase overridable, extendable #27

laicasaane opened this issue May 24, 2023 · 4 comments

Comments

@laicasaane
Copy link

laicasaane commented May 24, 2023

I'm working on a custom Editor tooling that depends on BakingSheet for intermediate steps. But I've found myself in need of overidding SheetContainerBase to support IProgress<float> in the async Bake and Store methods.

Could you make at least Bake and Store methods virtual to enable this use case?

One possible solution for better extending is extracting an ISheetContainer interface out of SheetContainerBase, and making SheetConvertingContext use this interface instead of the abstract class.

With either solutions, people can freely provide their own custom implementation of SheetContainerBase without the need of modifying your source code.

@cathei
Copy link
Owner

cathei commented Jun 2, 2023

Hello! Thank you for raising the issue. Can your issue solved by extending converters instead? Converters are meant to be extended/customized for this kind of usage. It would be more reusable and can handle detailed import/export process.

@laicasaane
Copy link
Author

I understand that Converters are to convert each cell value? If so, that might not be what I want. However, it's not a big deal. I've resorted to a simple popup without progress bar just to indicate that the process has yet to finish.

@cathei
Copy link
Owner

cathei commented Jun 2, 2023

Sheet converters (e.g. JsonSheetConverter, GoogleSheetConverter) will manage container level import/export, and could be extended to report what file/sheet is being converted. While value converters will do cell level converting. Let me know if you need more info or patch about it!

@laicasaane
Copy link
Author

Sheet converters (e.g. JsonSheetConverter, GoogleSheetConverter) will manage container level import/export, and could be extended to report what file/sheet is being converted.

Oh, could you draft up a sample to demonstrate that? Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants