146 references to SerializationHelper
PresentationCore (146)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (6)
62interopTypeInfo = SerializationHelper.ConvertToVarEnum(attribute.Value.GetType(), true); 320cbWrite += SerializationHelper.Encode(strm, uTag); 358cbWrite += SerializationHelper.Encode(strm, (uint)(compresseddata.Length - 1)); 422cb = SerializationHelper.Decode(stream, out uiTag); 448cb = SerializationHelper.Decode(stream, out size); 900VarEnum varEnum = SerializationHelper.ConvertToVarEnum(value.GetType(), true);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (26)
130uint cb = SerializationHelper.Decode (stream, out uiTag); 151cb = SerializationHelper.Decode (stream, out dw); 161cb = SerializationHelper.Decode(stream, out dw); 168cb = SerializationHelper.Decode (stream, out dw); 194cb = SerializationHelper.Decode (stream, out dw); 201cb = SerializationHelper.Decode (stream, out dw); 206cb = SerializationHelper.Decode (stream, out dw); 212cb = SerializationHelper.Decode (stream, out cbInSize); 259cb = SerializationHelper.Decode(stream, out dw); 265cb = SerializationHelper.Decode(stream, out dw); 480cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.DrawingFlags, true)); 481cbData += SerializationHelper.Encode(stream, (uint)(int)da.DrawingFlags); 486cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.CurveFittingError, true)); 487cbData += SerializationHelper.Encode(stream, (uint)(int)da.GetPropertyData(KnownIds.CurveFittingError)); 506cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.Color, true)); 507cbData += SerializationHelper.Encode(stream, colorVal); 519cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.Transparency, true)); 520cbData += SerializationHelper.Encode(stream, Convert.ToUInt32(transparency)); 537cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.RasterOperation, true)); 606cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(KnownIds.PenTip, true)); 607cbData += SerializationHelper.Encode(stream, (uint)PenTip.Rectangle); 612System.Runtime.InteropServices.VarEnum type = SerializationHelper.ConvertToVarEnum(PersistenceTypes.StylusTip, true); 660cbData += SerializationHelper.Encode(stream, (uint)guidList.FindTag(guid, true)); 661cbData += SerializationHelper.Encode(stream, uIntegral); 671cbData += SerializationHelper.Encode(stream, (uint)MS.Internal.Ink.InkSerializedFormat.KnownTagCache.KnownTagIndex.Mantissa); 672cbData += SerializationHelper.Encode(stream, cb);
MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (4)
220return (uint)(ul + SerializationHelper.VarSize(ul) + SerializationHelper.VarSize((uint)KnownTagCache.KnownTagIndex.GuidTable)); 224uint cbWrote = SerializationHelper.Encode(stream, (uint)KnownTagCache.KnownTagIndex.GuidTable); 227cbWrote += SerializationHelper.Encode(stream, ul);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (82)
207cb = SerializationHelper.Decode(isfStream, out count); 341uint localBytesDecoded = SerializationHelper.Decode(inputStream, out uiTag); 346localBytesDecoded = SerializationHelper.Decode(inputStream, out remainingBytesInStream); 356localBytesDecoded = SerializationHelper.Decode(inputStream, out uiTag); 383localBytesDecoded = SerializationHelper.Decode(inputStream, out bytesDecodedInCurrentTag); 485localBytesDecoded = SerializationHelper.Decode(inputStream, out fmt); 505localBytesDecoded = SerializationHelper.SignDecode(inputStream, out sz); 510localBytesDecoded += SerializationHelper.SignDecode(inputStream, out sz); 695bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out transformTableIndex); 703bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out metricDescriptorTableIndex); 711bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out drawingAttributesTableIndex); 726bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out strokeDescriptorTableIndex); 763localBytesDecoded = SerializationHelper.Decode(inputStream, out bytesDecodedInCurrentTag); 827uint cb = SerializationHelper.Decode(strm, out cbDA); 887cb = SerializationHelper.Decode(strm, out uiTag); 901cb = SerializationHelper.Decode(strm, out cbButton); 911cb = SerializationHelper.Decode(strm, out dw); 928cb = SerializationHelper.Decode(strm, out dw); 990cb = SerializationHelper.Decode(strm, out cbBlock); 1045cb = SerializationHelper.Decode(strm, out dw); 1094cb = SerializationHelper.Decode(strm, out dw); 1102cb = SerializationHelper.Decode(strm, out size); 1166cb = SerializationHelper.Decode(strm, out uiTag); 1261cbRead = SerializationHelper.Decode(strm, out angle); 1332cb = SerializationHelper.SignDecode(strm, out data); 1343cb = SerializationHelper.SignDecode(strm, out data); 1354cb = SerializationHelper.SignDecode(strm, out data); 1365cb = SerializationHelper.SignDecode(strm, out data); 1501cbEntry += SerializationHelper.SignDecode(strm, out range); 1510cbEntry += SerializationHelper.SignDecode(strm, out range); 1521cbEntry += SerializationHelper.Decode(strm, out cb); 1725cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.InkSpaceRectangle); 1729cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1731cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1733cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1735cumulativeEncodedSize += SerializationHelper.SignEncode(localStream, i); 1753cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.PersistenceFormat); 1754cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)SerializationHelper.VarSize((uint)CurrentPersistenceFormat)); 1755cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)CurrentPersistenceFormat); 1843uint cbFinal = SerializationHelper.Encode(outputStream, (uint)0x00); 1845cbFinal += SerializationHelper.Encode(outputStream, cumulativeEncodedSize); 1890cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTableIndex); 1891cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].DrawingAttributesTableIndex); 1904cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTableIndex); 1905cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].StrokeDescriptorTableIndex); 1918cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.MetricTableIndex); 1919cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].MetricDescriptorTableIndex); 1932cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.TransformTableIndex); 1933cumulativeEncodedSize += SerializationHelper.Encode(localStream, _strokeLookupTable[s].TransformTableIndex); 1959cumulativeEncodedSize += SerializationHelper.Encode(localStream, (uint)KnownTagCache.KnownTagIndex.Stroke); 1963cumulativeEncodedSize += SerializationHelper.Encode(localStream, cbStroke); 2028uint cbWrote = SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeIds); 2044cbWrote += SerializationHelper.Encode(strm, (uint)(data.Length + SerializationHelper.VarSize((uint)strokes.Count))); 2047cbWrote += SerializationHelper.Encode(strm, (uint)strokes.Count); 2057uint cbStrokeId = (uint)(strokes.Count * Native.SizeOfInt + 1 + SerializationHelper.VarSize((uint)strokes.Count)); // 1 is for the compression header 2059cbWrote += SerializationHelper.Encode(strm, cbStrokeId); 2060cbWrote += SerializationHelper.Encode(strm, (uint)strokes.Count); 2221cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorBlock); 2234cbTotal += SerializationHelper.VarSize((_strokeDescriptorTable[count]).Size) + (_strokeDescriptorTable[count]).Size; 2238cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.StrokeDescriptorTable); 2239cbData += SerializationHelper.Encode(strm, cbTotal); 2281cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricBlock); 2285cbData += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.MetricTable); 2286cbData += SerializationHelper.Encode(strm, cSize); 2310cbData += SerializationHelper.Encode(strm, strd.Size); 2314cbData += SerializationHelper.Encode(strm, (uint)strd.Template[count]); 2342uint cbLocal = SerializationHelper.VarSize((uint)xform.Tag); 2348cbLocal = SerializationHelper.VarSize((uint)(xform.Transform[0] + 0.5f)); 2372cbTotal += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.TransformTable); 2373cbTotal += SerializationHelper.Encode(strm, floatTotal); 2382cbTotal += SerializationHelper.Encode(strm, (uint)KnownTagCache.KnownTagIndex.ExtendedTransformTable); 2383cbTotal += SerializationHelper.Encode(strm, doubleTotal); 2405cbData = SerializationHelper.Encode(strm, (uint)xform.Tag); 2412cbData += SerializationHelper.Encode(strm, angle); 2471totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesBlock); 2479totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, sizeOfHeaderInBytes); 2506sizeOfHeaderInBytes += SerializationHelper.VarSize(sizes[i]) + sizes[i]; 2510totalSizeOfSerializedBytes = SerializationHelper.Encode(stream, (uint)KnownTagCache.KnownTagIndex.DrawingAttributesTable); 2512totalSizeOfSerializedBytes += SerializationHelper.Encode(stream, sizeOfHeaderInBytes); 2518totalSizeOfSerializedBytes += 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); 431return (_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); 507cbWrite = SerializationHelper.Encode(strm, _size); 513cbWrite += SerializationHelper.Encode(strm, (uint)entry.Tag); 514cbWrite += SerializationHelper.Encode(strm, entry.Size);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (11)
228locallyDecodedBytes = SerializationHelper.Decode(stream, out uiTag); 243locallyDecodedBytes = SerializationHelper.Decode(stream, out cbsize); 251locallyDecodedBytes = SerializationHelper.Decode(stream, out uiTag); 261locallyDecodedBytes = SerializationHelper.Decode(stream, out propindex); 269locallyDecodedBytes = SerializationHelper.Decode(stream, out propsize); 364localBytesRead = SerializationHelper.Decode(inputStream, out pointCount); 727strokeDescriptor.Size += SerializationHelper.VarSize((uint)tag); 764strokeDescriptor.Size += SerializationHelper.VarSize((uint)KnownTagCache.KnownTagIndex.StrokePropertyList); 772strokeDescriptor.Size += SerializationHelper.VarSize((uint)tag); 807uint localBytesWritten = (stream != null) ? SerializationHelper.Encode(stream, pointCount) : SerializationHelper.VarSize(pointCount);