Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- InputLanguageSource.cs
- ExclusiveTcpListener.cs
- DbDataAdapter.cs
- XmlAnyAttributeAttribute.cs
- Bits.cs
- GeneralTransform.cs
- ItemsPresenter.cs
- FocusTracker.cs
- BamlBinaryWriter.cs
- RemoteWebConfigurationHostStream.cs
- BooleanExpr.cs
- AccessDataSourceView.cs
- CodeAttributeArgumentCollection.cs
- DataFormat.cs
- ArraySet.cs
- LeaseManager.cs
- AmbiguousMatchException.cs
- HtmlFormWrapper.cs
- PreviewKeyDownEventArgs.cs
- WebPartsPersonalizationAuthorization.cs
- DbConnectionStringBuilder.cs
- DispatcherEventArgs.cs
- StateBag.cs
- Itemizer.cs
- DataGridViewColumnEventArgs.cs
- XmlUtilWriter.cs
- ObjRef.cs
- Membership.cs
- TextRange.cs
- IsolatedStorageFileStream.cs
- IISMapPath.cs
- Point3DCollection.cs
- BooleanToVisibilityConverter.cs
- AdapterDictionary.cs
- HotSpotCollection.cs
- PersonalizationProviderHelper.cs
- ipaddressinformationcollection.cs
- ConnectionConsumerAttribute.cs
- DescriptionAttribute.cs
- designeractionlistschangedeventargs.cs
- MemberNameValidator.cs
- ProcessInputEventArgs.cs
- DesignerTransactionCloseEvent.cs
- ISAPIRuntime.cs
- NamespaceCollection.cs
- InterleavedZipPartStream.cs
- InternalsVisibleToAttribute.cs
- Substitution.cs
- MessageFault.cs
- XmlObjectSerializerWriteContext.cs
- DataFormat.cs
- DocumentPageHost.cs
- WindowsSysHeader.cs
- Converter.cs
- TextMarkerSource.cs
- ViewGenerator.cs
- StructuredCompositeActivityDesigner.cs
- ComEventsHelper.cs
- ApplicationException.cs
- SafePEFileHandle.cs
- LightweightCodeGenerator.cs
- Ticks.cs
- ManualResetEventSlim.cs
- XmlIgnoreAttribute.cs
- WebPartConnectionCollection.cs
- ImageAnimator.cs
- UseLicense.cs
- FilteredXmlReader.cs
- DurationConverter.cs
- KeyTimeConverter.cs
- SystemIPInterfaceProperties.cs
- XmlNamedNodeMap.cs
- XmlQueryStaticData.cs
- CommandField.cs
- NullableIntAverageAggregationOperator.cs
- TextBounds.cs
- TreeNodeStyleCollection.cs
- Validator.cs
- XmlSerializationGeneratedCode.cs
- ObjectViewFactory.cs
- LoginName.cs
- TemplateComponentConnector.cs
- XmlQueryOutput.cs
- OdbcHandle.cs
- SqlNotificationRequest.cs
- DependencyObjectProvider.cs
- DoubleIndependentAnimationStorage.cs
- WmlImageAdapter.cs
- DataGridViewTextBoxCell.cs
- DataTemplateSelector.cs
- SeekStoryboard.cs
- UndoManager.cs
- MethodImplAttribute.cs
- ContentElement.cs
- CqlErrorHelper.cs
- Double.cs
- PropertyMetadata.cs
- OpCellTreeNode.cs
- SQLBytesStorage.cs
- ManagedIStream.cs