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
- Encoder.cs
- BinaryMessageEncoder.cs
- ParentQuery.cs
- SqlCacheDependencyDatabaseCollection.cs
- CmsInterop.cs
- SQLSingle.cs
- VersionedStream.cs
- ServiceInstanceProvider.cs
- MultipleFilterMatchesException.cs
- SystemMulticastIPAddressInformation.cs
- connectionpool.cs
- XmlQueryRuntime.cs
- WindowCollection.cs
- BitmapFrame.cs
- SetUserLanguageRequest.cs
- ObjectConverter.cs
- WizardPanelChangingEventArgs.cs
- DependentList.cs
- _SslStream.cs
- ChameleonKey.cs
- VarRefManager.cs
- EasingKeyFrames.cs
- TCEAdapterGenerator.cs
- DrawingServices.cs
- ConfigurationElementProperty.cs
- NotImplementedException.cs
- SyndicationContent.cs
- TableLayoutSettingsTypeConverter.cs
- FileSystemEventArgs.cs
- ProjectionPlanCompiler.cs
- SqlUDTStorage.cs
- TextProviderWrapper.cs
- ReadOnlyPropertyMetadata.cs
- GeometryConverter.cs
- ImageSource.cs
- SystemColors.cs
- SafeFreeMibTable.cs
- CustomError.cs
- WebSysDisplayNameAttribute.cs
- DocumentReference.cs
- ObjectPersistData.cs
- SortableBindingList.cs
- QilStrConcatenator.cs
- UpdateTranslator.cs
- GridViewHeaderRowPresenter.cs
- HScrollBar.cs
- RegistrationServices.cs
- MatrixValueSerializer.cs
- ProxyWebPartConnectionCollection.cs
- ActivityCollectionMarkupSerializer.cs
- HttpContextServiceHost.cs
- BindingManagerDataErrorEventArgs.cs
- ElementProxy.cs
- TypeResolver.cs
- GeometryModel3D.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- SizeConverter.cs
- OleDbPermission.cs
- BamlCollectionHolder.cs
- StrongNameKeyPair.cs
- RelatedView.cs
- _NestedSingleAsyncResult.cs
- DispatcherTimer.cs
- FlowPosition.cs
- SspiNegotiationTokenAuthenticatorState.cs
- MailWriter.cs
- SessionParameter.cs
- ProcessHostMapPath.cs
- SoapHeader.cs
- CustomError.cs
- ViewStateException.cs
- PackageFilter.cs
- XamlDesignerSerializationManager.cs
- FileLogRecordStream.cs
- AuthorizationSection.cs
- SQLResource.cs
- DefinitionBase.cs
- ToolStripSystemRenderer.cs
- ProfileBuildProvider.cs
- ClientBuildManagerCallback.cs
- MachinePropertyVariants.cs
- MonthChangedEventArgs.cs
- JsonServiceDocumentSerializer.cs
- GB18030Encoding.cs
- WebPartPersonalization.cs
- D3DImage.cs
- SqlNodeAnnotation.cs
- SqlAggregateChecker.cs
- GridViewPageEventArgs.cs
- GridItemProviderWrapper.cs
- COM2Enum.cs
- UpdateInfo.cs
- ManagedIStream.cs
- TextWriterTraceListener.cs
- MenuItemBindingCollection.cs
- wgx_render.cs
- FuncCompletionCallbackWrapper.cs
- BinaryConverter.cs
- BaseProcessor.cs
- ManualResetEvent.cs