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
- RouteCollection.cs
- DBCommand.cs
- TranslateTransform3D.cs
- Encoder.cs
- XmlConvert.cs
- TimeSpanStorage.cs
- ControlPropertyNameConverter.cs
- ObjectStateFormatter.cs
- XmlSchemas.cs
- DragDrop.cs
- ApplicationFileParser.cs
- DynamicEndpointElement.cs
- ServicePointManager.cs
- RowUpdatedEventArgs.cs
- XpsS0ValidatingLoader.cs
- ProxyManager.cs
- ImageKeyConverter.cs
- ViewStateException.cs
- WebPartConnectionCollection.cs
- SerializationSectionGroup.cs
- ProcessHostConfigUtils.cs
- GridViewAutomationPeer.cs
- FixedSOMImage.cs
- RuleInfoComparer.cs
- ControlAdapter.cs
- PackWebResponse.cs
- RTLAwareMessageBox.cs
- AggregateNode.cs
- FileSystemInfo.cs
- EditorResources.cs
- OledbConnectionStringbuilder.cs
- ColumnReorderedEventArgs.cs
- StylusTip.cs
- ReturnType.cs
- ACE.cs
- CustomAttributeFormatException.cs
- ArgumentNullException.cs
- DateTimeConverter2.cs
- XmlNode.cs
- AsymmetricAlgorithm.cs
- ACL.cs
- CriticalExceptions.cs
- DBParameter.cs
- PseudoWebRequest.cs
- StrongName.cs
- BitmapImage.cs
- ECDiffieHellmanPublicKey.cs
- UMPAttributes.cs
- PageThemeParser.cs
- UnknownWrapper.cs
- EtwTrackingParticipant.cs
- CategoryValueConverter.cs
- ValueUnavailableException.cs
- AssemblyInfo.cs
- CapabilitiesState.cs
- GeneralTransform3D.cs
- ImportOptions.cs
- TextParagraph.cs
- ExpressionNode.cs
- ReadingWritingEntityEventArgs.cs
- GlyphsSerializer.cs
- BaseProcessProtocolHandler.cs
- SHA1.cs
- DelegateSerializationHolder.cs
- TextEditorSpelling.cs
- BaseTemplateParser.cs
- HttpException.cs
- EditorZoneBase.cs
- CompareInfo.cs
- StrokeDescriptor.cs
- PackageFilter.cs
- SystemParameters.cs
- DrawListViewSubItemEventArgs.cs
- AppSettingsReader.cs
- XmlILModule.cs
- UrlPropertyAttribute.cs
- TdsParserStaticMethods.cs
- VisualTreeUtils.cs
- CatalogPartCollection.cs
- ConnectionsZone.cs
- Lookup.cs
- TableRow.cs
- _FtpDataStream.cs
- ProxyWebPart.cs
- SequenceFullException.cs
- XPathNavigator.cs
- ControlType.cs
- XmlNodeChangedEventManager.cs
- RtfControls.cs
- AnimationTimeline.cs
- MatrixTransform.cs
- WSHttpTransportSecurityElement.cs
- CodePageEncoding.cs
- PiiTraceSource.cs
- MsmqIntegrationProcessProtocolHandler.cs
- IssuanceTokenProviderState.cs
- ImageFormatConverter.cs
- ListViewSortEventArgs.cs
- SQLDoubleStorage.cs
- BitStream.cs