Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / MultilineStringConverter.cs / 1 / MultilineStringConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// Provides a type converter to convert multiline strings to a simple string. /// [HostProtection(SharedState = true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public class MultilineStringConverter : TypeConverter { ////// Converts the given value object to the specified destination type. /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == null) { throw new ArgumentNullException("destinationType"); } if (destinationType == typeof(string)) { if (value is string) { return SR.GetString(SR.MultilineStringConverterText); } } return base.ConvertTo(context, culture, value, destinationType); } ////// Gets a collection of properties for the type of array specified by the value /// parameter using the specified context and attributes. /// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { return null; } ////// Gets a value indicating whether this object supports properties. /// public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// Provides a type converter to convert multiline strings to a simple string. /// [HostProtection(SharedState = true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public class MultilineStringConverter : TypeConverter { ////// Converts the given value object to the specified destination type. /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == null) { throw new ArgumentNullException("destinationType"); } if (destinationType == typeof(string)) { if (value is string) { return SR.GetString(SR.MultilineStringConverterText); } } return base.ConvertTo(context, culture, value, destinationType); } ////// Gets a collection of properties for the type of array specified by the value /// parameter using the specified context and attributes. /// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { return null; } ////// Gets a value indicating whether this object supports properties. /// public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SocketException.cs
- TextElement.cs
- ContainerTracking.cs
- SQLCharsStorage.cs
- EventSetterHandlerConverter.cs
- BamlWriter.cs
- Baml2006Reader.cs
- FlowDocumentScrollViewer.cs
- _RequestLifetimeSetter.cs
- ChameleonKey.cs
- LocalIdKeyIdentifierClause.cs
- XmlEntity.cs
- HtmlInputReset.cs
- WebDescriptionAttribute.cs
- MemberPathMap.cs
- CultureSpecificCharacterBufferRange.cs
- BeginStoryboard.cs
- UnknownWrapper.cs
- Marshal.cs
- ManagementClass.cs
- ThreadStateException.cs
- ToolboxItem.cs
- SerializationInfo.cs
- SizeChangedInfo.cs
- MenuItemStyle.cs
- EncodingInfo.cs
- XmlSchemaSimpleTypeRestriction.cs
- ProfileBuildProvider.cs
- ReadOnlyDataSourceView.cs
- UInt16Converter.cs
- DebuggerAttributes.cs
- DebugViewWriter.cs
- OrderedDictionaryStateHelper.cs
- Quaternion.cs
- ListParaClient.cs
- DataListCommandEventArgs.cs
- EncoderNLS.cs
- ProtectedConfigurationProviderCollection.cs
- GridViewColumnHeader.cs
- TreeNodeBinding.cs
- JsonReaderWriterFactory.cs
- ChangeInterceptorAttribute.cs
- CommandEventArgs.cs
- InputBuffer.cs
- DataRowView.cs
- FontDialog.cs
- X509PeerCertificateAuthentication.cs
- NumericPagerField.cs
- MsmqIntegrationSecurityMode.cs
- BaseCodeDomTreeGenerator.cs
- SoapEnvelopeProcessingElement.cs
- QueryTask.cs
- EntityProviderServices.cs
- DataPagerFieldCollection.cs
- CharAnimationBase.cs
- PeerNodeAddress.cs
- ListenerConfig.cs
- Types.cs
- PageParser.cs
- ComponentResourceManager.cs
- GACIdentityPermission.cs
- OleDbPropertySetGuid.cs
- ControlBindingsCollection.cs
- DefaultEvaluationContext.cs
- WebResourceAttribute.cs
- DataSourceXmlSerializer.cs
- WebPartConnectionsDisconnectVerb.cs
- SafeRegistryHandle.cs
- ScrollBar.cs
- DataContractAttribute.cs
- ObjectNavigationPropertyMapping.cs
- RSAOAEPKeyExchangeFormatter.cs
- PageCodeDomTreeGenerator.cs
- DbConnectionOptions.cs
- DbMetaDataCollectionNames.cs
- ParseNumbers.cs
- TextRenderer.cs
- UrlMapping.cs
- PreloadedPackages.cs
- HyperLinkField.cs
- PropertyFilter.cs
- X509ChainPolicy.cs
- TdsParameterSetter.cs
- SuppressIldasmAttribute.cs
- oledbmetadatacolumnnames.cs
- NetworkCredential.cs
- WindowsEditBoxRange.cs
- RemoveStoryboard.cs
- VerticalAlignConverter.cs
- WebPartExportVerb.cs
- WebBrowserSiteBase.cs
- IPPacketInformation.cs
- CompareValidator.cs
- HtmlElementEventArgs.cs
- EnumMember.cs
- WizardPanel.cs
- altserialization.cs
- _UriSyntax.cs
- TextEffectResolver.cs
- MenuStrip.cs