Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > serialization > ISerializer
Interfejs serialization.ISerializer
Serializuje i deserializuje wtyczkę lub system.
Podpis:
export interface ISerializer
Właściwości
Właściwość |
Modyfikatory |
Typ |
Opis |
priorytet |
|
liczba |
Wartość priorytetu używana do określania kolejności stanu deserializacji. Priorytety bardziej pozytywne są usuwane, a następnie pojawiają się mniej pozytywne. Jeśli na przykład masz priorytety (0, -10, 10, 100), kolejność deserializacji będzie wynosić (100, 10, 0, -10). Jeśli dwa serializatory mają taki sam priorytet, są one deserializowane w dowolnej kolejności względem siebie. |
Metody
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-10 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-09-10 UTC."],[[["The `ISerializer` interface defines methods for saving, loading, and clearing the state of a plugin or system within Blockly."],["Serializers have a priority value that determines the order in which their state is deserialized, with higher priorities being deserialized first."],["The `clear` method resets the plugin or system's state, while `load` and `save` handle loading from and saving to a serialized state, respectively."]]],["The `ISerializer` interface handles the serialization and deserialization of a plugin or system's state. It defines three core methods: `save`, which saves the state; `load`, which loads the state; and `clear`, which resets the state. It also includes a `priority` property, a numerical value determining the order in which states are deserialized, with higher positive values being processed first. Equal priorities result in arbitrary order.\n"]]