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
- XmlAutoDetectWriter.cs
- HtmlSelect.cs
- ConfigurationLocationCollection.cs
- SqlTriggerContext.cs
- UtilityExtension.cs
- DesignerForm.cs
- TdsParameterSetter.cs
- CodeTypeDelegate.cs
- FixedDocumentSequencePaginator.cs
- Executor.cs
- Focus.cs
- ResourceContainerWrapper.cs
- ReservationCollection.cs
- ConfigurationException.cs
- XmlAttributeOverrides.cs
- Menu.cs
- ProviderConnectionPointCollection.cs
- PersistenceTypeAttribute.cs
- EllipseGeometry.cs
- Stacktrace.cs
- LineBreakRecord.cs
- MetadataPropertyAttribute.cs
- RtfToXamlReader.cs
- DesignerMetadata.cs
- HttpClientProtocol.cs
- PlainXmlSerializer.cs
- PolicyLevel.cs
- JapaneseCalendar.cs
- ForwardPositionQuery.cs
- BrowserCapabilitiesFactoryBase.cs
- ClientType.cs
- AnnotationDocumentPaginator.cs
- BinaryFormatterSinks.cs
- KeyInfo.cs
- PathSegment.cs
- ErrorWebPart.cs
- CollectionViewGroup.cs
- AmbientValueAttribute.cs
- TableLayoutPanelResizeGlyph.cs
- ExpressionDumper.cs
- Listen.cs
- WebPartCancelEventArgs.cs
- DataStorage.cs
- TdsParserHelperClasses.cs
- HuffmanTree.cs
- LineBreak.cs
- StorageInfo.cs
- SortDescription.cs
- Context.cs
- AliasExpr.cs
- ISFClipboardData.cs
- ArrayWithOffset.cs
- ContentElement.cs
- CommonDialog.cs
- WCFModelStrings.Designer.cs
- FlowLayoutPanel.cs
- FirstMatchCodeGroup.cs
- SamlAuthenticationStatement.cs
- RegexBoyerMoore.cs
- Journaling.cs
- ConfigurationElement.cs
- QuadraticEase.cs
- InternalResources.cs
- PopOutPanel.cs
- SettingsSavedEventArgs.cs
- XmlSchemaRedefine.cs
- AstTree.cs
- _NTAuthentication.cs
- XmlSchemaExternal.cs
- EnterpriseServicesHelper.cs
- MiniCustomAttributeInfo.cs
- SystemColors.cs
- DataFieldCollectionEditor.cs
- BinHexDecoder.cs
- FileUtil.cs
- PersistenceProviderElement.cs
- AccessibleObject.cs
- _BufferOffsetSize.cs
- AssemblyName.cs
- WmlValidatorAdapter.cs
- BooleanStorage.cs
- OleDbDataAdapter.cs
- TableAutomationPeer.cs
- InvariantComparer.cs
- IriParsingElement.cs
- OutKeywords.cs
- _ListenerAsyncResult.cs
- SymmetricKeyWrap.cs
- XamlReader.cs
- Events.cs
- LinqDataSourceDisposeEventArgs.cs
- StateWorkerRequest.cs
- WindowsFormsSectionHandler.cs
- ScalarType.cs
- SynchronizationContext.cs
- Exception.cs
- DataControlImageButton.cs
- ResourcesChangeInfo.cs
- XPathException.cs
- AffineTransform3D.cs