Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Markup / XamlVector3DCollectionSerializer.cs / 1 / XamlVector3DCollectionSerializer.cs
//---------------------------------------------------------------------------- // // File: XamlVector3DCollectionSerializer.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 { ////// XamlVector3DCollectionSerializer is used to persist collections of 3D vectors in Baml /// internal class XamlVector3DCollectionSerializer : XamlSerializer { #region Construction ////// Constructor for XamlVector3DCollectionSerializer /// ////// 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 /// internal XamlVector3DCollectionSerializer() { } #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.SerializeVector3D( 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 internal method. /// public override object ConvertCustomBinaryToObject( BinaryReader reader) { return Vector3DCollection.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 internal method. /// public static object StaticConvertCustomBinaryToObject( BinaryReader reader) { return Vector3DCollection.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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IntegerValidator.cs
- SqlError.cs
- TraceSection.cs
- AdornerLayer.cs
- NamespaceInfo.cs
- DataTrigger.cs
- StringUtil.cs
- ToolboxComponentsCreatedEventArgs.cs
- DynamicMethod.cs
- ExpandedWrapper.cs
- DataServiceContext.cs
- Track.cs
- MediaSystem.cs
- SchemaInfo.cs
- LinqDataSourceContextEventArgs.cs
- SamlAuthorityBinding.cs
- Selection.cs
- VariableQuery.cs
- FileAuthorizationModule.cs
- PersonalizableAttribute.cs
- Rijndael.cs
- OracleConnectionString.cs
- InstanceKeyNotReadyException.cs
- XmlSchemaExternal.cs
- BaseHashHelper.cs
- ComponentCollection.cs
- XmlQualifiedName.cs
- CompilerWrapper.cs
- HandledEventArgs.cs
- CharStorage.cs
- RefreshEventArgs.cs
- Wizard.cs
- EntryPointNotFoundException.cs
- ToolStripDropDown.cs
- ProcessThread.cs
- GroupBox.cs
- FileUtil.cs
- XPathQilFactory.cs
- QilChoice.cs
- XmlNodeReader.cs
- EmptyEnumerable.cs
- XmlWriterDelegator.cs
- Rectangle.cs
- FrameworkName.cs
- ReflectionUtil.cs
- BypassElement.cs
- Hash.cs
- LiteralControl.cs
- RectangleF.cs
- SingleObjectCollection.cs
- DateTimeSerializationSection.cs
- MessageBox.cs
- SharingService.cs
- BatchWriter.cs
- SemaphoreSecurity.cs
- ActiveXSite.cs
- TextElementEnumerator.cs
- NativeMethods.cs
- RemotingException.cs
- ContextBase.cs
- SystemFonts.cs
- EntityKeyElement.cs
- DataBinding.cs
- DrawingImage.cs
- ProviderBase.cs
- TdsParserSafeHandles.cs
- ListViewGroup.cs
- ChineseLunisolarCalendar.cs
- ResourceKey.cs
- StylusDownEventArgs.cs
- _CommandStream.cs
- Expressions.cs
- FacetDescriptionElement.cs
- ScriptReference.cs
- MergeFilterQuery.cs
- RTTrackingProfile.cs
- NamedPipeChannelFactory.cs
- DataServiceQueryProvider.cs
- Claim.cs
- COSERVERINFO.cs
- KerberosTicketHashIdentifierClause.cs
- RectAnimationClockResource.cs
- IpcClientManager.cs
- XsltConvert.cs
- ReadContentAsBinaryHelper.cs
- ByteAnimationUsingKeyFrames.cs
- WebPartConnectionCollection.cs
- EditorBrowsableAttribute.cs
- XmlNodeReader.cs
- ChineseLunisolarCalendar.cs
- MenuItemCollection.cs
- SystemBrushes.cs
- SamlAuthorizationDecisionClaimResource.cs
- PrePrepareMethodAttribute.cs
- QualifiedCellIdBoolean.cs
- DataGridViewRowStateChangedEventArgs.cs
- Assert.cs
- SortDescription.cs
- StdValidatorsAndConverters.cs
- XsdDataContractImporter.cs