-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
C#good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
- Move these lines to separate function
SetMarkers
Data.Doublets.Json/csharp/Platform.Data.Doublets.Json/DefaultJsonStorage.cs
Lines 280 to 296 in eac0583
var markerIndex = One; MeaningRoot = links.GetOrCreate(markerIndex, markerIndex); var unicodeSymbolMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); var unicodeSequenceMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); DocumentMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); ObjectMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); MemberMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); ValueMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); StringMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); EmptyStringMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); NumberMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); NegativeNumberMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); ArrayMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); EmptyArrayMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); TrueMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); FalseMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); NullMarker = links.GetOrCreate(MeaningRoot, Arithmetic.Increment(ref markerIndex)); - Move to separate function
SetMatchers
Data.Doublets.Json/csharp/Platform.Data.Doublets.Json/DefaultJsonStorage.cs
Lines 298 to 299 in eac0583
TargetMatcher<TLinkAddress> unicodeSymbolCriterionMatcher = new(Links, unicodeSymbolMarker); TargetMatcher<TLinkAddress> unicodeSequenceCriterionMatcher = new(Links, unicodeSequenceMarker); - Move to separate function
SetConverters
Data.Doublets.Json/csharp/Platform.Data.Doublets.Json/DefaultJsonStorage.cs
Lines 309 to 316 in eac0583
UnicodeSequenceToStringConverter = new CachingConverterDecorator<TLinkAddress, string>( new UnicodeSequenceToStringConverter<TLinkAddress>(Links, unicodeSequenceCriterionMatcher, sequenceWalker, unicodeSymbolToCharConverter)); BigIntegerToRawNumberSequenceConverter = new(links, AddressToNumberConverter, ListToSequenceConverter, NegativeNumberMarker); RawNumberSequenceToBigIntegerConverter = new(links, NumberToAddressConverter, NegativeNumberMarker); DecimalToRationalConverter = new(links, BigIntegerToRawNumberSequenceConverter); RationalToDecimalConverter = new(links, RawNumberSequenceToBigIntegerConverter);
Note: I have not highlighted all lines you should move. For example there are move converter assign expressions (but in constructor like these) that you must move
put the part of DefaultJsonStorage constructor where markers are assigned to separate functionSetMarkers. Reason: They are not placed close together
Metadata
Metadata
Assignees
Labels
C#good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed