Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities.DurableInstancing / System / Activities / DurableInstancing / GZipObjectSerializer.cs / 1305376 / GZipObjectSerializer.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities.DurableInstancing { using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Xml.Linq; sealed class GZipObjectSerializer : DefaultObjectSerializer { protected override DictionaryDeserializePropertyBag(Stream stream) { using (GZipStream gzip = new GZipStream(stream, CompressionMode.Decompress, true)) { return base.DeserializePropertyBag(gzip); } } protected override object DeserializeValue(Stream stream) { using (GZipStream gzip = new GZipStream(stream, CompressionMode.Decompress, true)) { return base.DeserializeValue(gzip); } } protected override void SerializePropertyBag(Stream stream, Dictionary propertyBag) { using (GZipStream gzip = new GZipStream(stream, CompressionMode.Compress, true)) { base.SerializePropertyBag(gzip, propertyBag); } } protected override void SerializeValue(Stream stream, object value) { using (GZipStream gzip = new GZipStream(stream, CompressionMode.Compress, true)) { base.SerializeValue(gzip, value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Brush.cs
- LoadWorkflowByInstanceKeyCommand.cs
- TextChangedEventArgs.cs
- XmlEnumAttribute.cs
- ViewgenGatekeeper.cs
- FormViewUpdatedEventArgs.cs
- AsymmetricKeyExchangeFormatter.cs
- ServiceDocument.cs
- GridViewItemAutomationPeer.cs
- PropertyMetadata.cs
- SqlNodeAnnotations.cs
- DataTableReaderListener.cs
- Deflater.cs
- TypedServiceOperationListItem.cs
- IssuanceTokenProviderBase.cs
- HitTestWithGeometryDrawingContextWalker.cs
- DNS.cs
- CurrentChangedEventManager.cs
- CornerRadius.cs
- COM2Enum.cs
- EqualityComparer.cs
- Soap.cs
- DataGridViewCellCollection.cs
- SignedInfo.cs
- SocketInformation.cs
- CombinedGeometry.cs
- basenumberconverter.cs
- CollectionConverter.cs
- ImageFormatConverter.cs
- KeyConverter.cs
- XNodeValidator.cs
- CLSCompliantAttribute.cs
- MailWebEventProvider.cs
- entityreference_tresulttype.cs
- IdentityNotMappedException.cs
- FormatterConverter.cs
- ThreadAttributes.cs
- XmlDictionaryReaderQuotas.cs
- DataQuery.cs
- AssemblyResourceLoader.cs
- CodeDirectoryCompiler.cs
- EastAsianLunisolarCalendar.cs
- UDPClient.cs
- FormViewCommandEventArgs.cs
- SqlGatherProducedAliases.cs
- OpacityConverter.cs
- RawMouseInputReport.cs
- CryptoConfig.cs
- TextAction.cs
- TypeSemantics.cs
- VersionedStreamOwner.cs
- Vector3DIndependentAnimationStorage.cs
- DataGridTable.cs
- SiteMap.cs
- AdjustableArrowCap.cs
- UInt16Converter.cs
- OdbcDataReader.cs
- NamespaceList.cs
- TreeWalkHelper.cs
- PropertyGridView.cs
- SafeLocalAllocation.cs
- ImageClickEventArgs.cs
- BadImageFormatException.cs
- WorkflowInstanceExtensionManager.cs
- ZipIOExtraFieldPaddingElement.cs
- ClockController.cs
- DateTimeOffsetConverter.cs
- UnlockInstanceCommand.cs
- XmlSchemaExporter.cs
- BoundColumn.cs
- QuotedPrintableStream.cs
- MetaData.cs
- RemoteAsymmetricSignatureFormatter.cs
- LifetimeServices.cs
- validationstate.cs
- BitmapSizeOptions.cs
- CodeMethodReturnStatement.cs
- CacheHelper.cs
- ResXResourceSet.cs
- WebServicesSection.cs
- QuestionEventArgs.cs
- SerTrace.cs
- StringPropertyBuilder.cs
- Token.cs
- TransactionManager.cs
- MailDefinitionBodyFileNameEditor.cs
- ExpressionPrinter.cs
- TemplateBindingExpression.cs
- CapabilitiesAssignment.cs
- BinaryConverter.cs
- EntityDataSourceContextCreatedEventArgs.cs
- CompoundFileStorageReference.cs
- BindingListCollectionView.cs
- Image.cs
- ApplicationSecurityManager.cs
- PageThemeParser.cs
- CodeAttributeArgument.cs
- SimpleType.cs
- DbConnectionStringCommon.cs
- DesignerSerializationOptionsAttribute.cs