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
- ConfigurationManagerInternal.cs
- PageCatalogPart.cs
- CodeSnippetExpression.cs
- JournalEntryListConverter.cs
- GeneralTransformCollection.cs
- SQLDateTime.cs
- DbProviderFactoriesConfigurationHandler.cs
- StructuredType.cs
- TextRangeEditTables.cs
- SoapAttributeAttribute.cs
- BuildManager.cs
- RoutedEventHandlerInfo.cs
- Math.cs
- CodeArgumentReferenceExpression.cs
- HtmlWindowCollection.cs
- InsufficientExecutionStackException.cs
- X509Utils.cs
- NullableDoubleSumAggregationOperator.cs
- UnsafeNativeMethods.cs
- CodeEntryPointMethod.cs
- GAC.cs
- Soap.cs
- Parser.cs
- LicenseManager.cs
- NameValueSectionHandler.cs
- AttributeCallbackBuilder.cs
- RsaSecurityKey.cs
- WinFormsComponentEditor.cs
- SqlDelegatedTransaction.cs
- GridViewCommandEventArgs.cs
- TableParagraph.cs
- ButtonBaseAutomationPeer.cs
- VerticalAlignConverter.cs
- InheritanceContextHelper.cs
- SocketPermission.cs
- Roles.cs
- OSFeature.cs
- GridViewSelectEventArgs.cs
- AutomationPatternInfo.cs
- cookiecontainer.cs
- BindingMemberInfo.cs
- ApplicationInfo.cs
- ConfigurationUtility.cs
- CompositeActivityTypeDescriptor.cs
- Directory.cs
- XmlLanguage.cs
- ClientFormsIdentity.cs
- HtmlInputText.cs
- TypeListConverter.cs
- XmlReflectionMember.cs
- TemporaryBitmapFile.cs
- WmlTextViewAdapter.cs
- WizardPanelChangingEventArgs.cs
- InstanceOwnerQueryResult.cs
- DockPattern.cs
- XmlAnyElementAttributes.cs
- PhoneCall.cs
- FormsAuthenticationEventArgs.cs
- OracleDataReader.cs
- ConvertersCollection.cs
- DataTableClearEvent.cs
- HtmlTable.cs
- Menu.cs
- BookmarkEventArgs.cs
- Timer.cs
- WeakReference.cs
- ScriptReferenceBase.cs
- AttributeProviderAttribute.cs
- GroupDescription.cs
- SqlCacheDependency.cs
- ObjectDataSourceDisposingEventArgs.cs
- Span.cs
- TreeNodeMouseHoverEvent.cs
- CloudCollection.cs
- Types.cs
- SmiContext.cs
- FilterEventArgs.cs
- XamlPointCollectionSerializer.cs
- ReachIDocumentPaginatorSerializer.cs
- InvalidPipelineStoreException.cs
- DispatchWrapper.cs
- UxThemeWrapper.cs
- SkewTransform.cs
- ComAdminWrapper.cs
- ProfileProvider.cs
- XmlTextWriter.cs
- XmlUrlResolver.cs
- RuntimeWrappedException.cs
- BaseTreeIterator.cs
- PhoneCall.cs
- MappingMetadataHelper.cs
- TextRange.cs
- HttpHandlerActionCollection.cs
- XmlILModule.cs
- Stroke.cs
- Control.cs
- TextElementEditingBehaviorAttribute.cs
- UiaCoreApi.cs
- FormsAuthentication.cs
- ObjRef.cs