Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- WithParamAction.cs
- HttpRequest.cs
- PersonalizationStateQuery.cs
- RolePrincipal.cs
- Pens.cs
- FixedPageStructure.cs
- SynchronizationContext.cs
- SplayTreeNode.cs
- StrokeIntersection.cs
- CatalogPart.cs
- HMACSHA256.cs
- DocumentsTrace.cs
- Rect3DConverter.cs
- ParenExpr.cs
- IsolatedStorageException.cs
- BooleanConverter.cs
- AnonymousIdentificationModule.cs
- AutoGeneratedField.cs
- BinaryParser.cs
- XmlSchemaSet.cs
- CheckBox.cs
- DesignerTransaction.cs
- _AcceptOverlappedAsyncResult.cs
- WeakEventManager.cs
- RenderDataDrawingContext.cs
- RoleManagerModule.cs
- FixedDocumentPaginator.cs
- figurelength.cs
- XmlSigningNodeWriter.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DbCommandTree.cs
- MergeEnumerator.cs
- XmlName.cs
- XmlKeywords.cs
- JsonEncodingStreamWrapper.cs
- ImageMetadata.cs
- BufferModeSettings.cs
- TypeBuilderInstantiation.cs
- CodeAttachEventStatement.cs
- DecoderFallback.cs
- RectIndependentAnimationStorage.cs
- SpanIndex.cs
- OracleTimeSpan.cs
- LinkedResource.cs
- StrokeSerializer.cs
- XmlSerializerOperationBehavior.cs
- ReliabilityContractAttribute.cs
- HttpRequest.cs
- CollectionView.cs
- DeferredReference.cs
- OdbcHandle.cs
- AsymmetricAlgorithm.cs
- DeclarativeCatalogPart.cs
- BaseTemplateParser.cs
- GeneralTransformGroup.cs
- BaseTransportHeaders.cs
- StateWorkerRequest.cs
- DefaultProxySection.cs
- SafePipeHandle.cs
- PerformanceCounterCategory.cs
- SystemShuttingDownException.cs
- TextTrailingWordEllipsis.cs
- MappingItemCollection.cs
- FrugalList.cs
- GridViewCancelEditEventArgs.cs
- DataGridViewToolTip.cs
- FileDetails.cs
- Pair.cs
- CreateRefExpr.cs
- QfeChecker.cs
- UntypedNullExpression.cs
- Rect.cs
- TabControlEvent.cs
- dataprotectionpermission.cs
- ResourceExpressionBuilder.cs
- ZipIOLocalFileHeader.cs
- SystemIPGlobalStatistics.cs
- ProtocolElement.cs
- SystemColorTracker.cs
- ChangeProcessor.cs
- WorkflowHostingEndpoint.cs
- CompleteWizardStep.cs
- PeerObject.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- ParenthesizePropertyNameAttribute.cs
- TextReader.cs
- FtpCachePolicyElement.cs
- UrlAuthorizationModule.cs
- EtwTrace.cs
- Exception.cs
- NotEqual.cs
- DynamicControlParameter.cs
- CategoryNameCollection.cs
- XmlSchemaValidationException.cs
- UnmanagedMemoryAccessor.cs
- TableParaClient.cs
- TextElement.cs
- RelationshipEntry.cs
- SharedUtils.cs
- APCustomTypeDescriptor.cs