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
- ObjectDisposedException.cs
- PriorityRange.cs
- OleDbTransaction.cs
- Gdiplus.cs
- DataControlPagerLinkButton.cs
- serverconfig.cs
- ChannelSinkStacks.cs
- Freezable.cs
- TrustLevelCollection.cs
- RegularExpressionValidator.cs
- PassportIdentity.cs
- BitmapDownload.cs
- DiagnosticEventProvider.cs
- ZipFileInfoCollection.cs
- XmlTextWriter.cs
- MatrixConverter.cs
- NavigationPropertySingletonExpression.cs
- PermissionToken.cs
- Script.cs
- PartBasedPackageProperties.cs
- ByteStreamMessageEncoderFactory.cs
- PropertyCondition.cs
- XmlWellformedWriter.cs
- _NativeSSPI.cs
- NamedPipeConnectionPoolSettingsElement.cs
- PagePropertiesChangingEventArgs.cs
- ScriptResourceHandler.cs
- Image.cs
- DataServiceProcessingPipeline.cs
- XmlSchemaGroupRef.cs
- CodeGotoStatement.cs
- DirectoryObjectSecurity.cs
- PhysicalAddress.cs
- ResourceFallbackManager.cs
- TrackingProfileDeserializationException.cs
- ToolStripItemImageRenderEventArgs.cs
- PassportIdentity.cs
- MethodAccessException.cs
- Inflater.cs
- JavaScriptString.cs
- WizardPanelChangingEventArgs.cs
- EntityDataSourceColumn.cs
- SizeAnimationClockResource.cs
- MetadataElement.cs
- XmlCodeExporter.cs
- ExtractedStateEntry.cs
- xml.cs
- WindowsTitleBar.cs
- Bidi.cs
- DataServiceQueryContinuation.cs
- HtmlValidationSummaryAdapter.cs
- LiteralDesigner.cs
- RuntimeCompatibilityAttribute.cs
- TemplateInstanceAttribute.cs
- UriTemplatePathPartiallyEquivalentSet.cs
- RoutedPropertyChangedEventArgs.cs
- ToolStripContentPanelRenderEventArgs.cs
- MatcherBuilder.cs
- CompositeDesignerAccessibleObject.cs
- PageVisual.cs
- CodeDOMUtility.cs
- StorageConditionPropertyMapping.cs
- ResourceReader.cs
- PrimitiveDataContract.cs
- SqlUtils.cs
- ImageDrawing.cs
- InvalidComObjectException.cs
- XmlIgnoreAttribute.cs
- FastEncoder.cs
- IdleTimeoutMonitor.cs
- Message.cs
- ToolStripRenderer.cs
- MaskedTextProvider.cs
- ScriptControlManager.cs
- DynamicILGenerator.cs
- RectangleF.cs
- FontWeightConverter.cs
- SchemaMapping.cs
- IApplicationTrustManager.cs
- AuthenticationService.cs
- CodeDOMProvider.cs
- SqlDependencyListener.cs
- TableRow.cs
- CollectionViewProxy.cs
- WebPartDisplayModeCollection.cs
- WriterOutput.cs
- FrameworkElement.cs
- SpanIndex.cs
- FileLoadException.cs
- ControlTemplate.cs
- SpotLight.cs
- ValueTypeFixupInfo.cs
- IPipelineRuntime.cs
- GridEntryCollection.cs
- HttpModuleCollection.cs
- HttpHandlerActionCollection.cs
- CodeCommentStatement.cs
- VectorValueSerializer.cs
- TextProviderWrapper.cs
- DataObjectAttribute.cs