streamiz icon indicating copy to clipboard operation
streamiz copied to clipboard

Some methods marked as internal prevent custom implementations

Open xdave opened this issue 7 months ago • 1 comments

Hi there, I was messing around and tried implementing a custom state store that uses SQLite (works well, actually!), and I came across a couple of issues (that I've found workarounds for, for now):

  1. The state store's Init() method needs to call ProcessorContext.Register(), except that this method is marked as internal, so it is inaccessible. My workaround involves using reflection to invoke the method with a delegate.
  2. In some cases, it's required to construct an instance of Bytes, however, the public constructor is marked as Obsolete, and the only other suitable method, Wrap, has internal visibility. My current workaround involves subclassing Bytes and overriding the Get property.

My ask would be to make the ProcessorContext.Register() method public + virtual and also public for Bytes.Wrap().

Thanks!

xdave avatar May 26 '25 23:05 xdave

@xdave

Makes sense ! Thanks for your feedback

LGouellec avatar May 27 '25 18:05 LGouellec