146 references to SerializationHelper
PresentationCore (146)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (6)
62
interopTypeInfo =
SerializationHelper
.ConvertToVarEnum(attribute.Value.GetType(), true);
320
cbWrite +=
SerializationHelper
.Encode(strm, uTag);
358
cbWrite +=
SerializationHelper
.Encode(strm, (uint)(compresseddata.Length - 1));
422
cb =
SerializationHelper
.Decode(stream, out uiTag);
448
cb =
SerializationHelper
.Decode(stream, out size);
900
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);
887
cb =
SerializationHelper
.Decode(strm, out uiTag);
901
cb =
SerializationHelper
.Decode(strm, out cbButton);
911
cb =
SerializationHelper
.Decode(strm, out dw);
928
cb =
SerializationHelper
.Decode(strm, out dw);
990
cb =
SerializationHelper
.Decode(strm, out cbBlock);
1045
cb =
SerializationHelper
.Decode(strm, out dw);
1094
cb =
SerializationHelper
.Decode(strm, out dw);
1102
cb =
SerializationHelper
.Decode(strm, out size);
1166
cb =
SerializationHelper
.Decode(strm, out uiTag);
1261
cbRead =
SerializationHelper
.Decode(strm, out angle);
1332
cb =
SerializationHelper
.SignDecode(strm, out data);
1343
cb =
SerializationHelper
.SignDecode(strm, out data);
1354
cb =
SerializationHelper
.SignDecode(strm, out data);
1365
cb =
SerializationHelper
.SignDecode(strm, out data);
1501
cbEntry +=
SerializationHelper
.SignDecode(strm, out range);
1510
cbEntry +=
SerializationHelper
.SignDecode(strm, out range);
1521
cbEntry +=
SerializationHelper
.Decode(strm, out cb);
1725
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.InkSpaceRectangle);
1729
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1731
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1733
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1735
cumulativeEncodedSize +=
SerializationHelper
.SignEncode(localStream, i);
1753
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.PersistenceFormat);
1754
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)
SerializationHelper
.VarSize((uint)CurrentPersistenceFormat));
1755
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)CurrentPersistenceFormat);
1843
uint cbFinal =
SerializationHelper
.Encode(outputStream, (uint)0x00);
1845
cbFinal +=
SerializationHelper
.Encode(outputStream, cumulativeEncodedSize);
1890
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTableIndex);
1891
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].DrawingAttributesTableIndex);
1904
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTableIndex);
1905
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].StrokeDescriptorTableIndex);
1918
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.MetricTableIndex);
1919
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].MetricDescriptorTableIndex);
1932
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.TransformTableIndex);
1933
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, _strokeLookupTable[s].TransformTableIndex);
1959
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.Stroke);
1963
cumulativeEncodedSize +=
SerializationHelper
.Encode(localStream, cbStroke);
2028
uint cbWrote =
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeIds);
2044
cbWrote +=
SerializationHelper
.Encode(strm, (uint)(data.Length +
SerializationHelper
.VarSize((uint)strokes.Count)));
2047
cbWrote +=
SerializationHelper
.Encode(strm, (uint)strokes.Count);
2057
uint cbStrokeId = (uint)(strokes.Count * Native.SizeOfInt + 1 +
SerializationHelper
.VarSize((uint)strokes.Count)); // 1 is for the compression header
2059
cbWrote +=
SerializationHelper
.Encode(strm, cbStrokeId);
2060
cbWrote +=
SerializationHelper
.Encode(strm, (uint)strokes.Count);
2221
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorBlock);
2234
cbTotal +=
SerializationHelper
.VarSize((_strokeDescriptorTable[count]).Size) + (_strokeDescriptorTable[count]).Size;
2238
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTable);
2239
cbData +=
SerializationHelper
.Encode(strm, cbTotal);
2281
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricBlock);
2285
cbData +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricTable);
2286
cbData +=
SerializationHelper
.Encode(strm, cSize);
2310
cbData +=
SerializationHelper
.Encode(strm, strd.Size);
2314
cbData +=
SerializationHelper
.Encode(strm, (uint)strd.Template[count]);
2342
uint cbLocal =
SerializationHelper
.VarSize((uint)xform.Tag);
2348
cbLocal =
SerializationHelper
.VarSize((uint)(xform.Transform[0] + 0.5f));
2372
cbTotal +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.TransformTable);
2373
cbTotal +=
SerializationHelper
.Encode(strm, floatTotal);
2382
cbTotal +=
SerializationHelper
.Encode(strm, (uint)KnownTagCache.KnownTagIndex.ExtendedTransformTable);
2383
cbTotal +=
SerializationHelper
.Encode(strm, doubleTotal);
2405
cbData =
SerializationHelper
.Encode(strm, (uint)xform.Tag);
2412
cbData +=
SerializationHelper
.Encode(strm, angle);
2471
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesBlock);
2479
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, sizeOfHeaderInBytes);
2506
sizeOfHeaderInBytes +=
SerializationHelper
.VarSize(sizes[i]) + sizes[i];
2510
totalSizeOfSerializedBytes =
SerializationHelper
.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTable);
2512
totalSizeOfSerializedBytes +=
SerializationHelper
.Encode(stream, sizeOfHeaderInBytes);
2518
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);