MCPcopy Create free account
hub / github.com/apache/fory / Add

Method Add

csharp/src/Fory/CollectionUtil.cs:41–55  ·  view source on GitHub ↗
(T element)

Source from the content-addressed store, hash-verified

39 internal int Count { get; private set; }
40
41 internal void Add(T element)
42 {
43 T?[] items = _items;
44 int count = Count;
45 if (items.Length <= count)
46 {
47 T?[] grown = new T[(count + 1) * 2];
48 Array.Copy(items, grown, items.Length);
49 items = grown;
50 _items = grown;
51 }
52
53 items[count] = element;
54 Count = count + 1;
55 }
56
57 internal void Set(int index, T element)
58 {

Callers 15

ReadCollectionDataMethod · 0.45
TryWritePayloadMethod · 0.45
WriteDataMethod · 0.45
AddValuesToMethod · 0.45
ApplyRegistrationMethod · 0.45
GetHashCodeMethod · 0.45
GetHashCodeMethod · 0.45
DecodeMethod · 0.45
AssignFieldIdsMethod · 0.45
GetHashCodeMethod · 0.45
ReserveRefIdMethod · 0.45
StoreTypeMetaRefMethod · 0.45

Calls

no outgoing calls