Code:
/ 4.0 / 4.0 / 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. 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
- HierarchicalDataBoundControl.cs
- DataSourceXmlTextReader.cs
- HandledMouseEvent.cs
- MenuItemCollection.cs
- BufferedGraphicsContext.cs
- HtmlImage.cs
- BoundPropertyEntry.cs
- HttpHandlerAction.cs
- CompilerGeneratedAttribute.cs
- ToolStripSplitButton.cs
- DataGridState.cs
- RsaKeyIdentifierClause.cs
- RSAOAEPKeyExchangeFormatter.cs
- GlobalProxySelection.cs
- CommentEmitter.cs
- FocusManager.cs
- DataGridViewSelectedCellCollection.cs
- ReadOnlyActivityGlyph.cs
- DeferredTextReference.cs
- WebPartMenuStyle.cs
- TextEditorMouse.cs
- PropertyMetadata.cs
- HttpStreamMessageEncoderFactory.cs
- TextWriterEngine.cs
- CodeConditionStatement.cs
- ElementHostPropertyMap.cs
- SchemaManager.cs
- SystemColors.cs
- PathFigureCollectionConverter.cs
- PseudoWebRequest.cs
- ThreadStartException.cs
- GenericTextProperties.cs
- SessionPageStatePersister.cs
- HttpCapabilitiesBase.cs
- ChtmlTextBoxAdapter.cs
- SQLByteStorage.cs
- DataGridLinkButton.cs
- Int16Converter.cs
- SequenceFullException.cs
- XmlTypeMapping.cs
- LoginCancelEventArgs.cs
- Expression.cs
- XPathPatternBuilder.cs
- PropertyKey.cs
- MessageSmuggler.cs
- CounterSetInstanceCounterDataSet.cs
- ContainerAction.cs
- BatchServiceHost.cs
- SmtpException.cs
- SQLResource.cs
- ExecutedRoutedEventArgs.cs
- SqlInternalConnection.cs
- EntityDataSourceWrapper.cs
- EventLog.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- ProcessModule.cs
- UndoEngine.cs
- XamlSerializer.cs
- SR.cs
- QueryReaderSettings.cs
- IntSecurity.cs
- LongAverageAggregationOperator.cs
- DataStreams.cs
- TypeCodeDomSerializer.cs
- SponsorHelper.cs
- SqlBulkCopyColumnMappingCollection.cs
- Symbol.cs
- LicFileLicenseProvider.cs
- ConsumerConnectionPoint.cs
- HtmlMeta.cs
- DataColumnCollection.cs
- BuildTopDownAttribute.cs
- PolicyChain.cs
- CdpEqualityComparer.cs
- Point3DValueSerializer.cs
- TypedTableGenerator.cs
- HighlightComponent.cs
- PanelDesigner.cs
- CryptoStream.cs
- XmlSchemaAnnotated.cs
- PageRequestManager.cs
- BaseTemplateParser.cs
- _UriSyntax.cs
- TypeSystem.cs
- VideoDrawing.cs
- BitmapInitialize.cs
- EntityDataSourceSelectingEventArgs.cs
- ResourceDictionaryCollection.cs
- LongValidator.cs
- HttpProfileBase.cs
- Base64Encoder.cs
- AjaxFrameworkAssemblyAttribute.cs
- NonDualMessageSecurityOverHttp.cs
- GcSettings.cs
- SecurityContext.cs
- RenderDataDrawingContext.cs
- ValidationHelpers.cs
- SoapFormatter.cs
- SmiConnection.cs
- ImageCollectionEditor.cs