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
- InstanceKeyCollisionException.cs
- WebBrowserNavigatingEventHandler.cs
- ValidatedControlConverter.cs
- HttpApplication.cs
- ValueExpressions.cs
- DataRowCollection.cs
- EncoderBestFitFallback.cs
- OutputCache.cs
- SHA512Managed.cs
- DataGridViewDataErrorEventArgs.cs
- SamlNameIdentifierClaimResource.cs
- ProfileService.cs
- RightsManagementInformation.cs
- GetPageCompletedEventArgs.cs
- ResourceReferenceExpressionConverter.cs
- MarkupCompiler.cs
- CoTaskMemSafeHandle.cs
- StylusPlugin.cs
- x509store.cs
- XmlComment.cs
- CopyAttributesAction.cs
- WebZoneDesigner.cs
- ToolBar.cs
- AutomationPatternInfo.cs
- __Error.cs
- ConfigXmlSignificantWhitespace.cs
- WindowInteractionStateTracker.cs
- MachineKeySection.cs
- WebZone.cs
- ResourceAssociationSet.cs
- Soap.cs
- DragStartedEventArgs.cs
- ProcessHostServerConfig.cs
- DefaultConfirmation.cs
- EntityKey.cs
- DoubleAnimationUsingKeyFrames.cs
- ImpersonateTokenRef.cs
- BaseValidatorDesigner.cs
- glyphs.cs
- EncodingNLS.cs
- InputBinding.cs
- OracleBFile.cs
- ClrPerspective.cs
- SqlNotificationRequest.cs
- RoleExceptions.cs
- _LazyAsyncResult.cs
- DecoderNLS.cs
- PrintDialog.cs
- PixelShader.cs
- ConfigXmlText.cs
- AdCreatedEventArgs.cs
- MethodImplAttribute.cs
- CleanUpVirtualizedItemEventArgs.cs
- ItemCollection.cs
- XPathDocumentNavigator.cs
- MonthCalendar.cs
- HttpWebRequest.cs
- MetricEntry.cs
- ImageFormat.cs
- InheritablePropertyChangeInfo.cs
- FacetValues.cs
- IntegerValidator.cs
- CheckBoxBaseAdapter.cs
- TypeName.cs
- DesignerCommandAdapter.cs
- ConfigurationLoaderException.cs
- XmlSchemaSimpleTypeRestriction.cs
- XPathSingletonIterator.cs
- KeyValueInternalCollection.cs
- PathGeometry.cs
- GridEntryCollection.cs
- ViewStateException.cs
- RegexWriter.cs
- SingleTagSectionHandler.cs
- Accessible.cs
- DbXmlEnabledProviderManifest.cs
- SkinBuilder.cs
- ListBox.cs
- CompilerErrorCollection.cs
- NotifyInputEventArgs.cs
- XamlReaderHelper.cs
- CompensatableSequenceActivity.cs
- RequestCachingSection.cs
- XsltArgumentList.cs
- DispatcherTimer.cs
- Path.cs
- ScriptIgnoreAttribute.cs
- SharedConnectionInfo.cs
- InitializationEventAttribute.cs
- RepeatBehaviorConverter.cs
- Camera.cs
- UdpContractFilterBehavior.cs
- XNameTypeConverter.cs
- CommonDialog.cs
- ResourceProviderFactory.cs
- SqlDataSourceStatusEventArgs.cs
- SqlInternalConnectionTds.cs
- X509UI.cs
- SafeMILHandle.cs
- XamlTypeMapperSchemaContext.cs