Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / XamlPathDataSerializer.cs / 1305600 / XamlPathDataSerializer.cs
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// Description:
// XamlSerializer used to persist path data into Baml.
//
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;
using System.Collections.Generic;
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
{
///
/// XamlPathDataSerializer is used to persist collections of integer indices in Baml
///
internal class XamlPathDataSerializer : XamlSerializer
{
#region Construction
///
/// Constructor for XamlPathDataSerializer
///
public XamlPathDataSerializer()
{
}
#endregion Construction
///
/// 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
{
Parsers.PathMinilanguageToBinary( writer, stringValue ) ;
return true;
}
#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 Parsers.DeserializeStreamGeometry( 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 Parsers.DeserializeStreamGeometry( reader );
}
#endif
}
}
// 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
- CodeStatementCollection.cs
- DataGridTemplateColumn.cs
- InsufficientMemoryException.cs
- MasterPageParser.cs
- TableProviderWrapper.cs
- HostingEnvironmentWrapper.cs
- UnauthorizedAccessException.cs
- GregorianCalendar.cs
- Soap.cs
- RbTree.cs
- ImageListStreamer.cs
- InputScopeNameConverter.cs
- ControlCachePolicy.cs
- TextSpan.cs
- Decimal.cs
- ObjectReferenceStack.cs
- ExceptionUtility.cs
- URLAttribute.cs
- AnimationStorage.cs
- ComplexLine.cs
- CodeMethodInvokeExpression.cs
- BindingSource.cs
- FieldNameLookup.cs
- SafeCryptoHandles.cs
- DataGridClipboardHelper.cs
- HScrollProperties.cs
- CustomAssemblyResolver.cs
- FixedSOMPageElement.cs
- ObjectDataSourceDisposingEventArgs.cs
- MessageBox.cs
- ReliableMessagingVersion.cs
- SuppressIldasmAttribute.cs
- ServiceHost.cs
- ListViewItem.cs
- PackageRelationshipCollection.cs
- ArgumentOutOfRangeException.cs
- InvalidAsynchronousStateException.cs
- DbConnectionClosed.cs
- MembershipValidatePasswordEventArgs.cs
- ListChangedEventArgs.cs
- XmlBinaryWriterSession.cs
- DoubleCollection.cs
- TypeUsageBuilder.cs
- ExtendedPropertyInfo.cs
- ArraySortHelper.cs
- DbConnectionPoolCounters.cs
- TextTreeUndoUnit.cs
- controlskin.cs
- OleDbMetaDataFactory.cs
- SqlLiftIndependentRowExpressions.cs
- JapaneseCalendar.cs
- Math.cs
- PathData.cs
- XmlText.cs
- InternalDuplexChannelListener.cs
- StdRegProviderWrapper.cs
- SqlCrossApplyToCrossJoin.cs
- QuaternionIndependentAnimationStorage.cs
- _AutoWebProxyScriptEngine.cs
- HtmlShimManager.cs
- CodePropertyReferenceExpression.cs
- ParallelEnumerableWrapper.cs
- entitydatasourceentitysetnameconverter.cs
- PropertyFilterAttribute.cs
- WindowsGrip.cs
- DefaultProxySection.cs
- QueryableFilterRepeater.cs
- SqlColumnizer.cs
- ForeignKeyConstraint.cs
- VerticalAlignConverter.cs
- DataGridViewCheckBoxCell.cs
- OleDbPropertySetGuid.cs
- StyleXamlParser.cs
- Set.cs
- OracleBinary.cs
- _DynamicWinsockMethods.cs
- FlowSwitchDesigner.xaml.cs
- Hex.cs
- PreProcessor.cs
- DataServiceException.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- DisplayInformation.cs
- _CacheStreams.cs
- OleDbReferenceCollection.cs
- Model3DCollection.cs
- Select.cs
- XmlTypeAttribute.cs
- ProfileEventArgs.cs
- DrawingContextDrawingContextWalker.cs
- _ListenerResponseStream.cs
- DataRecordInternal.cs
- StylusButtonCollection.cs
- COM2TypeInfoProcessor.cs
- SecurityManager.cs
- ImportContext.cs
- BrowserCapabilitiesCodeGenerator.cs
- GenericUriParser.cs
- ZipIOExtraField.cs
- TextBlock.cs
- Axis.cs