Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media3D / Converters / Generated / QuaternionValueSerializer.cs / 2 / QuaternionValueSerializer.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // This file was generated, please do not edit it directly. // // Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information. // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.Collections; using MS.Internal.PresentationCore; using MS.Utility; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Media.Media3D.Converters { ////// QuaternionValueSerializer - ValueSerializer class for converting instances of strings to and from Quaternion instances /// This is used by the MarkupWriter class. /// public class QuaternionValueSerializer : ValueSerializer { ////// Returns true. /// public override bool CanConvertFromString(string value, IValueSerializerContext context) { return true; } ////// Returns true if the given value can be converted into a string /// public override bool CanConvertToString(object value, IValueSerializerContext context) { // Validate the input type if (!(value is Quaternion)) { return false; } return true; } ////// Converts a string into a Quaternion. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Quaternion.Parse(value ); } else { return base.ConvertFromString( value, context ); } } ////// Converts the value into a string. /// public override string ConvertToString(object value, IValueSerializerContext context) { if (value is Quaternion) { Quaternion instance = (Quaternion) value; #pragma warning suppress 6506 // instance is obviously not null return instance.ConvertToString(null, CultureInfo.GetCultureInfo("en-us") ); } return base.ConvertToString(value, context); } } } // 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. // // // This file was generated, please do not edit it directly. // // Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information. // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.Collections; using MS.Internal.PresentationCore; using MS.Utility; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Windows.Markup; using System.Windows.Media.Media3D.Converters; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Media.Media3D.Converters { ////// QuaternionValueSerializer - ValueSerializer class for converting instances of strings to and from Quaternion instances /// This is used by the MarkupWriter class. /// public class QuaternionValueSerializer : ValueSerializer { ////// Returns true. /// public override bool CanConvertFromString(string value, IValueSerializerContext context) { return true; } ////// Returns true if the given value can be converted into a string /// public override bool CanConvertToString(object value, IValueSerializerContext context) { // Validate the input type if (!(value is Quaternion)) { return false; } return true; } ////// Converts a string into a Quaternion. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Quaternion.Parse(value ); } else { return base.ConvertFromString( value, context ); } } ////// Converts the value into a string. /// public override string ConvertToString(object value, IValueSerializerContext context) { if (value is Quaternion) { Quaternion instance = (Quaternion) value; #pragma warning suppress 6506 // instance is obviously not null return instance.ConvertToString(null, CultureInfo.GetCultureInfo("en-us") ); } return base.ConvertToString(value, context); } } } // 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
- CultureSpecificStringDictionary.cs
- InstancePersistenceException.cs
- OrderingQueryOperator.cs
- ListChunk.cs
- UrlMapping.cs
- MediaPlayer.cs
- ReachPrintTicketSerializer.cs
- OdbcDataAdapter.cs
- BitmapSizeOptions.cs
- ObjectDisposedException.cs
- Assert.cs
- TableParagraph.cs
- ImageConverter.cs
- ResourceDisplayNameAttribute.cs
- CodeTypeMemberCollection.cs
- Mappings.cs
- SecurityProtocol.cs
- TransformerInfoCollection.cs
- TypeGeneratedEventArgs.cs
- SqlTypeConverter.cs
- VisualTarget.cs
- MouseOverProperty.cs
- XPathAxisIterator.cs
- IdnMapping.cs
- OpenFileDialog.cs
- TextRangeEditTables.cs
- CLRBindingWorker.cs
- StylusCaptureWithinProperty.cs
- HttpConfigurationContext.cs
- HMACMD5.cs
- DataGridViewDataErrorEventArgs.cs
- CompiledRegexRunnerFactory.cs
- LinqDataSourceView.cs
- EDesignUtil.cs
- XamlBuildTaskServices.cs
- OleCmdHelper.cs
- WebPartZoneBase.cs
- PrimitiveXmlSerializers.cs
- ScalarConstant.cs
- GradientSpreadMethodValidation.cs
- TextBoxBase.cs
- TdsRecordBufferSetter.cs
- HttpServerVarsCollection.cs
- XmlSchemaSequence.cs
- NumberSubstitution.cs
- EventEntry.cs
- XsltLibrary.cs
- EntitySqlQueryCacheKey.cs
- ListBox.cs
- ProbeDuplex11AsyncResult.cs
- PageRanges.cs
- EpmSourceTree.cs
- CodeDirectionExpression.cs
- CompositeKey.cs
- ComplexType.cs
- PrimitiveXmlSerializers.cs
- AssemblyBuilderData.cs
- NetPeerTcpBinding.cs
- ConfigurationException.cs
- TextServicesManager.cs
- MimeFormReflector.cs
- WsdlServiceChannelBuilder.cs
- WeakRefEnumerator.cs
- Span.cs
- EntityUtil.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- DataGridViewRow.cs
- RefreshPropertiesAttribute.cs
- RemoteDebugger.cs
- DataViewSetting.cs
- TabControlEvent.cs
- OracleColumn.cs
- CatalogPart.cs
- XmlSchemaChoice.cs
- FrameworkObject.cs
- SafeNativeMemoryHandle.cs
- TextServicesPropertyRanges.cs
- WpfGeneratedKnownProperties.cs
- PeerInvitationResponse.cs
- Track.cs
- IdnMapping.cs
- ExtractedStateEntry.cs
- PrimitiveXmlSerializers.cs
- RegionData.cs
- COMException.cs
- DataControlCommands.cs
- IssuanceLicense.cs
- SystemUnicastIPAddressInformation.cs
- TaiwanLunisolarCalendar.cs
- DesignerDataColumn.cs
- InheritedPropertyChangedEventArgs.cs
- XmlArrayAttribute.cs
- Cursors.cs
- BaseDataBoundControl.cs
- IncrementalHitTester.cs
- DBPropSet.cs
- DynamicILGenerator.cs
- CharEnumerator.cs
- XmlWrappingWriter.cs
- TemplatePartAttribute.cs