Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / XamlPointCollectionSerializer.cs / 1305600 / XamlPointCollectionSerializer.cs
//---------------------------------------------------------------------------- // // File: XamlPointCollectionSerializer.cs // // Description: // XamlSerializer used to persist collections of 3D points in Baml // // Copyright (C) 2005 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Globalization; using System.IO; using System.Xml; using MS.Utility; using MS.Internal; #if PBTCOMPILER using System.Reflection; namespace MS.Internal.Markup #else using System.Windows; using System.Windows.Media; using System.Windows.Media.Media3D; using MS.Internal.Media; namespace System.Windows.Markup #endif { ////// XamlPointCollectionSerializer is used to persist collections of 3D vectors in Baml /// internal class XamlPointCollectionSerializer : XamlSerializer { #region Construction ////// Constructor for XamlPointCollectionSerializer /// ////// This constructor will be used under /// the following two scenarios /// 1. Convert a string to a custom binary representation stored in BAML /// 2. Convert a custom binary representation back into a Brush /// public XamlPointCollectionSerializer() { } #endregion Construction #region Conversions ////// Convert a string into a compact binary representation and write it out /// to the passed BinaryWriter. /// public override bool ConvertStringToCustomBinary ( BinaryWriter writer, // Writer into the baml stream string stringValue) // String to convert { return XamlSerializationHelper.SerializePoint( writer, stringValue ) ; } #if !PBTCOMPILER ////// Convert a compact binary representation of a collection /// into a Point3DCollection into and instance /// ////// This is called ONLY from the Parser and is not a general public method. /// public override object ConvertCustomBinaryToObject( BinaryReader reader) { return PointCollection.DeserializeFrom( reader ) ; } ////// Convert a compact binary representation of a collection /// into a Point3DCollection into and instance /// ////// This is called ONLY from the Parser and is not a general public method. /// public static object StaticConvertCustomBinaryToObject( BinaryReader reader) { return PointCollection.DeserializeFrom( reader ) ; } #endif #endregion Conversions } } // 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
- ColorConverter.cs
- OdbcConnectionOpen.cs
- StoreContentChangedEventArgs.cs
- ClientTarget.cs
- ListGeneralPage.cs
- EmptyEnumerator.cs
- ToolStripPanelRenderEventArgs.cs
- OleDbCommandBuilder.cs
- TextCompositionEventArgs.cs
- ModelItemDictionaryImpl.cs
- PropertyReferenceExtension.cs
- TimelineGroup.cs
- XmlUtil.cs
- ValidationSummary.cs
- PageThemeCodeDomTreeGenerator.cs
- TemplateControlCodeDomTreeGenerator.cs
- EmbeddedMailObjectsCollection.cs
- ConfigurationConverterBase.cs
- DropShadowBitmapEffect.cs
- RequestQueue.cs
- FilterUserControlBase.cs
- DockProviderWrapper.cs
- PersonalizableTypeEntry.cs
- _StreamFramer.cs
- EnumUnknown.cs
- ProvidersHelper.cs
- FlowNode.cs
- ByeOperationCD1AsyncResult.cs
- SimpleType.cs
- assertwrapper.cs
- SoapReflector.cs
- Console.cs
- FigureParaClient.cs
- CompressEmulationStream.cs
- HuffModule.cs
- CustomExpressionEventArgs.cs
- XhtmlBasicValidationSummaryAdapter.cs
- SmtpSection.cs
- GridViewColumn.cs
- MailSettingsSection.cs
- Vector3DAnimationBase.cs
- TableCell.cs
- SqlDependency.cs
- Activity.cs
- Int64.cs
- SmiEventSink_Default.cs
- NonClientArea.cs
- DefaultValueConverter.cs
- ListItemParagraph.cs
- TableLayout.cs
- XmlValidatingReader.cs
- EntitySetBaseCollection.cs
- HttpDebugHandler.cs
- XmlSchemaInfo.cs
- LineSegment.cs
- DocumentViewerBaseAutomationPeer.cs
- UTF7Encoding.cs
- ProfileBuildProvider.cs
- StringReader.cs
- SpinWait.cs
- EncoderReplacementFallback.cs
- SamlAction.cs
- DefaultValueMapping.cs
- InputLanguageCollection.cs
- ChooseAction.cs
- ButtonBaseAutomationPeer.cs
- Visitor.cs
- StubHelpers.cs
- AdornerHitTestResult.cs
- UserInitiatedNavigationPermission.cs
- ExcCanonicalXml.cs
- ImageAttributes.cs
- Flowchart.cs
- RelativeSource.cs
- ConfigurationManagerHelper.cs
- PaperSource.cs
- CompiledQuery.cs
- FileSystemWatcher.cs
- ExpressionsCollectionConverter.cs
- DataSet.cs
- Light.cs
- XmlBinaryReader.cs
- SoapEnvelopeProcessingElement.cs
- _RequestCacheProtocol.cs
- TypeRefElement.cs
- SevenBitStream.cs
- DataExchangeServiceBinder.cs
- HealthMonitoringSectionHelper.cs
- ErrorRuntimeConfig.cs
- SqlProviderManifest.cs
- AutomationPatternInfo.cs
- VersionedStream.cs
- SettingsBindableAttribute.cs
- DataGridViewDataConnection.cs
- NamedPipeProcessProtocolHandler.cs
- SizeConverter.cs
- Byte.cs
- TdsParserStateObject.cs
- ResourceCategoryAttribute.cs
- SHA512Managed.cs