Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- HitTestWithGeometryDrawingContextWalker.cs
- XmlObjectSerializerWriteContext.cs
- QilTargetType.cs
- CookieParameter.cs
- DocumentGridPage.cs
- UnsafeNativeMethods.cs
- QueryCacheEntry.cs
- XmlSchemaSimpleContentRestriction.cs
- FlatButtonAppearance.cs
- FormViewPageEventArgs.cs
- util.cs
- ProgressChangedEventArgs.cs
- EntityDesignerDataSourceView.cs
- altserialization.cs
- streamingZipPartStream.cs
- ProtocolsSection.cs
- CustomErrorCollection.cs
- XmlSchemaSimpleType.cs
- ControlPaint.cs
- DesignerContextDescriptor.cs
- ThreadAttributes.cs
- _FtpControlStream.cs
- ToolStripTextBox.cs
- UpdateTracker.cs
- ToolStripSeparatorRenderEventArgs.cs
- FamilyMap.cs
- XmlDataSourceNodeDescriptor.cs
- DataSourceView.cs
- ProtocolsConfiguration.cs
- HwndAppCommandInputProvider.cs
- State.cs
- CompiledQueryCacheKey.cs
- RangeBaseAutomationPeer.cs
- ObfuscateAssemblyAttribute.cs
- DataGridViewRowStateChangedEventArgs.cs
- DataStreams.cs
- filewebrequest.cs
- SoapSchemaImporter.cs
- XamlVector3DCollectionSerializer.cs
- Help.cs
- UnicastIPAddressInformationCollection.cs
- ObjectListTitleAttribute.cs
- AliasExpr.cs
- FormViewDeleteEventArgs.cs
- ComponentCommands.cs
- CollectionConverter.cs
- HebrewCalendar.cs
- InputProcessorProfiles.cs
- ContentAlignmentEditor.cs
- TreeViewItem.cs
- DynamicRendererThreadManager.cs
- Invariant.cs
- ISO2022Encoding.cs
- IDispatchConstantAttribute.cs
- TypeNameParser.cs
- TaskFormBase.cs
- EdmEntityTypeAttribute.cs
- GPPOINTF.cs
- SortDescription.cs
- CommandValueSerializer.cs
- DbInsertCommandTree.cs
- Debugger.cs
- CryptoStream.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- DebugHandleTracker.cs
- PointLightBase.cs
- XPathChildIterator.cs
- CaseInsensitiveComparer.cs
- TextRangeEditLists.cs
- TypeUnloadedException.cs
- BitmapEffectDrawingContextState.cs
- X509AsymmetricSecurityKey.cs
- HMAC.cs
- TimeSpanValidatorAttribute.cs
- HyperLinkStyle.cs
- LineServicesRun.cs
- SQLGuid.cs
- ProgressBarRenderer.cs
- CmsUtils.cs
- XmlCountingReader.cs
- ApplicationSettingsBase.cs
- DataGridViewAccessibleObject.cs
- DBCommand.cs
- ProxyElement.cs
- HtmlWindow.cs
- Calendar.cs
- CompressStream.cs
- ThumbAutomationPeer.cs
- SHA384.cs
- SmtpNetworkElement.cs
- ParsedAttributeCollection.cs
- NavigateEvent.cs
- CompressionTransform.cs
- QueryResponse.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- PageThemeCodeDomTreeGenerator.cs
- RuleDefinitions.cs
- SQLDecimalStorage.cs
- CapabilitiesUse.cs
- HttpRuntime.cs