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
- VersionedStreamOwner.cs
- DoubleLink.cs
- UnicastIPAddressInformationCollection.cs
- WebPartEditorCancelVerb.cs
- DataList.cs
- ProcessModelInfo.cs
- CompatibleComparer.cs
- ToolstripProfessionalRenderer.cs
- WindowInteractionStateTracker.cs
- WebRequestModuleElement.cs
- WebBrowser.cs
- XPathDocument.cs
- Thickness.cs
- HttpServerVarsCollection.cs
- Condition.cs
- LayoutEditorPart.cs
- InputLangChangeRequestEvent.cs
- RequestQueryProcessor.cs
- ListViewSortEventArgs.cs
- BinHexEncoder.cs
- COM2PropertyPageUITypeConverter.cs
- ListViewCommandEventArgs.cs
- ManipulationVelocities.cs
- LineSegment.cs
- TimeSpanStorage.cs
- HighContrastHelper.cs
- CustomTypeDescriptor.cs
- ConfigurationManagerInternalFactory.cs
- RequestCachePolicy.cs
- XmlMapping.cs
- CannotUnloadAppDomainException.cs
- Debugger.cs
- WebPartManagerInternals.cs
- PathParser.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ResourceSetExpression.cs
- SerializationObjectManager.cs
- AssociationEndMember.cs
- AddressAlreadyInUseException.cs
- SecurityToken.cs
- PeerSecurityManager.cs
- TraceSection.cs
- MethodCallTranslator.cs
- StylusPoint.cs
- SQLByte.cs
- BufferedReadStream.cs
- QueryPageSettingsEventArgs.cs
- CompilerErrorCollection.cs
- DBCommand.cs
- TraceContext.cs
- AttributeAction.cs
- GridViewAutomationPeer.cs
- DefaultPropertiesToSend.cs
- SemaphoreFullException.cs
- SqlDuplicator.cs
- DeclarativeCatalogPart.cs
- FixedSOMGroup.cs
- ObjectStateManagerMetadata.cs
- ScriptingRoleServiceSection.cs
- DoubleCollectionValueSerializer.cs
- PersianCalendar.cs
- Utilities.cs
- ToolStripItemEventArgs.cs
- VirtualPath.cs
- BitmapMetadata.cs
- IISUnsafeMethods.cs
- TreeViewEvent.cs
- datacache.cs
- ExpandedWrapper.cs
- WebZone.cs
- XmlSchemaComplexContentExtension.cs
- TextSelection.cs
- ExpressionList.cs
- SqlIdentifier.cs
- WizardStepBase.cs
- DocumentReference.cs
- SetStateDesigner.cs
- Transform3DGroup.cs
- NativeActivityAbortContext.cs
- MemoryFailPoint.cs
- DataGridRow.cs
- ValidationErrorCollection.cs
- CalendarSelectionChangedEventArgs.cs
- WebPartEditVerb.cs
- SoapFormatterSinks.cs
- WindowsListBox.cs
- SimplePropertyEntry.cs
- BaseCollection.cs
- Events.cs
- ProgressBar.cs
- XmlSerializerOperationGenerator.cs
- TextWriter.cs
- ListContractAdapter.cs
- ChtmlPhoneCallAdapter.cs
- XPathSelfQuery.cs
- EncoderBestFitFallback.cs
- shaper.cs
- ArgumentValidation.cs
- FloatMinMaxAggregationOperator.cs
- StylusEventArgs.cs