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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ScriptResourceDefinition.cs
- SqlConnectionPoolGroupProviderInfo.cs
- StylusPointDescription.cs
- ByteStack.cs
- BindingWorker.cs
- StringResourceManager.cs
- JournalEntry.cs
- CompressionTransform.cs
- TemplateControlBuildProvider.cs
- LogArchiveSnapshot.cs
- CookieParameter.cs
- ProfileModule.cs
- OleDbConnectionInternal.cs
- EntityContainerEmitter.cs
- BackgroundWorker.cs
- HiddenFieldPageStatePersister.cs
- milexports.cs
- HttpServerVarsCollection.cs
- XmlNullResolver.cs
- Semaphore.cs
- FileUpload.cs
- ProxyAttribute.cs
- GroupJoinQueryOperator.cs
- BitmapPalettes.cs
- RecoverInstanceLocksCommand.cs
- ImageList.cs
- AppSettingsExpressionBuilder.cs
- Dispatcher.cs
- shaperfactory.cs
- RC2CryptoServiceProvider.cs
- BooleanKeyFrameCollection.cs
- LZCodec.cs
- EditorPart.cs
- ResourceProviderFactory.cs
- DataGridViewLinkCell.cs
- ImageFormat.cs
- ToolboxControl.cs
- XmlSchemaAttribute.cs
- XhtmlBasicTextViewAdapter.cs
- ExtensionDataObject.cs
- PasswordTextNavigator.cs
- ExtentJoinTreeNode.cs
- BindableAttribute.cs
- CheckPair.cs
- FunctionDescription.cs
- ReaderWriterLock.cs
- SourceFileBuildProvider.cs
- SqlBooleanizer.cs
- VectorValueSerializer.cs
- CollectionBase.cs
- ChangeNode.cs
- LogEntryHeaderv1Deserializer.cs
- HierarchicalDataTemplate.cs
- versioninfo.cs
- ProtocolViolationException.cs
- ButtonChrome.cs
- dataprotectionpermission.cs
- FormViewUpdatedEventArgs.cs
- MetadataFile.cs
- Constants.cs
- RowType.cs
- Enlistment.cs
- ContravarianceAdapter.cs
- SiteIdentityPermission.cs
- Repeater.cs
- DataGridTable.cs
- XMLSchema.cs
- ThousandthOfEmRealPoints.cs
- RepeaterItemCollection.cs
- SeverityFilter.cs
- IndicCharClassifier.cs
- Preprocessor.cs
- StylusEditingBehavior.cs
- ResourceWriter.cs
- HtmlPanelAdapter.cs
- TextDecoration.cs
- LineProperties.cs
- CompilerInfo.cs
- WebPartTracker.cs
- CodeSubDirectoriesCollection.cs
- TrackingWorkflowEventArgs.cs
- Point.cs
- TreeNodeEventArgs.cs
- CheckableControlBaseAdapter.cs
- EventMappingSettingsCollection.cs
- XPathParser.cs
- InstanceCreationEditor.cs
- Mutex.cs
- autovalidator.cs
- ReadOnlyActivityGlyph.cs
- WebScriptMetadataMessage.cs
- StylusPointCollection.cs
- SqlDependencyListener.cs
- UrlPath.cs
- CurrentChangedEventManager.cs
- AppearanceEditorPart.cs
- NameValueConfigurationCollection.cs
- SerializationIncompleteException.cs
- OleDbFactory.cs
- DaylightTime.cs