Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Validator.cs
- StyleSelector.cs
- BuildProvider.cs
- Random.cs
- Interop.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- Listbox.cs
- SqlDataSourceView.cs
- XmlQueryContext.cs
- TextProperties.cs
- TypeRestriction.cs
- ForeignConstraint.cs
- GPRECTF.cs
- ColumnReorderedEventArgs.cs
- WebControl.cs
- ButtonChrome.cs
- InteropBitmapSource.cs
- ButtonFlatAdapter.cs
- XmlTypeMapping.cs
- Range.cs
- RectangleHotSpot.cs
- ColorContext.cs
- CodeTypeDeclaration.cs
- DeviceContext.cs
- OpenFileDialog.cs
- ApplicationFileParser.cs
- HttpRequest.cs
- RelOps.cs
- FixedPageStructure.cs
- TextServicesProperty.cs
- ErrorActivity.cs
- NegotiationTokenAuthenticator.cs
- UpDownEvent.cs
- RadioButtonAutomationPeer.cs
- SafeNativeMethods.cs
- DataGridItem.cs
- LicenseContext.cs
- WebConfigurationHostFileChange.cs
- CalendarTable.cs
- HMACSHA1.cs
- infer.cs
- PrincipalPermission.cs
- UriScheme.cs
- InteropExecutor.cs
- FormDesigner.cs
- LinqDataSourceDeleteEventArgs.cs
- FrameworkRichTextComposition.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- BamlCollectionHolder.cs
- EventProvider.cs
- ObjectStorage.cs
- Activity.cs
- MsmqVerifier.cs
- HitTestFilterBehavior.cs
- GridViewUpdatedEventArgs.cs
- Roles.cs
- CompilerLocalReference.cs
- EntityKeyElement.cs
- System.Data_BID.cs
- Highlights.cs
- ReadOnlyMetadataCollection.cs
- SqlTrackingQuery.cs
- CommandBindingCollection.cs
- SqlAliaser.cs
- PassportIdentity.cs
- TcpChannelHelper.cs
- BitmapEffectDrawingContextWalker.cs
- EncryptedHeaderXml.cs
- FixedSOMSemanticBox.cs
- BinaryKeyIdentifierClause.cs
- DataGridViewImageCell.cs
- ConstrainedGroup.cs
- PersistenceContext.cs
- X509CertificateClaimSet.cs
- XmlSignatureManifest.cs
- SetStoryboardSpeedRatio.cs
- CollectionBase.cs
- DependencyProperty.cs
- MimeReflector.cs
- PartialTrustVisibleAssemblyCollection.cs
- CodeMethodReturnStatement.cs
- TextEditorLists.cs
- DynamicExpression.cs
- ReadOnlyCollectionBase.cs
- DataGridViewAutoSizeModeEventArgs.cs
- UIInitializationException.cs
- MessageFault.cs
- SHA256.cs
- TextElementEditingBehaviorAttribute.cs
- ComboBox.cs
- RequestTimeoutManager.cs
- XamlToRtfWriter.cs
- SqlDependency.cs
- DataColumnChangeEvent.cs
- FloaterParaClient.cs
- PrintController.cs
- ShutDownListener.cs
- PropertyInformation.cs
- StylusPointPropertyInfoDefaults.cs
- SafeLibraryHandle.cs