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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEditorCopyPaste.cs
- XpsThumbnail.cs
- SqlColumnizer.cs
- Focus.cs
- ExpandCollapseProviderWrapper.cs
- SecurityUtils.cs
- MatrixCamera.cs
- SerializationInfo.cs
- XmlSchemaSimpleType.cs
- MatrixCamera.cs
- Queue.cs
- sqlpipe.cs
- SqlWorkflowPersistenceService.cs
- BroadcastEventHelper.cs
- UIElement.cs
- ContextMenuStrip.cs
- OpenFileDialog.cs
- UTF32Encoding.cs
- UnsafeNativeMethodsTablet.cs
- DataControlReferenceCollection.cs
- XPathDescendantIterator.cs
- TitleStyle.cs
- PointHitTestParameters.cs
- TransformerTypeCollection.cs
- SmiMetaData.cs
- ReflectionHelper.cs
- NodeInfo.cs
- SqlXmlStorage.cs
- HostSecurityManager.cs
- WebPartHeaderCloseVerb.cs
- ActivityWithResultConverter.cs
- SplayTreeNode.cs
- VideoDrawing.cs
- NumericPagerField.cs
- ObjectQuery_EntitySqlExtensions.cs
- XmlnsPrefixAttribute.cs
- AppDomain.cs
- MessageHeader.cs
- DomNameTable.cs
- InternalRelationshipCollection.cs
- KeyedCollection.cs
- StylusShape.cs
- BadImageFormatException.cs
- XmlElementAttribute.cs
- Enum.cs
- TabItemWrapperAutomationPeer.cs
- StringComparer.cs
- UnsafeMethods.cs
- OdbcEnvironment.cs
- FacetEnabledSchemaElement.cs
- AsymmetricSignatureDeformatter.cs
- BindingsCollection.cs
- RtfNavigator.cs
- FunctionQuery.cs
- SqlConnectionManager.cs
- FrameworkElementFactoryMarkupObject.cs
- XsltInput.cs
- BaseAddressPrefixFilterElementCollection.cs
- MemberNameValidator.cs
- JsonQueryStringConverter.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- GrowingArray.cs
- WebPartConnectVerb.cs
- ShaderEffect.cs
- CompilerResults.cs
- UnsafeNativeMethods.cs
- XmlNodeReader.cs
- Composition.cs
- CodeTypeDeclaration.cs
- VirtualPath.cs
- controlskin.cs
- FontWeightConverter.cs
- ColumnReorderedEventArgs.cs
- DataServices.cs
- Int32Animation.cs
- LinqToSqlWrapper.cs
- XmlParserContext.cs
- XmlSerializableReader.cs
- CodeDomComponentSerializationService.cs
- WmfPlaceableFileHeader.cs
- TimeSpanMinutesConverter.cs
- CatalogZoneBase.cs
- XmlMapping.cs
- ToolStripItemGlyph.cs
- ReflectionPermission.cs
- DesignUtil.cs
- DataBindingCollectionConverter.cs
- TileModeValidation.cs
- CqlBlock.cs
- LineMetrics.cs
- ListItemViewAttribute.cs
- ContainerActivationHelper.cs
- ItemList.cs
- QualifierSet.cs
- RequiredFieldValidator.cs
- CircleHotSpot.cs
- Duration.cs
- ContainerCodeDomSerializer.cs
- ListManagerBindingsCollection.cs
- WebBrowsableAttribute.cs