Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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, System.Windows.Markup.TypeConverterHelper.EnglishUSCulture ); } 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, System.Windows.Markup.TypeConverterHelper.EnglishUSCulture ); } 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
- Rectangle.cs
- KeyFrames.cs
- TypedDataSourceCodeGenerator.cs
- XmlDsigSep2000.cs
- StagingAreaInputItem.cs
- BasicDesignerLoader.cs
- ConfigurationSettings.cs
- InternalCache.cs
- BindingManagerDataErrorEventArgs.cs
- PrintPreviewControl.cs
- ToolBarDesigner.cs
- _LazyAsyncResult.cs
- PlatformCulture.cs
- SpecularMaterial.cs
- CryptoApi.cs
- ControlPaint.cs
- SharedPerformanceCounter.cs
- QfeChecker.cs
- IApplicationTrustManager.cs
- GenerateHelper.cs
- MiniParameterInfo.cs
- PathFigureCollectionValueSerializer.cs
- MethodBuilder.cs
- DataSourceView.cs
- RecognizedPhrase.cs
- FreezableOperations.cs
- SectionInformation.cs
- HeaderedContentControl.cs
- DesignerToolboxInfo.cs
- ProjectionCamera.cs
- RequestCache.cs
- CapabilitiesUse.cs
- EditModeSwitchButton.cs
- ValidatedControlConverter.cs
- objectresult_tresulttype.cs
- GlobalEventManager.cs
- CompilerErrorCollection.cs
- ChannelSinkStacks.cs
- ErasingStroke.cs
- MetadataArtifactLoaderFile.cs
- PasswordTextContainer.cs
- ListItemCollection.cs
- MLangCodePageEncoding.cs
- ReachSerializerAsync.cs
- CanExecuteRoutedEventArgs.cs
- X509SecurityTokenAuthenticator.cs
- DrawListViewSubItemEventArgs.cs
- Rect.cs
- Animatable.cs
- CodeCommentStatement.cs
- ColorTranslator.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- ColumnResult.cs
- SettingsPropertyWrongTypeException.cs
- invalidudtexception.cs
- HtmlShimManager.cs
- EditorZoneDesigner.cs
- _NativeSSPI.cs
- Stack.cs
- __TransparentProxy.cs
- CookieParameter.cs
- ItemList.cs
- ProfessionalColorTable.cs
- TextInfo.cs
- ChangesetResponse.cs
- XmlSignificantWhitespace.cs
- SignatureToken.cs
- BrushConverter.cs
- IsolatedStorageException.cs
- CalendarModeChangedEventArgs.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- Funcletizer.cs
- JoinTreeSlot.cs
- RemotingSurrogateSelector.cs
- StatusBarDrawItemEvent.cs
- Attributes.cs
- Point3DAnimationBase.cs
- HttpHeaderCollection.cs
- ListCollectionView.cs
- WebPartVerbCollection.cs
- OleDbMetaDataFactory.cs
- TextDecorationCollectionConverter.cs
- OleDbSchemaGuid.cs
- TdsRecordBufferSetter.cs
- TypeDescriptionProvider.cs
- DependencyPropertyDescriptor.cs
- RequestCacheEntry.cs
- MulticastNotSupportedException.cs
- NamedPipeAppDomainProtocolHandler.cs
- Vector3D.cs
- WindowsListViewSubItem.cs
- TemplateBaseAction.cs
- GroupLabel.cs
- Token.cs
- UserThread.cs
- OperationAbortedException.cs
- SerializationEventsCache.cs
- Deserializer.cs
- WsdlBuildProvider.cs
- SelectionHighlightInfo.cs