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
- XmlNamespaceDeclarationsAttribute.cs
- SizeF.cs
- PropertyChange.cs
- MimeBasePart.cs
- TabControlEvent.cs
- RegexNode.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ListControlDataBindingHandler.cs
- SqlXml.cs
- ClientSession.cs
- ThreadStaticAttribute.cs
- ContainerFilterService.cs
- ViewLoader.cs
- PeerNameRecord.cs
- Light.cs
- ProtectedProviderSettings.cs
- ListItem.cs
- IisTraceWebEventProvider.cs
- FixedStringLookup.cs
- UIPropertyMetadata.cs
- SchemaImporterExtension.cs
- ISAPIWorkerRequest.cs
- TargetInvocationException.cs
- WebPartZoneBaseDesigner.cs
- DelimitedListTraceListener.cs
- WebPartTransformer.cs
- DynamicQueryableWrapper.cs
- FileLogRecordEnumerator.cs
- PeerService.cs
- LinqDataSourceStatusEventArgs.cs
- InstalledFontCollection.cs
- WebScriptServiceHost.cs
- CAGDesigner.cs
- HttpCachePolicy.cs
- ComponentDispatcherThread.cs
- FormViewUpdateEventArgs.cs
- BackStopAuthenticationModule.cs
- ProfileInfo.cs
- HighlightComponent.cs
- DynamicDataRouteHandler.cs
- GuidelineCollection.cs
- ZipIOExtraFieldElement.cs
- CatchDesigner.xaml.cs
- Inline.cs
- filewebrequest.cs
- WindowsFormsHostPropertyMap.cs
- DivideByZeroException.cs
- AffineTransform3D.cs
- DBDataPermissionAttribute.cs
- PenLineCapValidation.cs
- ContentTextAutomationPeer.cs
- DataKeyArray.cs
- IntegerValidator.cs
- ConstructorArgumentAttribute.cs
- WCFModelStrings.Designer.cs
- StringConverter.cs
- XmlNodeReader.cs
- DataGridViewSelectedCellCollection.cs
- XmlUtil.cs
- DefaultAssemblyResolver.cs
- ServiceOperationWrapper.cs
- Point4D.cs
- StringCollection.cs
- WebDisplayNameAttribute.cs
- ReadOnlyMetadataCollection.cs
- FileCodeGroup.cs
- StreamReader.cs
- ReferencedCollectionType.cs
- SqlXmlStorage.cs
- FlowDocumentPageViewerAutomationPeer.cs
- EventLogQuery.cs
- MarkupObject.cs
- ParagraphResult.cs
- HtmlTitle.cs
- EntityDataSourceView.cs
- FlowDocumentScrollViewer.cs
- UseLicense.cs
- AssemblyName.cs
- GridViewSortEventArgs.cs
- DataPager.cs
- XmlConvert.cs
- ActivityCodeDomSerializationManager.cs
- PatternMatcher.cs
- SqlRetyper.cs
- TwoPhaseCommitProxy.cs
- AutomationPropertyChangedEventArgs.cs
- NonVisualControlAttribute.cs
- IApplicationTrustManager.cs
- JournalNavigationScope.cs
- QilParameter.cs
- PropertyTabChangedEvent.cs
- ComPlusDiagnosticTraceRecords.cs
- WebPartConnectionCollection.cs
- Label.cs
- DesignerView.xaml.cs
- RuntimeWrappedException.cs
- DataGridViewCell.cs
- DispatcherTimer.cs
- ParserHooks.cs
- SctClaimSerializer.cs