Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / MultilineStringConverter.cs / 1305376 / 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
- StyleConverter.cs
- EntityWrapperFactory.cs
- CfgSemanticTag.cs
- WebScriptMetadataMessage.cs
- WebPartHeaderCloseVerb.cs
- TransportSecurityProtocol.cs
- IndividualDeviceConfig.cs
- PasswordTextNavigator.cs
- TypeCollectionPropertyEditor.cs
- xsdvalidator.cs
- TdsParserSessionPool.cs
- DataServiceQuery.cs
- WebServicesDescriptionAttribute.cs
- WebPartTransformerCollection.cs
- CodeGenHelper.cs
- DbParameterCollectionHelper.cs
- LinkTarget.cs
- TextFindEngine.cs
- TrackingMemoryStreamFactory.cs
- XmlSchemaType.cs
- StringFunctions.cs
- FindProgressChangedEventArgs.cs
- Geometry.cs
- XPathNavigator.cs
- TransportSecurityProtocolFactory.cs
- ImageSource.cs
- HtmlMeta.cs
- ExpressionNode.cs
- EventManager.cs
- UIElementPropertyUndoUnit.cs
- DataTemplate.cs
- WorkflowServiceHostFactory.cs
- InternalResources.cs
- GridViewCancelEditEventArgs.cs
- CommandConverter.cs
- EnumDataContract.cs
- WindowsScroll.cs
- DPCustomTypeDescriptor.cs
- RepeaterItemCollection.cs
- CultureSpecificStringDictionary.cs
- EntityDataSourceState.cs
- CompressionTransform.cs
- NoneExcludedImageIndexConverter.cs
- ToolbarAUtomationPeer.cs
- OdbcFactory.cs
- Queue.cs
- QueryStringParameter.cs
- Buffer.cs
- WebSysDisplayNameAttribute.cs
- SqlRetyper.cs
- DataGridCell.cs
- TypeDescriptor.cs
- AccessorTable.cs
- DataContractFormatAttribute.cs
- RegisteredHiddenField.cs
- ConfigurationSection.cs
- HotSpotCollection.cs
- ServiceHostingEnvironmentSection.cs
- CharacterMetricsDictionary.cs
- InputLangChangeEvent.cs
- WpfSharedBamlSchemaContext.cs
- IDReferencePropertyAttribute.cs
- ServiceContractListItem.cs
- ConnectionManagementSection.cs
- InsufficientMemoryException.cs
- TransformPattern.cs
- ColorConvertedBitmapExtension.cs
- ImageCodecInfo.cs
- KeySplineConverter.cs
- PlatformCulture.cs
- WebPartManager.cs
- SerializationStore.cs
- Maps.cs
- FocusManager.cs
- ConfigurationException.cs
- EventMappingSettings.cs
- TimeoutTimer.cs
- IdleTimeoutMonitor.cs
- ManagedWndProcTracker.cs
- _AutoWebProxyScriptEngine.cs
- CodePageUtils.cs
- FunctionMappingTranslator.cs
- UnaryNode.cs
- ActiveXContainer.cs
- JsonFaultDetail.cs
- FactoryMaker.cs
- ContextMenuStrip.cs
- SolidBrush.cs
- ToolStripSeparatorRenderEventArgs.cs
- AsymmetricSignatureFormatter.cs
- XmlNamedNodeMap.cs
- PresentationSource.cs
- TransformProviderWrapper.cs
- DocumentViewerBase.cs
- XmlSchemaInfo.cs
- XamlWriter.cs
- SafeCryptContextHandle.cs
- ButtonColumn.cs
- DataGridViewColumnStateChangedEventArgs.cs
- MsmqTransportSecurity.cs