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
- XmlNodeChangedEventArgs.cs
- DataListItemEventArgs.cs
- GridViewDeletedEventArgs.cs
- LinkConverter.cs
- XmlNamespaceDeclarationsAttribute.cs
- SqlDataReader.cs
- CompilerTypeWithParams.cs
- ObjectReaderCompiler.cs
- XmlIncludeAttribute.cs
- listviewsubitemcollectioneditor.cs
- FatalException.cs
- InstanceCreationEditor.cs
- CmsInterop.cs
- EntityException.cs
- WmlValidatorAdapter.cs
- WCFBuildProvider.cs
- EventItfInfo.cs
- ProfileParameter.cs
- MouseActionValueSerializer.cs
- TypeSource.cs
- SrgsGrammarCompiler.cs
- Pen.cs
- TargetFrameworkAttribute.cs
- WebPartDeleteVerb.cs
- InstanceHandleReference.cs
- WhitespaceRuleLookup.cs
- XmlReflectionImporter.cs
- ExpandableObjectConverter.cs
- CodeEntryPointMethod.cs
- WSHttpSecurity.cs
- AbandonedMutexException.cs
- DynamicValidatorEventArgs.cs
- PathFigureCollectionConverter.cs
- ConfigurationSchemaErrors.cs
- ClassDataContract.cs
- AddInServer.cs
- CompilationUnit.cs
- InfoCardHelper.cs
- SqlDataSourceSelectingEventArgs.cs
- QueueProcessor.cs
- ResourceSetExpression.cs
- CollectionViewGroupRoot.cs
- SqlCommand.cs
- IItemProperties.cs
- SafeSecurityHandles.cs
- ColumnBinding.cs
- UnsafeCollabNativeMethods.cs
- DisposableCollectionWrapper.cs
- CatalogPart.cs
- HwndAppCommandInputProvider.cs
- RichTextBox.cs
- SortDescriptionCollection.cs
- GeometryHitTestResult.cs
- DataProtection.cs
- DesignerLoader.cs
- PersistenceTypeAttribute.cs
- Comparer.cs
- DesignRelation.cs
- FunctionCommandText.cs
- HtmlTextViewAdapter.cs
- DotExpr.cs
- SimpleHandlerFactory.cs
- FormsIdentity.cs
- SqlStream.cs
- InstanceBehavior.cs
- Lasso.cs
- TypedTableGenerator.cs
- BinarySerializer.cs
- TypeSystem.cs
- X509CertificateClaimSet.cs
- ListViewItem.cs
- QuaternionConverter.cs
- HeaderCollection.cs
- CollectionViewGroupInternal.cs
- XmlHelper.cs
- OracleParameterCollection.cs
- translator.cs
- NumberSubstitution.cs
- MessageBuilder.cs
- ObjectQuery.cs
- Menu.cs
- AssemblyAttributesGoHere.cs
- CompilerErrorCollection.cs
- StylusDevice.cs
- DataGridViewColumnCollection.cs
- ExpressionBindings.cs
- FullTrustAssembliesSection.cs
- Validator.cs
- TextTreeTextBlock.cs
- XmlChoiceIdentifierAttribute.cs
- XmlSchemaImporter.cs
- DoubleLink.cs
- SortDescriptionCollection.cs
- ButtonField.cs
- DesignerEventService.cs
- RangeContentEnumerator.cs
- PropertyRef.cs
- SystemInformation.cs
- SqlDataSourceFilteringEventArgs.cs
- HuffCodec.cs