Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Converters / Generated / SizeValueSerializer.cs / 1305600 / 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.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.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.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
- TargetPerspective.cs
- TypeDelegator.cs
- EntityDataSourceReferenceGroup.cs
- ListDesigner.cs
- QilPatternFactory.cs
- GlobalizationSection.cs
- TrackingServices.cs
- StackSpiller.cs
- BaseParser.cs
- MetadataArtifactLoaderComposite.cs
- CultureInfo.cs
- Storyboard.cs
- XmlMembersMapping.cs
- Style.cs
- EdmComplexPropertyAttribute.cs
- UnorderedHashRepartitionStream.cs
- Window.cs
- MetadataSource.cs
- OleDbTransaction.cs
- TableRow.cs
- COSERVERINFO.cs
- CompilerLocalReference.cs
- EntityCollection.cs
- WebPart.cs
- CopyAttributesAction.cs
- SmiMetaDataProperty.cs
- PersonalizableTypeEntry.cs
- DataProtection.cs
- MediaScriptCommandRoutedEventArgs.cs
- EnumMemberAttribute.cs
- GenerateScriptTypeAttribute.cs
- SmtpFailedRecipientsException.cs
- ObjectPersistData.cs
- StorageEndPropertyMapping.cs
- DynamicQueryStringParameter.cs
- AssemblyAttributes.cs
- SymbolEqualComparer.cs
- WebEventCodes.cs
- VariableBinder.cs
- MembershipPasswordException.cs
- ZipIOFileItemStream.cs
- NavigationEventArgs.cs
- SourceFilter.cs
- UnsafeNativeMethods.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- DnsPermission.cs
- PropertyMapper.cs
- GrabHandleGlyph.cs
- GridSplitter.cs
- HtmlWindow.cs
- dataSvcMapFileLoader.cs
- ColumnTypeConverter.cs
- WebPartConnectionsConfigureVerb.cs
- Deflater.cs
- String.cs
- COAUTHINFO.cs
- Stacktrace.cs
- ParallelDesigner.cs
- DateRangeEvent.cs
- NegotiationTokenAuthenticatorState.cs
- DoWorkEventArgs.cs
- QueryStringParameter.cs
- _FtpControlStream.cs
- ListComponentEditorPage.cs
- SafePEFileHandle.cs
- MetadataArtifactLoaderComposite.cs
- ApplyTemplatesAction.cs
- TakeQueryOptionExpression.cs
- InvalidCommandTreeException.cs
- ConnectionManagementSection.cs
- IdentitySection.cs
- StringAnimationBase.cs
- Crypto.cs
- InstallerTypeAttribute.cs
- SchemaImporterExtensionsSection.cs
- Convert.cs
- PrivateFontCollection.cs
- RtfToXamlReader.cs
- NameValueSectionHandler.cs
- FixedTextView.cs
- MailHeaderInfo.cs
- RuleSettings.cs
- RangeValuePattern.cs
- ClientProxyGenerator.cs
- XamlSerializerUtil.cs
- DocumentViewerHelper.cs
- _ChunkParse.cs
- JsonFormatWriterGenerator.cs
- BufferedGraphicsContext.cs
- SQLGuidStorage.cs
- ApplicationId.cs
- _NestedMultipleAsyncResult.cs
- DuplicateWaitObjectException.cs
- DefaultWorkflowSchedulerService.cs
- ZipIOExtraFieldPaddingElement.cs
- WebPartCatalogAddVerb.cs
- DataListItemEventArgs.cs
- SuppressMessageAttribute.cs
- Matrix.cs
- XPathScanner.cs