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
- DateTimeStorage.cs
- WebPartDisplayModeCancelEventArgs.cs
- GridItem.cs
- COM2Properties.cs
- BatchStream.cs
- SqlDataSourceSelectingEventArgs.cs
- messageonlyhwndwrapper.cs
- StringFunctions.cs
- TableHeaderCell.cs
- SynchronizedPool.cs
- QueryContinueDragEvent.cs
- RootBrowserWindowProxy.cs
- BulletedList.cs
- NavigationPropertyEmitter.cs
- ToolStripOverflowButton.cs
- DbCommandDefinition.cs
- Error.cs
- DataServiceQueryException.cs
- GroupItemAutomationPeer.cs
- CheckBox.cs
- DataGridViewSortCompareEventArgs.cs
- HtmlFormWrapper.cs
- ToolBarPanel.cs
- StructureChangedEventArgs.cs
- DetailsViewRowCollection.cs
- NumericUpDownAccelerationCollection.cs
- EnumUnknown.cs
- XmlNodeList.cs
- XmlUrlResolver.cs
- OverlappedContext.cs
- DrawingAttributesDefaultValueFactory.cs
- QilIterator.cs
- ScriptRegistrationManager.cs
- BinarySecretSecurityToken.cs
- SafeJobHandle.cs
- StorageComplexPropertyMapping.cs
- ListBox.cs
- ExpressionBuilderCollection.cs
- CompilerGeneratedAttribute.cs
- TimeManager.cs
- SqlClientPermission.cs
- XmlValueConverter.cs
- SqlInfoMessageEvent.cs
- QueryInterceptorAttribute.cs
- TraceListener.cs
- WindowsToolbarAsMenu.cs
- RestClientProxyHandler.cs
- TimelineGroup.cs
- HyperLink.cs
- AutomationAttributeInfo.cs
- CollectionBase.cs
- MailBnfHelper.cs
- Parameter.cs
- Oci.cs
- CellLabel.cs
- Hex.cs
- KeyTimeConverter.cs
- HtmlProps.cs
- ComplexBindingPropertiesAttribute.cs
- HttpResponseHeader.cs
- ToolStripGrip.cs
- GeneratedCodeAttribute.cs
- WebHttpSecurityElement.cs
- WebPartConnection.cs
- GridView.cs
- OleDbStruct.cs
- EventLog.cs
- _NestedMultipleAsyncResult.cs
- ThreadSafeList.cs
- APCustomTypeDescriptor.cs
- XD.cs
- PocoPropertyAccessorStrategy.cs
- _NetRes.cs
- SmiConnection.cs
- DbParameterCollectionHelper.cs
- CodeSubDirectoriesCollection.cs
- AnimatedTypeHelpers.cs
- HtmlInputRadioButton.cs
- AssociationSetEnd.cs
- LocatorBase.cs
- SpellerStatusTable.cs
- ScrollChangedEventArgs.cs
- QilXmlReader.cs
- NameSpaceExtractor.cs
- IntSumAggregationOperator.cs
- WebPartConnectionsConfigureVerb.cs
- IsolatedStorageFileStream.cs
- WindowsListViewSubItem.cs
- SecurityException.cs
- ThreadStartException.cs
- ReadContentAsBinaryHelper.cs
- WindowsScrollBar.cs
- TextParaLineResult.cs
- AxisAngleRotation3D.cs
- TableItemPattern.cs
- MimeMapping.cs
- XmlAtomicValue.cs
- SqlConnection.cs
- WebEventCodes.cs
- LayoutDump.cs