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
- TableCell.cs
- FrameworkObject.cs
- TargetInvocationException.cs
- DataColumn.cs
- HostProtectionException.cs
- CommandLibraryHelper.cs
- WrapPanel.cs
- TextEditorTyping.cs
- GridViewColumnHeaderAutomationPeer.cs
- CoTaskMemHandle.cs
- SqlBuffer.cs
- DecryptedHeader.cs
- hresults.cs
- XsltException.cs
- Single.cs
- OracleConnectionStringBuilder.cs
- ButtonPopupAdapter.cs
- FormsAuthenticationEventArgs.cs
- EntityConnectionStringBuilder.cs
- _LazyAsyncResult.cs
- DataGridViewButtonColumn.cs
- CodeObject.cs
- RecordConverter.cs
- HtmlSelect.cs
- SecureEnvironment.cs
- EntitySqlException.cs
- MenuItemBinding.cs
- DbConnectionPool.cs
- XPathNodeIterator.cs
- DataGridTable.cs
- ACL.cs
- AuthenticationServiceManager.cs
- DbDataSourceEnumerator.cs
- BaseUriHelper.cs
- SelectionPattern.cs
- DataGridBoolColumn.cs
- FormsAuthenticationUser.cs
- FormatterServices.cs
- MenuCommand.cs
- DataBindingList.cs
- AudioLevelUpdatedEventArgs.cs
- QueryGeneratorBase.cs
- ShapingEngine.cs
- SelectionHighlightInfo.cs
- StringReader.cs
- RemotingConfiguration.cs
- columnmapfactory.cs
- PageThemeCodeDomTreeGenerator.cs
- CellParagraph.cs
- HtmlAnchor.cs
- PasswordBoxAutomationPeer.cs
- SqlWorkflowPersistenceService.cs
- CodeLinePragma.cs
- TextDecoration.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- SamlDoNotCacheCondition.cs
- SharedStatics.cs
- ResourceDescriptionAttribute.cs
- MonthCalendar.cs
- CodeSubDirectory.cs
- CompressionTransform.cs
- PopOutPanel.cs
- IndexerNameAttribute.cs
- ProfilePropertyMetadata.cs
- WebPartExportVerb.cs
- ResumeStoryboard.cs
- CodeTypeDeclarationCollection.cs
- SchemaImporter.cs
- SerialReceived.cs
- RegistryPermission.cs
- LinqDataView.cs
- ByteAnimationBase.cs
- _ListenerAsyncResult.cs
- Positioning.cs
- SemanticResolver.cs
- RSAPKCS1SignatureFormatter.cs
- FieldNameLookup.cs
- ClientFormsAuthenticationCredentials.cs
- TimeStampChecker.cs
- RemotingAttributes.cs
- LabelLiteral.cs
- typedescriptorpermission.cs
- Freezable.cs
- RectangleGeometry.cs
- MultiPageTextView.cs
- ADMembershipUser.cs
- ColumnResizeUndoUnit.cs
- Socket.cs
- TextReader.cs
- DataListItemCollection.cs
- QueryParameter.cs
- EventLogEntryCollection.cs
- XmlChoiceIdentifierAttribute.cs
- WebRequest.cs
- SerializationAttributes.cs
- ToolStripKeyboardHandlingService.cs
- WindowHelperService.cs
- XmlObjectSerializerWriteContext.cs
- ConstructorNeedsTagAttribute.cs
- DivideByZeroException.cs