Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Markup / XamlPathDataSerializer.cs / 1 / 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.
//
// 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
- FormView.cs
- XslException.cs
- ErrorTableItemStyle.cs
- ColumnResizeUndoUnit.cs
- VisualCollection.cs
- StringFunctions.cs
- InputEventArgs.cs
- VSWCFServiceContractGenerator.cs
- AutomationPatternInfo.cs
- _NegotiateClient.cs
- Trace.cs
- UnsafeNativeMethods.cs
- CompModSwitches.cs
- ComplexObject.cs
- Converter.cs
- sqlmetadatafactory.cs
- NativeMethods.cs
- EdmComplexTypeAttribute.cs
- BindingMemberInfo.cs
- RawKeyboardInputReport.cs
- XmlSchemaSimpleContent.cs
- MenuEventArgs.cs
- TimeoutException.cs
- EntityDataSourceStatementEditorForm.cs
- TextSelection.cs
- AlgoModule.cs
- SystemInformation.cs
- GridViewPageEventArgs.cs
- BStrWrapper.cs
- MethodToken.cs
- XmlReflectionImporter.cs
- MetafileHeaderEmf.cs
- WindowsListViewItem.cs
- TargetPerspective.cs
- _BaseOverlappedAsyncResult.cs
- Point3DCollectionConverter.cs
- Funcletizer.cs
- AuthenticationException.cs
- SocketException.cs
- SafeFileMapViewHandle.cs
- InvalidFilterCriteriaException.cs
- PropertyInfoSet.cs
- DragDeltaEventArgs.cs
- UpdatePanelControlTrigger.cs
- WebBrowserPermission.cs
- AsymmetricSignatureFormatter.cs
- CompareInfo.cs
- RemoveStoryboard.cs
- SafeEventLogReadHandle.cs
- DrawingContextWalker.cs
- SystemNetworkInterface.cs
- PasswordRecoveryDesigner.cs
- CaseInsensitiveHashCodeProvider.cs
- NameNode.cs
- HtmlInputPassword.cs
- HtmlTable.cs
- ListDictionary.cs
- SimpleTypesSurrogate.cs
- CultureSpecificStringDictionary.cs
- SqlRecordBuffer.cs
- RelationshipType.cs
- ServerType.cs
- JapaneseLunisolarCalendar.cs
- WebControlAdapter.cs
- Label.cs
- VarInfo.cs
- AttributedMetaModel.cs
- DescendentsWalkerBase.cs
- HyperlinkAutomationPeer.cs
- Authorization.cs
- SecureEnvironment.cs
- UrlPath.cs
- WebPartDisplayModeCollection.cs
- Walker.cs
- ComboBoxDesigner.cs
- WindowsProgressbar.cs
- VerificationAttribute.cs
- BlurBitmapEffect.cs
- DbProviderFactories.cs
- ToolStripContentPanel.cs
- XamlWriterExtensions.cs
- DrawListViewColumnHeaderEventArgs.cs
- XNodeSchemaApplier.cs
- SortableBindingList.cs
- lengthconverter.cs
- ErrorTableItemStyle.cs
- LineInfo.cs
- InvalidOperationException.cs
- SecurityCapabilities.cs
- ItemType.cs
- DeviceFilterEditorDialog.cs
- FormView.cs
- UpDownBaseDesigner.cs
- Exception.cs
- DatePickerTextBox.cs
- SmiEventStream.cs
- ConnectionPointConverter.cs
- SafeBitVector32.cs
- WindowsNonControl.cs
- RequestQueryParser.cs