146 references to SerializationHelper
PresentationCore (146)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (6)
74interopTypeInfo = SerializationHelper.ConvertToVarEnum(attribute.Value.GetType(), true); 332cbWrite += SerializationHelper.Encode(strm, uTag); 370cbWrite += SerializationHelper.Encode(strm, (uint)(compresseddata.Length - 1)); 434cb = SerializationHelper.Decode(stream, out uiTag); 460cb = SerializationHelper.Decode(stream, out size); 912VarEnum varEnum = SerializationHelper.ConvertToVarEnum(value.GetType(), true);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (26)
140uint cb = SerializationHelper.Decode (stream, out uiTag); 161cb = SerializationHelper.Decode (stream, out dw); 171cb = SerializationHelper.Decode(stream, out dw); 178cb = SerializationHelper.Decode (stream, out dw); 204cb = SerializationHelper.Decode (stream, out dw); 211cb = SerializationHelper.Decode (stream, out dw); 216cb = SerializationHelper.Decode (stream, out dw); 222cb = SerializationHelper.Decode (stream, out cbInSize); 269cb = SerializationHelper.Decode(stream, out dw); 275cb = SerializationHelper.Decode(stream, out dw); 490cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.DrawingFlags, true)); 491cbData += SerializationHelper.Encode(stream, (uint)(int)da.DrawingFlags); 496cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.CurveFittingError, true)); 497cbData += SerializationHelper.Encode(stream, (uint)(int)da.GetPropertyData(KnownIds.CurveFittingError)); 516cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.Color, true)); 517cbData += SerializationHelper.Encode(stream, colorVal); 529cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.Transparency, true)); 530cbData += SerializationHelper.Encode(stream, Convert.ToUInt32(transparency)); 547cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.RasterOperation, true)); 616cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.PenTip, true)); 617cbData += SerializationHelper.Encode(stream, (uint)PenTip.Rectangle); 622System.Runtime.InteropServices.VarEnum type = SerializationHelper.ConvertToVarEnum(PersistenceTypes.StylusTip, true); 670cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(guid, true)); 671cbData += SerializationHelper.Encode(stream, uIntegral); 681cbData += SerializationHelper.Encode(stream, (uint)MS.Internal.Ink.InkSerializedFormat.KnownTagCache.KnownTagIndex.Mantissa); 682cbData += SerializationHelper.Encode(stream, cb);
MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (4)
224return (uint)(ul + SerializationHelper.VarSize(ul) + SerializationHelper.VarSize((uint)KnownTagCache.KnownTagIndex.GuidTable)); 228uint cbWrote = SerializationHelper.Encode(stream, (uint)KnownTagCache.KnownTagIndex.GuidTable); 231cbWrote += SerializationHelper.Encode(stream, ul);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (82)
220cb = SerializationHelper.Decode(isfStream, out count); 354uint localBytesDecoded = SerializationHelper.Decode(inputStream, out uiTag); 359localBytesDecoded = SerializationHelper.Decode(inputStream, out remainingBytesInStream); 369localBytesDecoded = SerializationHelper.Decode(inputStream, out uiTag); 396localBytesDecoded = SerializationHelper.Decode(inputStream, out bytesDecodedInCurrentTag); 498localBytesDecoded = SerializationHelper.Decode(inputStream, out fmt); 518localBytesDecoded = SerializationHelper.SignDecode(inputStream, out sz); 523localBytesDecoded += SerializationHelper.SignDecode(inputStream, out sz); 708bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out transformTableIndex); 716bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out metricDescriptorTableIndex); 724bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out drawingAttributesTableIndex); 739bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out strokeDescriptorTableIndex); 776localBytesDecoded = SerializationHelper.Decode(inputStream, out bytesDecodedInCurrentTag); 840uint cb = SerializationHelper.Decode(strm, out cbDA); 900cb = SerializationHelper.Decode(strm, out uiTag); 914cb = SerializationHelper.Decode(strm, out cbButton); 924cb = SerializationHelper.Decode(strm, out dw); 941cb = SerializationHelper.Decode(strm, out dw); 1003cb = SerializationHelper.Decode(strm, out cbBlock); 1058cb = SerializationHelper.Decode(strm, out dw); 1107cb = SerializationHelper.Decode(strm, out dw); 1115cb = SerializationHelper.Decode(strm, out size); 1179cb = SerializationHelper.Decode(strm, out uiTag); 1274cbRead = SerializationHelper.Decode(strm, out angle); 1345cb = SerializationHelper.SignDecode(strm, out data); 1356cb = SerializationHelper.SignDecode(strm, out data); 1367cb = SerializationHelper.SignDecode(strm, out data); 1378cb = SerializationHelper.SignDecode(strm, out data); 1514cbEntry += SerializationHelper.SignDecode(strm, out range); 1523cbEntry += SerializationHelper.SignDecode(strm, out range); 1534cbEntry += SerializationHelper.Decode(strm, out cb); 1738cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.InkSpaceRectangle); 1742cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1744cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1746cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1748cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1766cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.PersistenceFormat); 1767cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)SerializationHelper.VarSize((uint)CurrentPersistenceFormat)); 1768cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)CurrentPersistenceFormat); 1856uint cbFinal = SerializationHelper.Encode(outputStream, (uint)0x00); 1858cbFinal += SerializationHelper.Encode(outputStream, cumulativeEncodedSize); 1903cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTableIndex); 1904cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].DrawingAttributesTableIndex); 1917cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTableIndex); 1918cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].StrokeDescriptorTableIndex); 1931cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.MetricTableIndex); 1932cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].MetricDescriptorTableIndex); 1945cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.TransformTableIndex); 1946cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].TransformTableIndex); 1972cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.Stroke); 1976cumulativeEncodedSize += SerializationHelper.Encode(localStream, cbStroke); 2041uint cbWrote = SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeIds); 2057cbWrote += SerializationHelper.Encode(strm, (uint)(data.Length + SerializationHelper.VarSize((uint)strokes.Count))); 2060cbWrote += SerializationHelper.Encode(strm, (uint)strokes.Count); 2070uint cbStrokeId = (uint)(strokes.Count * Native.SizeOfInt + 1 + SerializationHelper.VarSize((uint)strokes.Count)); // 1 is for the compression header 2072cbWrote += SerializationHelper.Encode(strm, cbStrokeId); 2073cbWrote += SerializationHelper.Encode(strm, (uint)strokes.Count); 2234cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorBlock); 2247cbTotal += SerializationHelper.VarSize((_strokeDescriptorTable[count]).Size) + (_strokeDescriptorTable[count]).Size; 2251cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTable); 2252cbData += SerializationHelper.Encode(strm, cbTotal); 2294cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricBlock); 2298cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricTable); 2299cbData += SerializationHelper.Encode(strm, cSize); 2323cbData += SerializationHelper.Encode(strm, strd.Size); 2327cbData += SerializationHelper.Encode(strm, (uint)strd.Template[count]); 2355uint cbLocal = SerializationHelper.VarSize((uint)xform.Tag); 2361cbLocal = SerializationHelper.VarSize((uint)(xform.Transform[0] + 0.5f)); 2385cbTotal += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.TransformTable); 2386cbTotal += SerializationHelper.Encode(strm, floatTotal); 2395cbTotal += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.ExtendedTransformTable); 2396cbTotal += SerializationHelper.Encode(strm, doubleTotal); 2418cbData = SerializationHelper.Encode(strm, (uint)xform.Tag); 2425cbData += SerializationHelper.Encode(strm, angle); 2484totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesBlock); 2492totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, sizeOfHeaderInBytes); 2519sizeOfHeaderInBytes += SerializationHelper.VarSize(sizes[i]) + sizes[i]; 2523totalSizeOfSerializedBytes = SerializationHelper.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTable); 2525totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, sizeOfHeaderInBytes); 2531totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, sizes[i]);
MS\Internal\Ink\InkSerializedFormat\MetricEntry.cs (17)
236_size += SerializationHelper.SignEncode(strm, originalInfo.Minimum); 238_size += SerializationHelper.SignEncode(strm, originalInfo.Maximum); 240_size += SerializationHelper.Encode(strm, (uint)originalInfo.Unit); 251_size += SerializationHelper.SignEncode(strm, originalInfo.Minimum); 253_size += SerializationHelper.SignEncode(strm, originalInfo.Maximum); 255_size += SerializationHelper.Encode(strm, (uint)originalInfo.Unit); 260_size += SerializationHelper.SignEncode(strm, originalInfo.Minimum); 262_size += SerializationHelper.SignEncode(strm, originalInfo.Maximum); 266_size += SerializationHelper.SignEncode(strm, originalInfo.Minimum); 433return (_size + SerializationHelper.VarSize(_size)); 453_size += newEntry.Size + SerializationHelper.VarSize(newEntry.Size) + SerializationHelper.VarSize((uint)newEntry.Tag); 488_size += entry.Size + SerializationHelper.VarSize(entry.Size) + SerializationHelper.VarSize((uint)_Entry.Tag); 509cbWrite = SerializationHelper.Encode(strm, _size); 515cbWrite += SerializationHelper.Encode(strm, (uint)entry.Tag); 516cbWrite += SerializationHelper.Encode(strm, entry.Size);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (11)
235locallyDecodedBytes = SerializationHelper.Decode(stream, out uiTag); 250locallyDecodedBytes = SerializationHelper.Decode(stream, out cbsize); 258locallyDecodedBytes = SerializationHelper.Decode(stream, out uiTag); 268locallyDecodedBytes = SerializationHelper.Decode(stream, out propindex); 276locallyDecodedBytes = SerializationHelper.Decode(stream, out propsize); 371localBytesRead = SerializationHelper.Decode(inputStream, out pointCount); 734strokeDescriptor.Size += SerializationHelper.VarSize((uint)tag); 771strokeDescriptor.Size += SerializationHelper.VarSize((uint)KnownTagCache.KnownTagIndex.StrokePropertyList); 779strokeDescriptor.Size += SerializationHelper.VarSize((uint)tag); 814uint localBytesWritten = (stream != null) ? SerializationHelper.Encode(stream, pointCount) : SerializationHelper.VarSize(pointCount);