Skip to content

RepetierSharp 0.2.0

Choose a tag to compare

@Z0rdak Z0rdak released this 25 Mar 16:52
· 41 commits to main since this release

[0.2.0] - 2025-03-25

Added

  • Add proper logging support for the RepetierConnection instead of using Console.WriteLine. You can supply your own logger when using the RepetierConnectionBuilder or use a default console logger.
  • Add a whole array of new events which are triggered for the repetier server events and other client related events.
  • Add more dedicated events and event handlers for print job related events
  • Add a filter for events and commands (and their responses) for the RepetierConnectionBuilder. This filters events so they don't get fired in the first place.
  • Add separate .snupkg for debugging symbols

Changed

  • Reimplemented the event system to be async. It is still possible to register event handlers for the events of a
    repetier connection.
    Credit to the authors of MQTTnet for the inspiration on how to implement this.
  • All Http requests are now async. This mainly is relevant for the methods which upload gcode files or upload and start
    gcode.
  • ActivatePrinter and DeactivePrinter no longer select the active printer to send commands to. Instead, they work like the repetier server api describes them. Set the SelectedPrinter for this: repetierCon.SelectedPrinter = "AwesomePrinterSlug". Alternatively you can select the printer when setting up the connection with the RepetierConnectionBuilder.
  • Streamlined the RepetierConnectionBuilder. It's possible to supply a RestClient and/or
    a WebsocketClient instance directly.
    This gives more flexibility to the end user and makes it easier to set up a correct RepetierConnection. Please refer
    to the readme for code examples.
  • Split commands into PrinterCommand and ServerCommand. PrinterCommands require a printer slug to address the proper printer.
  • Extract HttpRequests (upload, getServerInfo, etc. ) into its own abstraction: RemoteRepetierServer
  • Extract PrinterCommands (websocket commands) into its own abstraction: RemoteRepetierPrinter
  • Reworked whole serialization and event and response handling.
  • Updated System.Text.Json to 9.0.3
  • Updated Microsoft.Extensions.* to 9.0.3
  • Updated RestSharp to 112.1.0
  • Rename the RepetierConnectionBuilder method WithCyclicCommand to ScheduleCommand
  • Rename GetRepetierServerInfoAsync to GetRepetierServerInfo
  • PingInterval is now called KeepAlivePing, is a TimeSpan and moved in RepetierSession
  • Move some properties from the RepetierSession to type RepetierAuthentication. This includes only the info which needs to be supplied whenever a loginRequired event is fired. When supplied with the RepetierConnectionBuilder this is automatically used for authentication.
  • Implement custom JsonSerializer for repetier server events to streamline to process of deserializing the events. It is possible to add custom event entries to a dictionary in the RepetierEventConverter alongside with a type which is used for deserialization.
  • A lot of internal refactoring

Removed

  • Drop support for .net6.0
  • SelectedPrinter property from RepetierConnection
  • Various overloads and confusing methods for building a RepetierConnection instance when using the builder.
  • Helper methods for the RepetierConnectionBuilder which could be used to schedule querying the printer state and printer list. That's now all covered by the ScheduleCommand method.

Fixed

  • Too many bugs to track