Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- MissingMemberException.cs
- DataGridToolTip.cs
- SoapHeaders.cs
- BaseTemplateParser.cs
- PrintSchema.cs
- ReflectionPermission.cs
- CommonXSendMessage.cs
- _TimerThread.cs
- GridViewDeleteEventArgs.cs
- ValueUtilsSmi.cs
- OdbcReferenceCollection.cs
- FormsAuthenticationUserCollection.cs
- SafeNativeMethods.cs
- CoTaskMemSafeHandle.cs
- WinInet.cs
- RowType.cs
- MemberDescriptor.cs
- HandlerBase.cs
- Keywords.cs
- ClassicBorderDecorator.cs
- _ListenerResponseStream.cs
- GorillaCodec.cs
- ResourceAssociationSetEnd.cs
- WebPartActionVerb.cs
- C14NUtil.cs
- HttpCookie.cs
- SqlGatherConsumedAliases.cs
- ControlValuePropertyAttribute.cs
- OleDbError.cs
- DataGridPreparingCellForEditEventArgs.cs
- NodeLabelEditEvent.cs
- TypedRowGenerator.cs
- ScrollContentPresenter.cs
- SharedStatics.cs
- EntityDataSourceSelectedEventArgs.cs
- RegistrySecurity.cs
- LifetimeServices.cs
- InvokeGenerator.cs
- EventProxy.cs
- DataGridViewCellCancelEventArgs.cs
- WebPartVerb.cs
- OdbcFactory.cs
- SecurityResources.cs
- MessageQueueKey.cs
- TextBoxLine.cs
- webclient.cs
- Base64Encoder.cs
- PublishLicense.cs
- DataRecordInfo.cs
- PageEventArgs.cs
- DynamicHyperLink.cs
- AssignDesigner.xaml.cs
- DataGridViewRowPrePaintEventArgs.cs
- DrawingGroupDrawingContext.cs
- MouseGesture.cs
- CodeRegionDirective.cs
- BaseProcessor.cs
- Inline.cs
- InvokeMethod.cs
- NativeMethodsCLR.cs
- ObjectList.cs
- SqlProviderManifest.cs
- ToolStrip.cs
- ImageKeyConverter.cs
- QilReference.cs
- DrawingImage.cs
- FormViewModeEventArgs.cs
- RoleExceptions.cs
- XmlDataSource.cs
- ConfigurationManager.cs
- Site.cs
- InkCollectionBehavior.cs
- SynchronizedDispatch.cs
- OpenCollectionAsyncResult.cs
- IndexOutOfRangeException.cs
- StrokeCollection2.cs
- HttpApplicationFactory.cs
- GC.cs
- MemberBinding.cs
- CompilationUnit.cs
- WindowsHyperlink.cs
- SEHException.cs
- Int32.cs
- DbParameterCollection.cs
- XomlCompiler.cs
- StreamReader.cs
- SourceFileBuildProvider.cs
- handlecollector.cs
- DataTableMapping.cs
- Listbox.cs
- TrackBar.cs
- TakeOrSkipQueryOperator.cs
- FocusChangedEventArgs.cs
- XmlNodeChangedEventArgs.cs
- DragEvent.cs
- DataColumn.cs
- ReadOnlyDictionary.cs
- EdmRelationshipRoleAttribute.cs
- XAMLParseException.cs
- DataGridRowsPresenter.cs