Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / VersionConverter.cs / 1305376 / VersionConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.ComponentModel; using System.Configuration; using System.Globalization; internal sealed class VersionConverter : ConfigurationConverterBase { public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { return new Version((string)value); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { var version = (Version)value; return version.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.ComponentModel; using System.Configuration; using System.Globalization; internal sealed class VersionConverter : ConfigurationConverterBase { public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { return new Version((string)value); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { var version = (Version)value; return version.ToString(); } } } // 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
- XmlUtil.cs
- ListViewGroupConverter.cs
- ColorKeyFrameCollection.cs
- DBConnectionString.cs
- ConnectionManagementElement.cs
- HtmlHistory.cs
- TextChange.cs
- Listen.cs
- _AutoWebProxyScriptEngine.cs
- GotoExpression.cs
- KeyConstraint.cs
- ColumnResizeAdorner.cs
- DocumentSchemaValidator.cs
- XPathException.cs
- ServerValidateEventArgs.cs
- PartitionResolver.cs
- TextFormatterContext.cs
- SoapIgnoreAttribute.cs
- _UriTypeConverter.cs
- _DisconnectOverlappedAsyncResult.cs
- MobileControl.cs
- BindableTemplateBuilder.cs
- ChangeNode.cs
- CodeTypeDeclarationCollection.cs
- BookmarkScopeInfo.cs
- ActivityXRefPropertyEditor.cs
- CommandBindingCollection.cs
- FixedLineResult.cs
- ContentControl.cs
- DrawingCollection.cs
- smtpconnection.cs
- TextSchema.cs
- FixedSOMTable.cs
- ISO2022Encoding.cs
- ConfigurationValidatorBase.cs
- UnaryExpression.cs
- LinearKeyFrames.cs
- EntitySqlQueryState.cs
- QilFactory.cs
- SamlConditions.cs
- GacUtil.cs
- BulletChrome.cs
- EdmPropertyAttribute.cs
- UidManager.cs
- TimelineGroup.cs
- EventProviderTraceListener.cs
- Configuration.cs
- DataControlField.cs
- RoleGroup.cs
- TemplateKey.cs
- WebResourceUtil.cs
- RijndaelCryptoServiceProvider.cs
- XmlSchemaInferenceException.cs
- TranslateTransform.cs
- TextDecorationCollection.cs
- ContextMenuService.cs
- RewritingProcessor.cs
- ProtocolsConfigurationHandler.cs
- DoubleUtil.cs
- ConfigurationSectionGroup.cs
- AuthenticationException.cs
- IncrementalReadDecoders.cs
- SamlConditions.cs
- EventSourceCreationData.cs
- LineServices.cs
- InvalidateEvent.cs
- FileEnumerator.cs
- documentsequencetextcontainer.cs
- OneOfTypeConst.cs
- ZoomPercentageConverter.cs
- ChameleonKey.cs
- DerivedKeySecurityTokenStub.cs
- DataGridViewMethods.cs
- ModuleElement.cs
- Sorting.cs
- Point3DConverter.cs
- BaseDataBoundControl.cs
- XmlSchemaSimpleTypeUnion.cs
- ContractCodeDomInfo.cs
- SafeThreadHandle.cs
- ValueProviderWrapper.cs
- StorageMappingFragment.cs
- Normalization.cs
- FormatterServices.cs
- SQLMoney.cs
- ToolStripActionList.cs
- SafeFileMapViewHandle.cs
- BaseParser.cs
- DispatcherTimer.cs
- RowsCopiedEventArgs.cs
- BrowserCapabilitiesFactory.cs
- Exception.cs
- GridPattern.cs
- RepeatBehavior.cs
- GenericXmlSecurityToken.cs
- MessageDecoder.cs
- AuthenticationService.cs
- DecoderBestFitFallback.cs
- InkCanvasFeedbackAdorner.cs
- FlagsAttribute.cs