Dolittle.SDK.Analyzers 23.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dolittle.SDK.Analyzers --version 23.5.0                
NuGet\Install-Package Dolittle.SDK.Analyzers -Version 23.5.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dolittle.SDK.Analyzers" Version="23.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dolittle.SDK.Analyzers --version 23.5.0                
#r "nuget: Dolittle.SDK.Analyzers, 23.5.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dolittle.SDK.Analyzers as a Cake Addin
#addin nuget:?package=Dolittle.SDK.Analyzers&version=23.5.0

// Install Dolittle.SDK.Analyzers as a Cake Tool
#tool nuget:?package=Dolittle.SDK.Analyzers&version=23.5.0                

Dolittle

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

This is our C# SDK, install it with:

dotnet add package Dolittle.SDK 

Get Started

Want to try another language?

Issues and Contributing

Issues and contributions are always welcome!

To learn how to contribute, please read our contributing guide.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dolittle.SDK.Analyzers:

Package Downloads
Dolittle.SDK

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
24.0.0 91 11/13/2024
23.5.2 111 11/13/2024
23.5.1 123 11/7/2024
23.5.0 356 10/23/2024
23.4.0 340 10/2/2024
23.3.0 493 7/31/2024
23.2.5 590 6/20/2024
23.2.4 216 6/13/2024
23.2.3 146 6/10/2024
23.2.2 189 6/2/2024
23.2.1 175 5/16/2024
23.2.0 1,345 3/14/2024
23.1.0 249 3/12/2024
23.0.0 220 3/8/2024
22.1.3 258 2/26/2024
22.1.2 1,183 10/24/2023
22.1.1 426 10/4/2023
22.1.0 352 9/18/2023
22.0.5 406 9/7/2023
22.0.4 499 8/28/2023
22.0.3 392 8/15/2023
22.0.2 459 8/8/2023
22.0.1 328 8/8/2023
22.0.0 505 6/22/2023
22.0.0-arkenstone.1 85 6/21/2023
22.0.0-arkenstone.0 80 6/12/2023
21.0.2 549 9/7/2023
21.0.1 620 6/8/2023
21.0.0 299 6/2/2023
21.0.0-feanor.2 75 5/31/2023
21.0.0-feanor.1 1,141 5/30/2023
21.0.0-feanor.0 75 5/30/2023
20.2.0 2,498 1/23/2023
20.2.0-shire.17 108 1/19/2023
20.2.0-shire.16 97 1/16/2023
20.2.0-shire.15 101 1/12/2023
20.2.0-shire.14 104 1/12/2023
20.2.0-shire.13 97 1/12/2023
20.2.0-shire.12 106 1/11/2023
20.2.0-shire.11 97 1/10/2023
20.2.0-shire.10 101 1/6/2023
20.2.0-shire.9 101 1/6/2023
20.2.0-shire.8 96 1/6/2023
20.2.0-shire.7 99 1/6/2023
20.2.0-shire.6 106 1/5/2023
20.2.0-shire.5 107 1/5/2023
20.2.0-shire.4 108 1/5/2023
20.2.0-shire.3 109 1/5/2023
20.2.0-shire.2 108 12/26/2022
20.2.0-shire.1 103 12/26/2022
20.2.0-shire.0 101 12/26/2022
20.1.0 450 12/25/2022
20.0.2 1,129 12/13/2022
20.0.1 456 12/12/2022
20.0.0 462 12/8/2022
19.1.0-elrond.7 91 12/7/2022
19.1.0-elrond.6 157 12/5/2022
19.1.0-elrond.5 91 12/5/2022
19.1.0-elrond.4 90 12/2/2022
19.1.0-elrond.3 93 12/2/2022
19.1.0-elrond.2 92 11/29/2022
19.1.0-elrond.1 93 11/28/2022
19.1.0-elrond.0 96 11/28/2022

Version 23.5.0:
This adds support for retroactively redacting personal data details from previously committed events. Redactions are scoped to a single EventSourceId, and a single event type, and allow you to overwrite or remove specific fields.

How to use it:
Events that should be redacted must be annotated to target the fields that should be updated or removed

[EventType("24e3a119-57d5-45d7-b7ef-a736fe6331e7")]
public class CustomerRegistered
{
   // The generic type will replace the value
   [RedactablePersonalData<string>("<redacted>")]
   public string Name { get; init; }
   
   //  The non-generic one will remove the field altogether
   [RedactablePersonalData]
   public Address? CustomerAddress { get; init; }
}They can then be redacted by committing a targeted redaction event on the same eventsourceId as the redacted events.

It can either be done with the built-in event

   public void GdprForget(string reason, string performedBy)
   {
       Apply(Redactions.Create<CustomerRegistered>(reason, performedBy));
   }or a user-created event

[EventType("de1e7e17-bad5-da7a-a4f7-e409ae1785dc")]
public class CustomerDetailsForgotten : PersonalDataRedactedForEvent<CustomerRegistered>
{
}Applied like this

   public void GdprForget(string reason, string performedBy)
   {
       Apply(Redactions.Create<CustomerRegistered, CustomerDetailsForgotten>(reason, performedBy));
   }What about read models and aggregate state ?:
Aggregates and read models should handle the redactions as normal events, and update state accordingly.

Ex

   public void On(CustomerDetailsForgotten evt)
   {
       _address = null;
       _name = null;
       _gdprRedacted = true;
   }Read models are not automagically updated, but should handle the redaction events themselves. Redaction events after being committed behave exactly as any other event, and can be processed by both eventhandlers and projections.

Since you would want the eventhandlers to only handle as few events as needed, user defined redaction events are the suggested way to perform redactions.

How does it work?:
The runtime will recognize the redaction event type with the redaction prefix "de1e7e17-bad5-da7a", and if the events have the correctly formatted structure, it will perform the redactions in the same transaction as the new events are being added.

It will replace overridden properties as specified in RedactedProperties, and remove properties that are defined with null values.

Redaction events themselves cannot be redacted, to ensure auditability of the system.

Added:
- Dolittle.SDK.Events.Redaction.PersonalDataRedactedForEvent - Built in event that can redact any event type
- Dolittle.SDK.Events.Redaction.PersonalDataRedactedForEvent<TEvent> - Class to extend in order to create redactions for specific events
- Dolittle.SDK.Events.Redaction - Use this to simplify creation of redaction events

Updated:
- The solution was updated to use centralized package management (https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management) to simplify dependency maintenance. Dependencies have also been upgraded.

Changelog:
For all release notes, see changelog (https://github.com/dolittle/DotNET.SDK/blob/master/CHANGELOG.md)