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
- SettingsProperty.cs
- Image.cs
- FontStyles.cs
- PropertyItem.cs
- LocatorPartList.cs
- XmlUtil.cs
- IsolatedStorage.cs
- ToolboxItemFilterAttribute.cs
- TextBoxRenderer.cs
- ReverseInheritProperty.cs
- SqlRewriteScalarSubqueries.cs
- WeakReferenceKey.cs
- WorkflowTransactionOptions.cs
- RepeaterItem.cs
- HitTestDrawingContextWalker.cs
- ResourcesChangeInfo.cs
- UInt32Converter.cs
- ProtocolsConfigurationEntry.cs
- StreamUpdate.cs
- DisplayNameAttribute.cs
- RelationshipDetailsRow.cs
- DESCryptoServiceProvider.cs
- AmbientLight.cs
- RenderContext.cs
- DocumentPageViewAutomationPeer.cs
- InternalPermissions.cs
- TableLayout.cs
- CustomGrammar.cs
- RegexBoyerMoore.cs
- exports.cs
- AstNode.cs
- XmlEnumAttribute.cs
- AmbientProperties.cs
- MetadataFile.cs
- HttpContextBase.cs
- TextChangedEventArgs.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ItemCollectionEditor.cs
- MULTI_QI.cs
- AlternateViewCollection.cs
- TrackBar.cs
- LogPolicy.cs
- EmbossBitmapEffect.cs
- FloaterParagraph.cs
- ManagedIStream.cs
- XmlWhitespace.cs
- XNodeNavigator.cs
- KerberosSecurityTokenAuthenticator.cs
- QueryRewriter.cs
- GeometryCombineModeValidation.cs
- InkCanvasSelectionAdorner.cs
- FontFamily.cs
- MaskedTextBoxDesigner.cs
- ConfigXmlCDataSection.cs
- XmlTextWriter.cs
- EntityContainer.cs
- SqlInfoMessageEvent.cs
- CharAnimationUsingKeyFrames.cs
- SecuritySessionFilter.cs
- HttpRequest.cs
- StateMachineExecutionState.cs
- Directory.cs
- EntityStoreSchemaGenerator.cs
- CommandLineParser.cs
- FilteredSchemaElementLookUpTable.cs
- LOSFormatter.cs
- Polygon.cs
- SingleAnimationUsingKeyFrames.cs
- TextTreeTextNode.cs
- DependencyPropertyValueSerializer.cs
- XmlReflectionMember.cs
- ConfigXmlText.cs
- LineSegment.cs
- ListMarkerLine.cs
- CheckPair.cs
- MissingMethodException.cs
- OleDbConnectionFactory.cs
- BindableTemplateBuilder.cs
- NullableDecimalMinMaxAggregationOperator.cs
- ApplicationDirectoryMembershipCondition.cs
- ProgressPage.cs
- BinaryObjectInfo.cs
- ConstructorExpr.cs
- Label.cs
- Adorner.cs
- Memoizer.cs
- DispatcherTimer.cs
- DemultiplexingDispatchMessageFormatter.cs
- Journaling.cs
- OdbcErrorCollection.cs
- SchemaImporter.cs
- DbConnectionPoolCounters.cs
- EmptyEnumerable.cs
- ProxyWebPartConnectionCollection.cs
- TextEndOfLine.cs
- FormViewModeEventArgs.cs
- SynchronizationLockException.cs
- VirtualDirectoryMapping.cs
- DetailsView.cs
- PrincipalPermission.cs