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
- CookieHandler.cs
- LockCookie.cs
- MergeFailedEvent.cs
- WebPartHeaderCloseVerb.cs
- LayoutTableCell.cs
- StaticResourceExtension.cs
- HttpCachePolicyElement.cs
- TdsParserSessionPool.cs
- SiteMapNodeItemEventArgs.cs
- DescendantBaseQuery.cs
- TreeSet.cs
- SQLMoney.cs
- uribuilder.cs
- ImageFormatConverter.cs
- DocumentSequenceHighlightLayer.cs
- QilList.cs
- UIntPtr.cs
- DurableDispatcherAddressingFault.cs
- MetadataArtifactLoaderFile.cs
- EmptyEnumerable.cs
- WindowsFormsHelpers.cs
- PropertyStore.cs
- MobileTextWriter.cs
- DataGridViewCellPaintingEventArgs.cs
- Hashtable.cs
- GridViewRowCollection.cs
- ExpressionBuilder.cs
- Stack.cs
- RegexRunner.cs
- StandardOleMarshalObject.cs
- WebBaseEventKeyComparer.cs
- Dispatcher.cs
- CatalogPartDesigner.cs
- DataListItemCollection.cs
- FixedDSBuilder.cs
- HttpCapabilitiesSectionHandler.cs
- _CookieModule.cs
- ConfigDefinitionUpdates.cs
- ConditionCollection.cs
- SHA384Cng.cs
- SecurityElement.cs
- DataGridViewAutoSizeModeEventArgs.cs
- CapabilitiesSection.cs
- OrderByBuilder.cs
- MetadataSerializer.cs
- DesigntimeLicenseContext.cs
- PathSegment.cs
- AxParameterData.cs
- ProgressChangedEventArgs.cs
- CheckBox.cs
- PageSetupDialog.cs
- dataprotectionpermission.cs
- TrustLevelCollection.cs
- DocumentSchemaValidator.cs
- TabletDeviceInfo.cs
- MeshGeometry3D.cs
- RootNamespaceAttribute.cs
- PointLightBase.cs
- SqlResolver.cs
- UserPersonalizationStateInfo.cs
- PrintPreviewGraphics.cs
- XmlSchemaImporter.cs
- _TLSstream.cs
- WebPartManagerDesigner.cs
- StateBag.cs
- DefaultWorkflowTransactionService.cs
- BeginStoryboard.cs
- XamlTypeMapper.cs
- ModelUtilities.cs
- XPathSingletonIterator.cs
- FreezableDefaultValueFactory.cs
- SoapAttributeOverrides.cs
- ChannelOptions.cs
- ControlIdConverter.cs
- SqlUdtInfo.cs
- CompositeActivityTypeDescriptorProvider.cs
- BatchParser.cs
- InstanceOwnerException.cs
- localization.cs
- PropertyAccessVisitor.cs
- TextBounds.cs
- WebPartCatalogAddVerb.cs
- HighlightVisual.cs
- ParserStack.cs
- FileDialog_Vista.cs
- TypeInformation.cs
- PixelFormatConverter.cs
- ColorContextHelper.cs
- CommandID.cs
- DataRowComparer.cs
- ViewgenGatekeeper.cs
- DBCSCodePageEncoding.cs
- HtmlInputCheckBox.cs
- TrustDriver.cs
- Underline.cs
- EmbeddedMailObject.cs
- SchemaSetCompiler.cs
- PermissionListSet.cs
- DataSpaceManager.cs
- CompositeActivityMarkupSerializer.cs