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
- UriScheme.cs
- Image.cs
- WebGetAttribute.cs
- LoaderAllocator.cs
- DocumentPageTextView.cs
- X509SubjectKeyIdentifierClause.cs
- WmpBitmapEncoder.cs
- TextDecorationCollection.cs
- LocatorManager.cs
- ViewCellRelation.cs
- ProjectionAnalyzer.cs
- X509ServiceCertificateAuthenticationElement.cs
- SemaphoreFullException.cs
- IOThreadTimer.cs
- TrustSection.cs
- RegionIterator.cs
- StatusBar.cs
- GridViewPageEventArgs.cs
- TreeNodeSelectionProcessor.cs
- SqlUDTStorage.cs
- CodeConditionStatement.cs
- ResourceDescriptionAttribute.cs
- ImportOptions.cs
- SynchronizationLockException.cs
- AddInProcess.cs
- DetailsViewDeletedEventArgs.cs
- OleServicesContext.cs
- DrawingGroup.cs
- UriExt.cs
- RepeatInfo.cs
- PropertyChangeTracker.cs
- MSAAWinEventWrap.cs
- RelOps.cs
- SqlDataSourceTableQuery.cs
- DecimalAnimation.cs
- CatalogPartCollection.cs
- OperationInfo.cs
- MailWriter.cs
- DigestComparer.cs
- ArrayList.cs
- WCFServiceClientProxyGenerator.cs
- _NegoStream.cs
- BitVector32.cs
- TableSectionStyle.cs
- DataGrid.cs
- XmlWrappingReader.cs
- arc.cs
- URLIdentityPermission.cs
- MD5CryptoServiceProvider.cs
- UnmanagedHandle.cs
- DateBoldEvent.cs
- SimpleRecyclingCache.cs
- ComponentManagerBroker.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ICspAsymmetricAlgorithm.cs
- InputLangChangeEvent.cs
- ConfigXmlWhitespace.cs
- RtType.cs
- CacheChildrenQuery.cs
- SecurityRequiresReviewAttribute.cs
- PolicyChain.cs
- ColorBlend.cs
- ThrowHelper.cs
- DispatcherProcessingDisabled.cs
- uribuilder.cs
- CreateUserWizardAutoFormat.cs
- ModulesEntry.cs
- ChannelFactory.cs
- _Rfc2616CacheValidators.cs
- CodeBinaryOperatorExpression.cs
- CodeExpressionCollection.cs
- KeyValuePair.cs
- TokenBasedSetEnumerator.cs
- XmlConvert.cs
- MultipartIdentifier.cs
- InputScopeManager.cs
- RegistryConfigurationProvider.cs
- Int32AnimationBase.cs
- CodeDelegateCreateExpression.cs
- RequestResizeEvent.cs
- ConfigurationSection.cs
- TextBoxAutomationPeer.cs
- PathSegment.cs
- DocumentReferenceCollection.cs
- SqlInfoMessageEvent.cs
- MaskedTextProvider.cs
- messageonlyhwndwrapper.cs
- BufferedStream.cs
- HtmlElementCollection.cs
- DataGridViewHitTestInfo.cs
- ItemsControl.cs
- HttpConfigurationContext.cs
- XmlAggregates.cs
- DataContractSerializerOperationGenerator.cs
- DynamicQueryableWrapper.cs
- WebPartDisplayModeEventArgs.cs
- PeerInvitationResponse.cs
- DbExpressionVisitor.cs
- HebrewNumber.cs
- Update.cs