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
- mil_commands.cs
- TextRenderer.cs
- GroupItemAutomationPeer.cs
- ObjectListItemCollection.cs
- ContentOperations.cs
- HttpHandlerActionCollection.cs
- StrokeCollection.cs
- Types.cs
- ToolStripSeparatorRenderEventArgs.cs
- LiteralControl.cs
- WindowsSlider.cs
- PropertyMapper.cs
- BinaryFormatterSinks.cs
- NativeCppClassAttribute.cs
- DataGridHeaderBorder.cs
- Math.cs
- TypeGeneratedEventArgs.cs
- CommandPlan.cs
- PeerNameRecordCollection.cs
- ObfuscateAssemblyAttribute.cs
- SchemaImporterExtension.cs
- FuncCompletionCallbackWrapper.cs
- DisplayInformation.cs
- GlobalizationSection.cs
- SplashScreen.cs
- AsyncOperationManager.cs
- WebBaseEventKeyComparer.cs
- XmlQualifiedName.cs
- BindingGroup.cs
- WindowShowOrOpenTracker.cs
- CachingHintValidation.cs
- Base64Encoding.cs
- Memoizer.cs
- Control.cs
- SimpleHandlerFactory.cs
- PeerName.cs
- CollectionBuilder.cs
- SimplePropertyEntry.cs
- TypedRowGenerator.cs
- MethodBody.cs
- BitVec.cs
- SqlConnectionFactory.cs
- ImageCodecInfo.cs
- ProfilePropertyMetadata.cs
- KeyGestureValueSerializer.cs
- AccessDataSource.cs
- ASCIIEncoding.cs
- AttachedAnnotationChangedEventArgs.cs
- TextRangeBase.cs
- ValidationSummary.cs
- ShaderEffect.cs
- Wizard.cs
- Line.cs
- TypedReference.cs
- NetworkInformationPermission.cs
- CodeTryCatchFinallyStatement.cs
- HierarchicalDataBoundControlAdapter.cs
- FocusTracker.cs
- ProbeDuplexAsyncResult.cs
- NumberFormatInfo.cs
- ProviderConnectionPoint.cs
- EntryWrittenEventArgs.cs
- OutputCache.cs
- DictionarySectionHandler.cs
- IndexedSelectQueryOperator.cs
- PersonalizableTypeEntry.cs
- _NTAuthentication.cs
- contentDescriptor.cs
- CodeMemberField.cs
- WMIInterop.cs
- DeferredSelectedIndexReference.cs
- XpsS0ValidatingLoader.cs
- NGCSerializationManager.cs
- ConfigurationElementProperty.cs
- MenuBase.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- columnmapfactory.cs
- InkSerializer.cs
- VarInfo.cs
- Calendar.cs
- ExceptionList.cs
- UserControlBuildProvider.cs
- PartitionResolver.cs
- TextServicesDisplayAttributePropertyRanges.cs
- VectorCollectionConverter.cs
- Blend.cs
- Rotation3D.cs
- IndentedWriter.cs
- RoleManagerEventArgs.cs
- ProcessHostFactoryHelper.cs
- PrintingPermission.cs
- KeyInfo.cs
- GridViewSelectEventArgs.cs
- FaultReasonText.cs
- AutoResetEvent.cs
- GatewayIPAddressInformationCollection.cs
- CryptoConfig.cs
- SqlAliaser.cs
- StructuredProperty.cs
- DocumentReferenceCollection.cs