Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Base / System / Windows / Converters / Generated / PointValueSerializer.cs / 2 / PointValueSerializer.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 { ////// 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)) { return false; } 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. //---------------------------------------------------------------------------- // //// 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 { ////// 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)) { return false; } 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
- ListBindingConverter.cs
- NodeFunctions.cs
- SiteMapNodeCollection.cs
- ValidationContext.cs
- BookmarkWorkItem.cs
- AudienceUriMode.cs
- ResourcesBuildProvider.cs
- CompositeControl.cs
- MethodImplAttribute.cs
- EmptyControlCollection.cs
- AxParameterData.cs
- Debug.cs
- AudienceUriMode.cs
- EventInfo.cs
- FieldNameLookup.cs
- InteropBitmapSource.cs
- TextBlockAutomationPeer.cs
- XPathScanner.cs
- TrustSection.cs
- ObjectDataSourceView.cs
- FlagsAttribute.cs
- PrtTicket_Public.cs
- EntityModelBuildProvider.cs
- DataRowChangeEvent.cs
- Point4DValueSerializer.cs
- ProcessProtocolHandler.cs
- CompilerScopeManager.cs
- StringExpressionSet.cs
- RawStylusActions.cs
- DNS.cs
- TablePatternIdentifiers.cs
- Rss20FeedFormatter.cs
- HeaderFilter.cs
- RadioButtonAutomationPeer.cs
- MemberRestriction.cs
- ADConnectionHelper.cs
- XPathItem.cs
- SqlInfoMessageEvent.cs
- MobileUserControl.cs
- Lock.cs
- ParallelRangeManager.cs
- RsaKeyIdentifierClause.cs
- QilVisitor.cs
- FileSecurity.cs
- MarkupProperty.cs
- DesignerActionItemCollection.cs
- HtmlControlPersistable.cs
- DemultiplexingDispatchMessageFormatter.cs
- AbsoluteQuery.cs
- TextBox.cs
- MsmqBindingMonitor.cs
- MsmqChannelFactoryBase.cs
- PageHandlerFactory.cs
- EmptyEnumerable.cs
- TableAutomationPeer.cs
- AstNode.cs
- ZipIOExtraFieldElement.cs
- TextTreeFixupNode.cs
- XmlSchemaSimpleTypeRestriction.cs
- SignatureGenerator.cs
- DataBindingHandlerAttribute.cs
- ViewRendering.cs
- PopupRootAutomationPeer.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- Claim.cs
- RepeaterDesigner.cs
- MasterPageParser.cs
- BindingSource.cs
- DataColumnPropertyDescriptor.cs
- UnmanagedMemoryStream.cs
- CombinedGeometry.cs
- EdmItemCollection.cs
- ExpressionBinding.cs
- MetadataArtifactLoaderCompositeResource.cs
- TextServicesDisplayAttribute.cs
- CompoundFileIOPermission.cs
- IdentityManager.cs
- ConfigurationPropertyCollection.cs
- DataGridRow.cs
- ErrorWrapper.cs
- XpsInterleavingPolicy.cs
- QilStrConcat.cs
- OracleException.cs
- LineUtil.cs
- OptimisticConcurrencyException.cs
- ExpanderAutomationPeer.cs
- IDataContractSurrogate.cs
- SoapMessage.cs
- Timer.cs
- FreezableDefaultValueFactory.cs
- CharKeyFrameCollection.cs
- ImagingCache.cs
- StyleBamlTreeBuilder.cs
- WorkflowPageSetupDialog.cs
- NavigationWindowAutomationPeer.cs
- ProcessInfo.cs
- CommonDialog.cs
- GridViewDeletedEventArgs.cs
- TimelineGroup.cs
- Char.cs