/// <summary> /// Sets the context and initializes the action. /// </summary> /// <param name="args">The arguments containing the context.</param> /// <param name="streamDeck">The Stream Deck client.</param> /// <returns>The task of setting the context and initialization.</returns> internal virtual void Initialize(ActionEventArgs <AppearancePayload> args, IStreamDeckSender streamDeck) { this.ActionUUID = args.Action; this.Context = args.Context; this.Device = args.Device; this.StreamDeck = streamDeck; }
/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { base.Dispose(disposing); this.StreamDeck = null; }