Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Serializer / StringCollectionMarkupSerializer.cs / 1305376 / StringCollectionMarkupSerializer.cs
namespace System.Workflow.ComponentModel.Serialization
{
using System;
using System.Reflection;
using System.Xml;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Workflow.ComponentModel.Compiler;
internal sealed class StringCollectionMarkupSerializer : WorkflowMarkupSerializer
{
protected internal override PropertyInfo[] GetProperties(WorkflowMarkupSerializationManager manager, object obj)
{
return new PropertyInfo[] { };
}
protected internal override bool CanSerializeToString(WorkflowMarkupSerializationManager serializationManager, object value)
{
if (serializationManager == null)
throw new ArgumentNullException("serializationManager");
if (value == null)
throw new ArgumentNullException("value");
return (value is ICollection);
}
protected internal override string SerializeToString(WorkflowMarkupSerializationManager serializationManager, object value)
{
if (serializationManager == null)
throw new ArgumentNullException("serializationManager");
if (value == null)
throw new ArgumentNullException("value");
return SynchronizationHandlesTypeConverter.Stringify(value as ICollection);
}
protected internal override object DeserializeFromString(WorkflowMarkupSerializationManager serializationManager, Type propertyType, string value)
{
if (serializationManager == null)
throw new ArgumentNullException("serializationManager");
if (propertyType == null)
throw new ArgumentNullException("propertyType");
if (value == null)
throw new ArgumentNullException("value");
// Work around For Bind based properties whose base type is an
// ICollection or its derivative, special case! (A synchronization
// handle cannot begin with a * because it won't be a language independent
// identifier :) )
if (IsValidCompactAttributeFormat(value))
return DeserializeFromCompactFormat(serializationManager, serializationManager.WorkflowMarkupStack[typeof(XmlReader)] as XmlReader, value);
else
return SynchronizationHandlesTypeConverter.UnStringify(value);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmiXetterAccessMap.cs
- AssemblyInfo.cs
- MetaTableHelper.cs
- HttpListenerPrefixCollection.cs
- WindowHideOrCloseTracker.cs
- XmlProcessingInstruction.cs
- arc.cs
- _SslSessionsCache.cs
- MessageQueuePermission.cs
- SqlEnums.cs
- TreeNodeStyleCollection.cs
- BitmapMetadataBlob.cs
- InnerItemCollectionView.cs
- Semaphore.cs
- PolicyVersionConverter.cs
- WinCategoryAttribute.cs
- Point.cs
- ProcessModelInfo.cs
- FullTextLine.cs
- SmiConnection.cs
- RoutingUtilities.cs
- DocumentXPathNavigator.cs
- WebPartTracker.cs
- PointAnimationUsingPath.cs
- PersonalizationEntry.cs
- WebColorConverter.cs
- ConfigurationElementCollection.cs
- XhtmlConformanceSection.cs
- SHA1.cs
- smtpconnection.cs
- ZipArchive.cs
- XmlHierarchicalDataSourceView.cs
- CachingHintValidation.cs
- PieceNameHelper.cs
- EntityDataSourceChangedEventArgs.cs
- HMAC.cs
- CharKeyFrameCollection.cs
- BuildResult.cs
- BamlReader.cs
- RootBuilder.cs
- DataRelation.cs
- WebPartZoneCollection.cs
- ListViewItem.cs
- dbenumerator.cs
- CalendarTable.cs
- XmlBinaryReader.cs
- IRCollection.cs
- TransportListener.cs
- DataQuery.cs
- ConfigurationManagerHelper.cs
- OptionalColumn.cs
- FileDialogCustomPlacesCollection.cs
- EditorBrowsableAttribute.cs
- PackagePartCollection.cs
- DbResourceAllocator.cs
- XmlSchemaCompilationSettings.cs
- ErrorProvider.cs
- QilPatternFactory.cs
- MatrixTransform3D.cs
- ItemCheckEvent.cs
- MessageHeaderT.cs
- AncestorChangedEventArgs.cs
- StreamAsIStream.cs
- CodeAttributeDeclarationCollection.cs
- PageThemeParser.cs
- EditorPartChrome.cs
- login.cs
- _NestedMultipleAsyncResult.cs
- MergeEnumerator.cs
- ResXBuildProvider.cs
- OuterGlowBitmapEffect.cs
- IdnElement.cs
- BulletDecorator.cs
- UDPClient.cs
- SoapRpcMethodAttribute.cs
- SafeBitVector32.cs
- DbConnectionPoolGroupProviderInfo.cs
- EnvelopedPkcs7.cs
- File.cs
- FontFaceLayoutInfo.cs
- IntSecurity.cs
- Thumb.cs
- UnmanagedMemoryStreamWrapper.cs
- DependencyPropertyDescriptor.cs
- ToolTip.cs
- SystemEvents.cs
- SmiSettersStream.cs
- PersistenceProviderDirectory.cs
- ArrangedElement.cs
- WmpBitmapEncoder.cs
- DataGridViewCellEventArgs.cs
- InlineUIContainer.cs
- PageThemeParser.cs
- FlowDocumentPageViewerAutomationPeer.cs
- _ListenerRequestStream.cs
- Convert.cs
- EditingMode.cs
- ReadOnlyPermissionSet.cs
- DataColumnChangeEvent.cs
- InfoCardSymmetricCrypto.cs