Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media3D / Converters / Generated / QuaternionValueSerializer.cs / 1305600 / 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, System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS); } 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, System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS); } 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
- SqlTypesSchemaImporter.cs
- SQLBinaryStorage.cs
- XmlSchemaType.cs
- ImageBrush.cs
- SelectionHighlightInfo.cs
- ProcessInfo.cs
- MatrixAnimationUsingPath.cs
- IsolatedStorageException.cs
- CompositionDesigner.cs
- DrawingState.cs
- DataGridViewLinkCell.cs
- GetIsBrowserClientRequest.cs
- WebPartEditorCancelVerb.cs
- UnsafeNativeMethods.cs
- ListDictionary.cs
- XmlSchemaGroupRef.cs
- HashAlgorithm.cs
- RegistryConfigurationProvider.cs
- BindingExpression.cs
- StorageMappingItemLoader.cs
- SqlDelegatedTransaction.cs
- CompiledELinqQueryState.cs
- HttpWriter.cs
- ResizeGrip.cs
- xmlsaver.cs
- OpenFileDialog.cs
- PatternMatcher.cs
- PropertyPath.cs
- EntityDataSourceState.cs
- DatePickerAutomationPeer.cs
- WsdlBuildProvider.cs
- BevelBitmapEffect.cs
- CodeValidator.cs
- PassportIdentity.cs
- TripleDESCryptoServiceProvider.cs
- SByteConverter.cs
- __Filters.cs
- LightweightEntityWrapper.cs
- WebRequestModuleElementCollection.cs
- ProcessInfo.cs
- TypeElementCollection.cs
- NativeMethods.cs
- ProtocolsConfiguration.cs
- LogEntry.cs
- ProcessThread.cs
- TemplateXamlParser.cs
- QueueProcessor.cs
- FloaterParagraph.cs
- ToolStripComboBox.cs
- DateTimeOffset.cs
- ColorConvertedBitmap.cs
- CloseCryptoHandleRequest.cs
- LambdaSerializationException.cs
- Pair.cs
- HttpNamespaceReservationInstallComponent.cs
- PassportIdentity.cs
- SqlErrorCollection.cs
- Switch.cs
- PeerPresenceInfo.cs
- GenericTypeParameterBuilder.cs
- objectresult_tresulttype.cs
- ViewStateChangedEventArgs.cs
- _NetworkingPerfCounters.cs
- DropDownHolder.cs
- JavaScriptString.cs
- OdbcTransaction.cs
- DuplicateWaitObjectException.cs
- BindingExpressionUncommonField.cs
- SharedStatics.cs
- EntryWrittenEventArgs.cs
- DataControlPagerLinkButton.cs
- TextDecorationCollection.cs
- Int16.cs
- TextStore.cs
- autovalidator.cs
- ContentPosition.cs
- ArgumentException.cs
- ExtendedPropertiesHandler.cs
- TraversalRequest.cs
- TimeSpanStorage.cs
- DataMemberFieldEditor.cs
- PropertyTabChangedEvent.cs
- PieceDirectory.cs
- PerfCounterSection.cs
- NoClickablePointException.cs
- ValidatingPropertiesEventArgs.cs
- OledbConnectionStringbuilder.cs
- UserControlCodeDomTreeGenerator.cs
- CreateUserWizardDesigner.cs
- TreeIterator.cs
- followingsibling.cs
- CreateUserErrorEventArgs.cs
- SimpleBitVector32.cs
- ToolStripItemBehavior.cs
- PatternMatcher.cs
- CounterSet.cs
- TimeSpanStorage.cs
- XPathSelfQuery.cs
- SqlRowUpdatedEvent.cs
- JoinElimination.cs