146 references to SerializationHelper
PresentationCore (146)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (6)
62
interopTypeInfo =
SerializationHelper
.ConvertToVarEnum(attribute.Value.GetType(), true);
316
cbWrite +=
SerializationHelper
.Encode(strm, uTag);
354
cbWrite +=
SerializationHelper
.Encode(strm, (uint)(compresseddata.Length - 1));
418
cb =
SerializationHelper
.Decode(stream, out uiTag);
444
cb =
SerializationHelper
.Decode(stream, out size);
896
VarEnum varEnum =
SerializationHelper
.ConvertToVarEnum(value.GetType(), true);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (26)
130
uint cb =
SerializationHelper
.Decode (stream, out uiTag);
151
cb =
SerializationHelper
.Decode (stream, out dw);
161
cb =
SerializationHelper
.Decode(stream, out dw);
168
cb =
SerializationHelper
.Decode (stream, out dw);
194
cb =
SerializationHelper
.Decode (stream, out dw);
201
cb =
SerializationHelper
.Decode (stream, out dw);
206
cb =
SerializationHelper
.Decode (stream, out dw);
212
cb =
SerializationHelper
.Decode (stream, out cbInSize);
259
cb =
SerializationHelper
.Decode(stream, out dw);
265
cb =
SerializationHelper
.Decode(stream, out dw);
480
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(KnownIds.DrawingFlags, true));
481
cbData +=
SerializationHelper
.Encode(stream, (uint)(int)da.DrawingFlags);
486
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(KnownIds.CurveFittingError, true));
487
cbData +=
SerializationHelper
.Encode(stream, (uint)(int)da.GetPropertyData(KnownIds.CurveFittingError));
506
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(KnownIds.Color, true));
507
cbData +=
SerializationHelper
.Encode(stream, colorVal);
519
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(KnownIds.Transparency, true));
520
cbData +=
SerializationHelper
.Encode(stream, Convert.ToUInt32(transparency));
537
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(KnownIds.RasterOperation, true));
606
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(KnownIds.PenTip, true));
607
cbData +=
SerializationHelper
.Encode(stream, (uint)PenTip.Rectangle);
612
System.Runtime.InteropServices.VarEnum type =
SerializationHelper
.ConvertToVarEnum(PersistenceTypes.StylusTip, true);
660
cbData +=
SerializationHelper
.Encode(stream, (uint)guidList.FindTag(guid, true));
661
cbData +=
SerializationHelper
.Encode(stream, uIntegral);
671
cbData +=
SerializationHelper
.Encode(stream, (uint)MS.Internal.Ink.InkSerializedFormat.KnownTagCache.KnownTagIndex.Mantissa);
672
cbData +=
SerializationHelper
.Encode(stream, cb);
MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (4)
220
return (uint)(ul +
SerializationHelper
.VarSize(ul) +
SerializationHelper
.VarSize((uint)KnownTagCache.KnownTagIndex.GuidTable));
224
uint cbWrote =
SerializationHelper
.Encode(stream, (uint)KnownTagCache.KnownTagIndex.GuidTable);
227
cbWrote +=
SerializationHelper
.Encode(stream, ul);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (82)
207
cb =
SerializationHelper
.Decode(isfStream, out count);
341
uint localBytesDecoded =
SerializationHelper
.Decode(inputStream, out uiTag);
346
localBytesDecoded =
SerializationHelper
.Decode(inputStream, out remainingBytesInStream);
356
localBytesDecoded =
SerializationHelper
.Decode(inputStream, out uiTag);
383
localBytesDecoded =
SerializationHelper
.Decode(inputStream, out bytesDecodedInCurrentTag);
485
localBytesDecoded =
SerializationHelper
.Decode(inputStream, out fmt);
505
localBytesDecoded =
SerializationHelper
.SignDecode(inputStream, out sz);
510
localBytesDecoded +=
SerializationHelper
.SignDecode(inputStream, out sz);
695
bytesDecodedInCurrentTag =
SerializationHelper
.Decode(inputStream, out transformTableIndex);
703
bytesDecodedInCurrentTag =
SerializationHelper
.Decode(inputStream, out metricDescriptorTableIndex);
711
bytesDecodedInCurrentTag =
SerializationHelper
.Decode(inputStream, out drawingAttributesTableIndex);
726
bytesDecodedInCurrentTag =
SerializationHelper
.Decode(inputStream, out strokeDescriptorTableIndex);
763
localBytesDecoded =
SerializationHelper
.Decode(inputStream, out bytesDecodedInCurrentTag);
827
uint cb =
SerializationHelper
.Decode(strm, out cbDA);
889
cb =
SerializationHelper
.Decode(strm, out uiTag);
903
cb =
SerializationHelper
.Decode(strm, out cbButton);
913
cb =
SerializationHelper
.Decode(strm, out dw);
930
cb =
SerializationHelper
.Decode(strm, out dw);
992
cb =
SerializationHelper
.Decode(strm, out cbBlock);
1047
cb =
SerializationHelper
.Decode(strm, out dw);
1096
cb =
SerializationHelper
.Decode(strm, out dw);
1104
cb =
SerializationHelper
.Decode(strm, out size);
1169
cb =
SerializationHelper
.Decode(strm, out uiTag);
1261
cbRead =
SerializationHelper
.Decode(strm, out angle);
1330
cb =
SerializationHelper
.SignDecode(strm, out data);
1341
cb =
SerializationHelper
.SignDecode(strm, out data);
1352
cb =
SerializationHelper
.SignDecode(strm, out data);
1363
cb =
SerializationHelper
.SignDecode(strm, out data);
1499
cbEntry +=
SerializationHelper
.SignDecode(strm, out range);
1508
cbEntry +=
SerializationHelper
.SignDecode(strm, out range);
1519
cbEntry +=
SerializationHelper
.Decode(strm, out cb);
1723
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.InkSpaceRectangle);
1727
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1729
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1731
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1733
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1751
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.PersistenceFormat);
1752
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)
SerializationHelper
.VarSize((uint)CurrentPersistenceFormat));
1753
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)CurrentPersistenceFormat);
1841
uint cbFinal =
SerializationHelper
.Encode(outputStream, (uint)0x00);
1843
cbFinal +=
SerializationHelper
.Encode(outputStream, cumulativeEncodedSize);
1888
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTableIndex);
1889
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].DrawingAttributesTableIndex);
1902
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTableIndex);
1903
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].StrokeDescriptorTableIndex);
1916
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.MetricTableIndex);
1917
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].MetricDescriptorTableIndex);
1930
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.TransformTableIndex);
1931
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].TransformTableIndex);
1957
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.Stroke);
1961
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, cbStroke);
2026
uint cbWrote =
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeIds);
2042
cbWrote +=
SerializationHelper
.Encode(strm, (uint)(data.Length +
SerializationHelper
.VarSize((uint)strokes.Count)));
2045
cbWrote +=
SerializationHelper
.Encode(strm, (uint)strokes.Count);
2055
uint cbStrokeId = (uint)(strokes.Count * Native.SizeOfInt + 1 +
SerializationHelper
.VarSize((uint)strokes.Count)); // 1 is for the compression header
2057
cbWrote +=
SerializationHelper
.Encode(strm, cbStrokeId);
2058
cbWrote +=
SerializationHelper
.Encode(strm, (uint)strokes.Count);
2211
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorBlock);
2224
cbTotal +=
SerializationHelper
.VarSize((_strokeDescriptorTable[count]).Size) + (_strokeDescriptorTable[count]).Size;
2228
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTable);
2229
cbData +=
SerializationHelper
.Encode(strm, cbTotal);
2271
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricBlock);
2275
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricTable);
2276
cbData +=
SerializationHelper
.Encode(strm, cSize);
2300
cbData +=
SerializationHelper
.Encode(strm, strd.Size);
2304
cbData +=
SerializationHelper
.Encode(strm, (uint)strd.Template[count]);
2332
uint cbLocal =
SerializationHelper
.VarSize((uint)xform.Tag);
2338
cbLocal =
SerializationHelper
.VarSize((uint)(xform.Transform[0] + 0.5f));
2362
cbTotal +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.TransformTable);
2363
cbTotal +=
SerializationHelper
.Encode(strm, floatTotal);
2372
cbTotal +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.ExtendedTransformTable);
2373
cbTotal +=
SerializationHelper
.Encode(strm, doubleTotal);
2395
cbData =
SerializationHelper
.Encode(strm, (uint)xform.Tag);
2402
cbData +=
SerializationHelper
.Encode(strm, angle);
2454
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesBlock);
2462
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, sizeOfHeaderInBytes);
2489
sizeOfHeaderInBytes +=
SerializationHelper
.VarSize(sizes[i]) + sizes[i];
2493
totalSizeOfSerializedBytes =
SerializationHelper
.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTable);
2495
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, sizeOfHeaderInBytes);
2501
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, sizes[i]);
MS\Internal\Ink\InkSerializedFormat\MetricEntry.cs (17)
234
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Minimum);
236
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Maximum);
238
_size +=
SerializationHelper
.Encode(strm, (uint)originalInfo.Unit);
249
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Minimum);
251
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Maximum);
253
_size +=
SerializationHelper
.Encode(strm, (uint)originalInfo.Unit);
258
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Minimum);
260
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Maximum);
264
_size +=
SerializationHelper
.SignEncode(strm, originalInfo.Minimum);
431
return (_size +
SerializationHelper
.VarSize(_size));
451
_size += newEntry.Size +
SerializationHelper
.VarSize(newEntry.Size) +
SerializationHelper
.VarSize((uint)newEntry.Tag);
486
_size += entry.Size +
SerializationHelper
.VarSize(entry.Size) +
SerializationHelper
.VarSize((uint)_Entry.Tag);
507
cbWrite =
SerializationHelper
.Encode(strm, _size);
513
cbWrite +=
SerializationHelper
.Encode(strm, (uint)entry.Tag);
514
cbWrite +=
SerializationHelper
.Encode(strm, entry.Size);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (11)
228
locallyDecodedBytes =
SerializationHelper
.Decode(stream, out uiTag);
243
locallyDecodedBytes =
SerializationHelper
.Decode(stream, out cbsize);
251
locallyDecodedBytes =
SerializationHelper
.Decode(stream, out uiTag);
261
locallyDecodedBytes =
SerializationHelper
.Decode(stream, out propindex);
269
locallyDecodedBytes =
SerializationHelper
.Decode(stream, out propsize);
364
localBytesRead =
SerializationHelper
.Decode(inputStream, out pointCount);
727
strokeDescriptor.Size +=
SerializationHelper
.VarSize((uint)tag);
764
strokeDescriptor.Size +=
SerializationHelper
.VarSize((uint)KnownTagCache.KnownTagIndex.StrokePropertyList);
772
strokeDescriptor.Size +=
SerializationHelper
.VarSize((uint)tag);
807
uint localBytesWritten = (stream != null) ?
SerializationHelper
.Encode(stream, pointCount) :
SerializationHelper
.VarSize(pointCount);