Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Base / System / Windows / Converters / Generated / SizeValueSerializer.cs / 2 / 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
- TargetParameterCountException.cs
- HandlerBase.cs
- CustomCredentialPolicy.cs
- MdiWindowListItemConverter.cs
- PageCodeDomTreeGenerator.cs
- DataGridViewComboBoxColumn.cs
- OrthographicCamera.cs
- CustomDictionarySources.cs
- COM2IProvidePropertyBuilderHandler.cs
- CapabilitiesUse.cs
- Activator.cs
- AccessViolationException.cs
- Sql8ConformanceChecker.cs
- Comparer.cs
- QuaternionAnimationBase.cs
- Classification.cs
- WindowsAuthenticationModule.cs
- TraceHelpers.cs
- InvokeWebService.cs
- ActivityTypeDesigner.xaml.cs
- StringAnimationBase.cs
- ISAPIWorkerRequest.cs
- MenuItemCollection.cs
- ParseNumbers.cs
- _SSPIWrapper.cs
- IdleTimeoutMonitor.cs
- Bold.cs
- ViewLoader.cs
- EnumType.cs
- BuildProvidersCompiler.cs
- DelimitedListTraceListener.cs
- IIS7UserPrincipal.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- ExternalException.cs
- SoundPlayerAction.cs
- ExpandCollapsePatternIdentifiers.cs
- SqlConnectionStringBuilder.cs
- ProxyFragment.cs
- ContentDesigner.cs
- _FtpControlStream.cs
- DesignerView.cs
- RawStylusSystemGestureInputReport.cs
- MemberDescriptor.cs
- AesManaged.cs
- ColorConvertedBitmapExtension.cs
- SqlDataSourceSelectingEventArgs.cs
- QilUnary.cs
- uribuilder.cs
- ListDictionaryInternal.cs
- PrimarySelectionAdorner.cs
- ServiceObjectContainer.cs
- SecurityDocument.cs
- PEFileReader.cs
- DbConnectionClosed.cs
- DebugControllerThread.cs
- XamlSerializer.cs
- ColumnMapVisitor.cs
- ByteStreamGeometryContext.cs
- ConnectionOrientedTransportManager.cs
- IntegerValidator.cs
- _AuthenticationState.cs
- SimpleHandlerFactory.cs
- PointLightBase.cs
- XsltQilFactory.cs
- AppDomainGrammarProxy.cs
- SecurityResources.cs
- CqlBlock.cs
- SiteMapNodeItemEventArgs.cs
- BufferedWebEventProvider.cs
- RemotingAttributes.cs
- DescendantOverDescendantQuery.cs
- AuthenticatingEventArgs.cs
- ResourceContainer.cs
- SplitterEvent.cs
- MetabaseServerConfig.cs
- Documentation.cs
- MenuItemBinding.cs
- BCLDebug.cs
- TextOutput.cs
- OdbcInfoMessageEvent.cs
- ToolStripTextBox.cs
- BitmapEffectInput.cs
- InstanceKeyCompleteException.cs
- TypeToken.cs
- XmlUtil.cs
- ToolStripSystemRenderer.cs
- PassportAuthentication.cs
- DesignRelationCollection.cs
- DataColumnCollection.cs
- GradientStopCollection.cs
- ExceptionHandlersDesigner.cs
- COM2PropertyDescriptor.cs
- DockPanel.cs
- DataList.cs
- HtmlEncodedRawTextWriter.cs
- ProcessDesigner.cs
- ControlCachePolicy.cs
- DataException.cs
- DefaultHttpHandler.cs
- TableLayoutStyle.cs