Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Base / System / Windows / Converters / Generated / SizeValueSerializer.cs / 1 / SizeValueSerializer.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.WindowsBase; using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.ComponentModel.Design.Serialization; using System.Windows.Markup; using System.Windows.Converters; using System.Windows; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Converters { ////// SizeValueSerializer - ValueSerializer class for converting instances of strings to and from Size instances /// This is used by the MarkupWriter class. /// public class SizeValueSerializer : 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 Size)) { return false; } return true; } ////// Converts a string into a Size. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Size.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 Size) { Size instance = (Size) 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.WindowsBase; using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.ComponentModel.Design.Serialization; using System.Windows.Markup; using System.Windows.Converters; using System.Windows; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Converters { ////// SizeValueSerializer - ValueSerializer class for converting instances of strings to and from Size instances /// This is used by the MarkupWriter class. /// public class SizeValueSerializer : 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 Size)) { return false; } return true; } ////// Converts a string into a Size. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Size.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 Size) { Size instance = (Size) 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
- SelectionRange.cs
- EntityClientCacheEntry.cs
- DesignerVerbToolStripMenuItem.cs
- ToolBar.cs
- OracleCommandSet.cs
- ObjectPersistData.cs
- PageParser.cs
- BoolExpression.cs
- ObjectItemAssemblyLoader.cs
- OleDbDataAdapter.cs
- MergablePropertyAttribute.cs
- Logging.cs
- LongMinMaxAggregationOperator.cs
- AstTree.cs
- DataServiceException.cs
- AssemblyAttributesGoHere.cs
- ContainerSelectorBehavior.cs
- HostedTcpTransportManager.cs
- WindowsContainer.cs
- sortedlist.cs
- ValidateNames.cs
- HierarchicalDataSourceConverter.cs
- ApplicationServiceManager.cs
- MembershipPasswordException.cs
- _HTTPDateParse.cs
- WebServicesInteroperability.cs
- HtmlImageAdapter.cs
- CodeConditionStatement.cs
- SurrogateEncoder.cs
- ConfigurationManagerInternalFactory.cs
- AnnotationResource.cs
- SystemNetHelpers.cs
- MarshalByValueComponent.cs
- UpdatePanelControlTrigger.cs
- ServicePointManagerElement.cs
- AsyncPostBackTrigger.cs
- HttpResponseBase.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- SuppressMessageAttribute.cs
- OLEDB_Enum.cs
- TextElementEnumerator.cs
- SafeFreeMibTable.cs
- PolicyException.cs
- HitTestWithGeometryDrawingContextWalker.cs
- BinaryNode.cs
- BaseCodeDomTreeGenerator.cs
- Tuple.cs
- TTSVoice.cs
- ParserHooks.cs
- SerializationInfo.cs
- TabPage.cs
- MediaContext.cs
- ThicknessKeyFrameCollection.cs
- LicenseException.cs
- Int32EqualityComparer.cs
- UInt16.cs
- AudioException.cs
- TextTreeRootNode.cs
- CompositionTarget.cs
- CurrencyManager.cs
- SafeArrayRankMismatchException.cs
- ExpressionDumper.cs
- ValidationRuleCollection.cs
- DynamicScriptObject.cs
- JsonFormatWriterGenerator.cs
- StylusButton.cs
- MenuItem.cs
- HtmlTextArea.cs
- Formatter.cs
- Label.cs
- HttpCookiesSection.cs
- SafeNativeMemoryHandle.cs
- HttpListenerException.cs
- XmlResolver.cs
- Msmq.cs
- DataListItem.cs
- DirectionalLight.cs
- APCustomTypeDescriptor.cs
- SettingsAttributeDictionary.cs
- CellRelation.cs
- TableLayoutColumnStyleCollection.cs
- BounceEase.cs
- WebPartPersonalization.cs
- TransactionState.cs
- FigureParagraph.cs
- CommandID.cs
- TextSelectionHighlightLayer.cs
- JsonEncodingStreamWrapper.cs
- XmlReaderSettings.cs
- ArrayWithOffset.cs
- StackOverflowException.cs
- PackageProperties.cs
- LinkButton.cs
- TreeNodeStyleCollection.cs
- ClientBase.cs
- RuntimeHelpers.cs
- UnsafeNativeMethods.cs
- DataControlImageButton.cs
- ConfigurationElementProperty.cs
- DataGridViewRowConverter.cs