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
- MailMessageEventArgs.cs
- Missing.cs
- CheckedListBox.cs
- RootBuilder.cs
- UnsafeNativeMethods.cs
- ValidatingReaderNodeData.cs
- URLIdentityPermission.cs
- EntityViewGenerator.cs
- RuntimeWrappedException.cs
- Exceptions.cs
- PersistChildrenAttribute.cs
- SamlSecurityToken.cs
- RuntimeEnvironment.cs
- SvcFileManager.cs
- PackageStore.cs
- InstancePersistenceException.cs
- SecurityDescriptor.cs
- ConsoleCancelEventArgs.cs
- ISCIIEncoding.cs
- Attributes.cs
- Input.cs
- ObjectTypeMapping.cs
- HtmlElementErrorEventArgs.cs
- RectangleConverter.cs
- StylusButtonCollection.cs
- PointConverter.cs
- HtmlForm.cs
- ObjectDataSourceStatusEventArgs.cs
- FreezableDefaultValueFactory.cs
- VisualStates.cs
- VideoDrawing.cs
- XmlLinkedNode.cs
- AdapterSwitches.cs
- QilInvoke.cs
- CompositeCollection.cs
- EdmConstants.cs
- DropShadowEffect.cs
- Transform3DGroup.cs
- BindingMemberInfo.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- EncoderParameter.cs
- WebReference.cs
- EventProviderClassic.cs
- UdpContractFilterBehavior.cs
- XmlValidatingReaderImpl.cs
- XmlWrappingWriter.cs
- UpdateTracker.cs
- Typography.cs
- ThreadInterruptedException.cs
- SqlClientWrapperSmiStream.cs
- ValidatorCollection.cs
- DynamicUpdateCommand.cs
- SqlXmlStorage.cs
- DocumentPage.cs
- CodeCompiler.cs
- InvalidProgramException.cs
- SubqueryRules.cs
- RotateTransform.cs
- Socket.cs
- ChangePassword.cs
- CodeGroup.cs
- ScriptComponentDescriptor.cs
- ItemList.cs
- DependencyObject.cs
- WindowPattern.cs
- DataGridViewButtonColumn.cs
- sqlstateclientmanager.cs
- FixedSOMLineRanges.cs
- SchemeSettingElement.cs
- WebPartManagerInternals.cs
- XmlSchemaGroup.cs
- DisplayMemberTemplateSelector.cs
- QilXmlReader.cs
- ModelUtilities.cs
- OptimalTextSource.cs
- MemberInitExpression.cs
- XNameTypeConverter.cs
- GeneratedContractType.cs
- HttpRuntime.cs
- BamlBinaryWriter.cs
- ProcessingInstructionAction.cs
- mactripleDES.cs
- SuspendDesigner.cs
- RightsManagementProvider.cs
- UrlAuthFailedErrorFormatter.cs
- WebServiceHostFactory.cs
- AddingNewEventArgs.cs
- ConfigurationStrings.cs
- ToolTipService.cs
- RenderContext.cs
- HtmlTableCellCollection.cs
- XmlNamespaceMapping.cs
- DocobjHost.cs
- ChameleonKey.cs
- SqlBooleanMismatchVisitor.cs
- Cursors.cs
- X509UI.cs
- GetCertificateRequest.cs
- FillBehavior.cs
- BitmapCodecInfoInternal.cs