Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / Converters / Generated / PointValueSerializer.cs / 1 / PointValueSerializer.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // This file was generated, please do not edit it directly. // // Please see [....]/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 { ////// PointValueSerializer - ValueSerializer class for converting instances of strings to and from Point instances /// This is used by the MarkupWriter class. /// public class PointValueSerializer : 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 Point)) { throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "Point"), "value"); } return true; } ////// Converts a string into a Point. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Point.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 Point) { Point instance = (Point) 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
- ObjectPersistData.cs
- MdiWindowListStrip.cs
- FormViewRow.cs
- LowerCaseStringConverter.cs
- safelink.cs
- UserControl.cs
- OleAutBinder.cs
- WindowsClientElement.cs
- ChangePasswordDesigner.cs
- ProcessThread.cs
- DependencyPropertyAttribute.cs
- DataGridTable.cs
- DatePicker.cs
- Point3D.cs
- ServiceContractListItem.cs
- WebScriptMetadataMessageEncoderFactory.cs
- FileUtil.cs
- ObjRef.cs
- BaseCollection.cs
- _Semaphore.cs
- SafeSystemMetrics.cs
- ZipIOExtraFieldPaddingElement.cs
- DelegateBodyWriter.cs
- GeneralTransform3DCollection.cs
- HitTestParameters.cs
- WindowsIdentity.cs
- __ComObject.cs
- Sql8ExpressionRewriter.cs
- SqlCachedBuffer.cs
- XmlRootAttribute.cs
- TextEditorCharacters.cs
- ShaderRenderModeValidation.cs
- WebPartCatalogCloseVerb.cs
- TextSchema.cs
- BrowserDefinitionCollection.cs
- DataMemberConverter.cs
- ComponentRenameEvent.cs
- AuthenticationModulesSection.cs
- ApplicationSettingsBase.cs
- ReadOnlyPropertyMetadata.cs
- BmpBitmapEncoder.cs
- PolicyLevel.cs
- ReferencedAssembly.cs
- DefaultPropertiesToSend.cs
- DependencyProperty.cs
- CodeAssignStatement.cs
- PageEventArgs.cs
- UnsafeNativeMethods.cs
- CacheOutputQuery.cs
- PrivilegeNotHeldException.cs
- TextFormatterImp.cs
- METAHEADER.cs
- UrlParameterWriter.cs
- Matrix.cs
- UIElementIsland.cs
- TableChangeProcessor.cs
- HttpProxyCredentialType.cs
- SafeFileMappingHandle.cs
- IResourceProvider.cs
- mda.cs
- WorkflowTraceTransfer.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- CompilationUtil.cs
- NumberFunctions.cs
- MultipartContentParser.cs
- Point3DConverter.cs
- TextWriter.cs
- Attributes.cs
- Calendar.cs
- IdnElement.cs
- SemanticTag.cs
- PerformanceCounterPermissionEntry.cs
- WebResourceAttribute.cs
- ContextMenu.cs
- MetadataCollection.cs
- HtmlInputHidden.cs
- SamlNameIdentifierClaimResource.cs
- DataObjectPastingEventArgs.cs
- WMICapabilities.cs
- _OverlappedAsyncResult.cs
- Executor.cs
- ReliableChannelFactory.cs
- FontNameConverter.cs
- CaseInsensitiveComparer.cs
- DPAPIProtectedConfigurationProvider.cs
- FolderBrowserDialog.cs
- PlatformCulture.cs
- DataServiceHostWrapper.cs
- CompiledXpathExpr.cs
- ArithmeticLiteral.cs
- DirectoryNotFoundException.cs
- XmlSerializerAssemblyAttribute.cs
- AsnEncodedData.cs
- AnnotationHighlightLayer.cs
- ConfigXmlAttribute.cs
- CodeLabeledStatement.cs
- FormView.cs
- DbException.cs
- FixedSOMSemanticBox.cs
- WebPartZoneCollection.cs