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
- _ListenerRequestStream.cs
- WinCategoryAttribute.cs
- RoleGroupCollection.cs
- HttpFileCollection.cs
- Accessible.cs
- Int32Collection.cs
- RolePrincipal.cs
- ContactManager.cs
- ColumnClickEvent.cs
- xml.cs
- DbConnectionStringCommon.cs
- PathGradientBrush.cs
- BaseComponentEditor.cs
- IDReferencePropertyAttribute.cs
- PreviewPrintController.cs
- HybridObjectCache.cs
- CompilationLock.cs
- ObjectDataSourceEventArgs.cs
- SecurityTokenInclusionMode.cs
- FragmentQueryProcessor.cs
- QuestionEventArgs.cs
- IdentityReference.cs
- NonClientArea.cs
- SqlResolver.cs
- DeclarativeCatalogPart.cs
- OutgoingWebResponseContext.cs
- SymbolMethod.cs
- HttpClientChannel.cs
- DependencyObjectProvider.cs
- TemplateNameScope.cs
- SkewTransform.cs
- CryptoApi.cs
- PaginationProgressEventArgs.cs
- PrintController.cs
- ProvideValueServiceProvider.cs
- ProfileParameter.cs
- X509Utils.cs
- CustomWebEventKey.cs
- OrderByLifter.cs
- DataStreams.cs
- ReadOnlyCollection.cs
- PolyQuadraticBezierSegment.cs
- Span.cs
- SoapObjectWriter.cs
- SendKeys.cs
- BitmapFrame.cs
- TimerElapsedEvenArgs.cs
- OleDbPropertySetGuid.cs
- UIntPtr.cs
- AlphaSortedEnumConverter.cs
- ListDictionaryInternal.cs
- GlobalProxySelection.cs
- TcpTransportElement.cs
- QilBinary.cs
- DynamicValidatorEventArgs.cs
- IncrementalHitTester.cs
- SchemaManager.cs
- Terminate.cs
- Html32TextWriter.cs
- TypeConverterHelper.cs
- DataGridViewLinkCell.cs
- StrongNameMembershipCondition.cs
- Image.cs
- WriteLineDesigner.xaml.cs
- PublishLicense.cs
- InternalControlCollection.cs
- Compensation.cs
- DragDeltaEventArgs.cs
- XmlComplianceUtil.cs
- safesecurityhelperavalon.cs
- Bits.cs
- CodeObjectCreateExpression.cs
- PrintPreviewDialog.cs
- ScaleTransform3D.cs
- DragDropHelper.cs
- TempFiles.cs
- MimeXmlReflector.cs
- NamespaceCollection.cs
- QuerySettings.cs
- GridViewCancelEditEventArgs.cs
- ProviderConnectionPointCollection.cs
- CursorConverter.cs
- TextEditorTables.cs
- Listbox.cs
- AsymmetricSignatureFormatter.cs
- OracleException.cs
- InboundActivityHelper.cs
- ExpressionBuilderCollection.cs
- ObjectQuery.cs
- SecuritySessionServerSettings.cs
- InkCanvasSelection.cs
- PartialCachingAttribute.cs
- GridView.cs
- DesignerObject.cs
- DSASignatureDeformatter.cs
- FragmentQuery.cs
- DirectionalLight.cs
- Bitmap.cs
- RelationHandler.cs
- TypeReference.cs