Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ContainerSelectorBehavior.cs
- serverconfig.cs
- GPRECT.cs
- xsdvalidator.cs
- ErrorHandler.cs
- WinFormsSecurity.cs
- InvalidOleVariantTypeException.cs
- ToolStripButton.cs
- TileModeValidation.cs
- HostProtectionPermission.cs
- SafeSecurityHandles.cs
- StorageFunctionMapping.cs
- BreadCrumbTextConverter.cs
- URLAttribute.cs
- SecurityTokenAttachmentMode.cs
- TableLayoutPanelCellPosition.cs
- DmlSqlGenerator.cs
- DataGridPreparingCellForEditEventArgs.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- SqlDataSourceConfigureFilterForm.cs
- TrackingProfileSerializer.cs
- FormsAuthenticationEventArgs.cs
- RuntimeArgumentHandle.cs
- Scalars.cs
- ObjectIDGenerator.cs
- Transform3D.cs
- TableLayoutSettings.cs
- DataTemplateKey.cs
- SingleTagSectionHandler.cs
- TypeHelpers.cs
- SchemaNames.cs
- MulticastDelegate.cs
- SendKeys.cs
- FaultPropagationQuery.cs
- TextTabProperties.cs
- Rfc2898DeriveBytes.cs
- GenericTypeParameterBuilder.cs
- DesignerTransaction.cs
- DrawingContextDrawingContextWalker.cs
- PointF.cs
- ChooseAction.cs
- WebConfigManager.cs
- DefaultExpressionVisitor.cs
- StreamHelper.cs
- TableRow.cs
- SelfIssuedAuthProofToken.cs
- ArrayList.cs
- DriveInfo.cs
- HostingPreferredMapPath.cs
- ProcessHostServerConfig.cs
- Tuple.cs
- InternalBase.cs
- ElapsedEventArgs.cs
- SecurityPermission.cs
- SmtpFailedRecipientsException.cs
- QueryAccessibilityHelpEvent.cs
- ItemCheckedEvent.cs
- ExpandableObjectConverter.cs
- TimeSpanOrInfiniteValidator.cs
- TimerElapsedEvenArgs.cs
- URL.cs
- JoinElimination.cs
- SmtpReplyReaderFactory.cs
- HttpProfileBase.cs
- _HelperAsyncResults.cs
- InvalidFilterCriteriaException.cs
- _CacheStreams.cs
- ResourceProviderFactory.cs
- CodeSnippetTypeMember.cs
- LoginDesignerUtil.cs
- OLEDB_Util.cs
- ConsoleCancelEventArgs.cs
- SiteMapNodeCollection.cs
- WebServiceMethodData.cs
- Codec.cs
- X509UI.cs
- SplashScreen.cs
- SessionPageStateSection.cs
- DataGridCell.cs
- WindowsTreeView.cs
- ParameterCollection.cs
- Polyline.cs
- EndOfStreamException.cs
- GradientBrush.cs
- Control.cs
- CompositeFontFamily.cs
- MetadataProperty.cs
- OdbcInfoMessageEvent.cs
- StaticExtension.cs
- InvokePattern.cs
- AssemblyBuilder.cs
- DispatcherEventArgs.cs
- VisualTarget.cs
- SqlMultiplexer.cs
- InlineCollection.cs
- XmlCodeExporter.cs
- DataPagerCommandEventArgs.cs
- Evaluator.cs
- Rotation3DAnimationBase.cs
- Membership.cs