Archipelago.MultiClient.Net.Analyzers
1.0.0
See the version list below for details.
dotnet add package Archipelago.MultiClient.Net.Analyzers --version 1.0.0
NuGet\Install-Package Archipelago.MultiClient.Net.Analyzers -Version 1.0.0
<PackageReference Include="Archipelago.MultiClient.Net.Analyzers" Version="1.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Archipelago.MultiClient.Net.Analyzers --version 1.0.0
#r "nuget: Archipelago.MultiClient.Net.Analyzers, 1.0.0"
// Install Archipelago.MultiClient.Net.Analyzers as a Cake Addin #addin nuget:?package=Archipelago.MultiClient.Net.Analyzers&version=1.0.0 // Install Archipelago.MultiClient.Net.Analyzers as a Cake Tool #tool nuget:?package=Archipelago.MultiClient.Net.Analyzers&version=1.0.0
Archipelago.MultiClient.Net.Analyzers
Source analyzers, fixes, and code generation for the Archipelago.MultiClient.Net library.
Analyzers and Diagnostics
MULTICLIENT001 - DataStorageElement assigned outside of DataStorageHelper
This warning is intended to prevent bugs which may be caused by misuse of DataStorageHelper
. The Archipelago
network protocol allows batching several data storage operations in an atomic fashion. In order to support this,
DataStorageHelper
only sends a packet to the server when a DataStorageElement
, containing the batched operations,
is re-assigned back to the DataStorageHelper
. This means that storing a DataStorageElement
into a variable can
cause undesirable side effects on the element, as well as prevent it from being sent to the server at all. Instead,
it is recommended to use a compound assignment operator to apply edits directly to the DataStorageHelper
.
Incorrect Code:
DataStorageElement elem = session.DataStorage[Scope.Slot, "MyData"];
elem.Initialize(0);
elem += 2;
Fixed Code:
session.DataStorage[Scope.Slot, "MyData"].Initialize(0);
session.DataStorage[Scope.Slot, "MyData"] += 2;
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.