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
- EntityCommandExecutionException.cs
- CharacterHit.cs
- TransportationConfigurationTypeInstallComponent.cs
- externdll.cs
- PromptBuilder.cs
- FileResponseElement.cs
- WindowsSpinner.cs
- SafeNativeMethods.cs
- TreeNodeStyle.cs
- QueryTreeBuilder.cs
- Trigger.cs
- ObjectDataSource.cs
- HiddenFieldPageStatePersister.cs
- AlternateView.cs
- BindingSource.cs
- DbExpressionVisitor_TResultType.cs
- OptimizedTemplateContentHelper.cs
- DataGridCell.cs
- ItemType.cs
- RangeValuePatternIdentifiers.cs
- ToolStripContentPanelRenderEventArgs.cs
- ExtractedStateEntry.cs
- ChtmlPageAdapter.cs
- TextRenderer.cs
- PageSettings.cs
- InheritanceContextHelper.cs
- ProtocolException.cs
- Debugger.cs
- XmlSchemaComplexContentRestriction.cs
- XsdDuration.cs
- Token.cs
- WebPartConnectionCollection.cs
- CodeExporter.cs
- DataKeyArray.cs
- ReadOnlyNameValueCollection.cs
- SmtpReplyReader.cs
- ReverseInheritProperty.cs
- ReadOnlyHierarchicalDataSource.cs
- PathGeometry.cs
- MenuItemBindingCollection.cs
- EncodingTable.cs
- TableParagraph.cs
- QuadraticBezierSegment.cs
- SettingsPropertyIsReadOnlyException.cs
- StartFileNameEditor.cs
- PersonalizationProvider.cs
- PerfCounters.cs
- ASCIIEncoding.cs
- CodeAttributeDeclarationCollection.cs
- Converter.cs
- ObjectCloneHelper.cs
- FieldBuilder.cs
- ClientUrlResolverWrapper.cs
- ProfileModule.cs
- ScriptServiceAttribute.cs
- PolyLineSegmentFigureLogic.cs
- CategoryAttribute.cs
- RelatedPropertyManager.cs
- SharedConnectionInfo.cs
- SymmetricKey.cs
- DiscoveryReferences.cs
- InternalBase.cs
- HuffmanTree.cs
- StreamFormatter.cs
- OleDbMetaDataFactory.cs
- ScrollChrome.cs
- COAUTHIDENTITY.cs
- EmptyEnumerator.cs
- PrinterSettings.cs
- PropertyGridCommands.cs
- XmlAggregates.cs
- MenuItemBindingCollection.cs
- RNGCryptoServiceProvider.cs
- PropertyTabAttribute.cs
- CodeDirectionExpression.cs
- LinqDataSourceContextData.cs
- RowParagraph.cs
- XPathDocumentIterator.cs
- DependencyPropertyDescriptor.cs
- StreamAsIStream.cs
- Assembly.cs
- EntitySqlQueryCacheEntry.cs
- MouseButtonEventArgs.cs
- EventProvider.cs
- Bezier.cs
- DataBoundControlHelper.cs
- FixedTextView.cs
- SafeNativeMethods.cs
- HtmlInputHidden.cs
- FormatException.cs
- SettingsContext.cs
- SynthesizerStateChangedEventArgs.cs
- RtfFormatStack.cs
- LiteralControl.cs
- RecipientInfo.cs
- ConstructorBuilder.cs
- EventHandlerList.cs
- HtmlControl.cs
- DebugTrace.cs
- DatatypeImplementation.cs