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
- GroupStyle.cs
- ProfilePropertySettings.cs
- HScrollBar.cs
- InternalConfigHost.cs
- DebuggerService.cs
- RegexCharClass.cs
- SQLInt32Storage.cs
- Freezable.cs
- BufferedWebEventProvider.cs
- BindToObject.cs
- WebScriptMetadataMessage.cs
- PreservationFileReader.cs
- DataGridViewRowsRemovedEventArgs.cs
- OdbcException.cs
- XPathAxisIterator.cs
- ToolStripLocationCancelEventArgs.cs
- XmlCompatibilityReader.cs
- ReadOnlyActivityGlyph.cs
- AppDomainResourcePerfCounters.cs
- Rotation3DAnimationUsingKeyFrames.cs
- Converter.cs
- ElementFactory.cs
- WaitHandle.cs
- StrokeCollectionConverter.cs
- TrueReadOnlyCollection.cs
- PagesChangedEventArgs.cs
- FileDialogPermission.cs
- DataBinder.cs
- ChtmlTextWriter.cs
- ReadWriteSpinLock.cs
- PkcsUtils.cs
- MethodBuilderInstantiation.cs
- ContractTypeNameElement.cs
- SchemaInfo.cs
- CriticalHandle.cs
- XmlNamespaceDeclarationsAttribute.cs
- InternalsVisibleToAttribute.cs
- Crc32Helper.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- DataPointer.cs
- SqlDataSourceRefreshSchemaForm.cs
- DataSourceProvider.cs
- ToolStripDropDownClosingEventArgs.cs
- X509SecurityToken.cs
- WmlPageAdapter.cs
- ColumnMapVisitor.cs
- DocobjHost.cs
- TemplateBamlTreeBuilder.cs
- GestureRecognitionResult.cs
- StorageMappingItemCollection.cs
- CodeIterationStatement.cs
- DirectionalLight.cs
- TdsParserSessionPool.cs
- Byte.cs
- Fonts.cs
- VirtualDirectoryMapping.cs
- SelectedDatesCollection.cs
- ParameterCollection.cs
- TileBrush.cs
- InternalCache.cs
- ModelTreeEnumerator.cs
- GenericWebPart.cs
- KeySplineConverter.cs
- WebPartDescription.cs
- QuerySelectOp.cs
- AuthenticatedStream.cs
- PriorityQueue.cs
- DiscoveryClientReferences.cs
- Bezier.cs
- RelationshipEntry.cs
- TypeToken.cs
- WindowsEditBoxRange.cs
- SafeCertificateStore.cs
- HtmlInputPassword.cs
- SoapReflector.cs
- ErrorEventArgs.cs
- MoveSizeWinEventHandler.cs
- SurrogateSelector.cs
- SourceChangedEventArgs.cs
- QilDataSource.cs
- TrackBarRenderer.cs
- InvalidComObjectException.cs
- Keywords.cs
- BrowserCapabilitiesFactoryBase.cs
- ClientUtils.cs
- IHttpResponseInternal.cs
- clipboard.cs
- ParseHttpDate.cs
- OleDbConnectionInternal.cs
- TranslateTransform3D.cs
- StyleSheetDesigner.cs
- DefaultEventAttribute.cs
- StringAnimationUsingKeyFrames.cs
- XmlAttributeAttribute.cs
- UInt64Converter.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- XmlReaderSettings.cs
- CompositeScriptReference.cs
- XmlSecureResolver.cs
- ListViewTableRow.cs