Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / WebSysDefaultValueAttribute.cs / 1 / WebSysDefaultValueAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web { using System; using System.ComponentModel; [AttributeUsage(AttributeTargets.All)] internal sealed class WebSysDefaultValueAttribute : DefaultValueAttribute { private Type _type; private bool _localized; internal WebSysDefaultValueAttribute(Type type, string value) : base(value) { _type = type; } internal WebSysDefaultValueAttribute(string value) : base(value) { } public override object TypeId { get { return typeof(DefaultValueAttribute); } } public override object Value { get { if (!_localized) { _localized = true; string baseValue = (string)base.Value; if (!String.IsNullOrEmpty(baseValue)) { object value = SR.GetString(baseValue); if (_type != null) { try { value = TypeDescriptor.GetConverter(_type).ConvertFromInvariantString((string) value); } catch (NotSupportedException) { value = null; } } base.SetValue(value); } } return base.Value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web { using System; using System.ComponentModel; [AttributeUsage(AttributeTargets.All)] internal sealed class WebSysDefaultValueAttribute : DefaultValueAttribute { private Type _type; private bool _localized; internal WebSysDefaultValueAttribute(Type type, string value) : base(value) { _type = type; } internal WebSysDefaultValueAttribute(string value) : base(value) { } public override object TypeId { get { return typeof(DefaultValueAttribute); } } public override object Value { get { if (!_localized) { _localized = true; string baseValue = (string)base.Value; if (!String.IsNullOrEmpty(baseValue)) { object value = SR.GetString(baseValue); if (_type != null) { try { value = TypeDescriptor.GetConverter(_type).ConvertFromInvariantString((string) value); } catch (NotSupportedException) { value = null; } } base.SetValue(value); } } return base.Value; } } } } // 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
- ConfigurationStrings.cs
- Site.cs
- WorkflowControlEndpoint.cs
- WindowsContainer.cs
- TextEditor.cs
- TraceProvider.cs
- linebase.cs
- GridViewRowCollection.cs
- GcSettings.cs
- PropertySourceInfo.cs
- SqlDataSourceRefreshSchemaForm.cs
- WindowsStatusBar.cs
- ComponentChangingEvent.cs
- ObjectMemberMapping.cs
- Window.cs
- IDictionary.cs
- NotifyParentPropertyAttribute.cs
- PKCS1MaskGenerationMethod.cs
- SemanticResultValue.cs
- OutOfProcStateClientManager.cs
- MultiBindingExpression.cs
- NullableBoolConverter.cs
- DateTimeConverter.cs
- SendSecurityHeaderElement.cs
- PropertyKey.cs
- StringFunctions.cs
- XPathNavigatorKeyComparer.cs
- ADMembershipProvider.cs
- ListItemParagraph.cs
- RegisteredHiddenField.cs
- SystemUdpStatistics.cs
- RecognizerInfo.cs
- UserControlBuildProvider.cs
- XmlArrayItemAttributes.cs
- BitmapSourceSafeMILHandle.cs
- XamlRtfConverter.cs
- IdentityValidationException.cs
- SafeNativeMethods.cs
- SymmetricKeyWrap.cs
- ControlAdapter.cs
- EntityDataSourceSelectedEventArgs.cs
- CommonRemoteMemoryBlock.cs
- XpsFixedPageReaderWriter.cs
- ToolStripHighContrastRenderer.cs
- EntityDataSourceState.cs
- NotifyIcon.cs
- VSWCFServiceContractGenerator.cs
- DataControlFieldCell.cs
- _AutoWebProxyScriptWrapper.cs
- XmlObjectSerializerWriteContextComplex.cs
- BinaryWriter.cs
- AssociationSetEnd.cs
- PnrpPeerResolverBindingElement.cs
- EndpointInfoCollection.cs
- BuildProviderCollection.cs
- InputLanguageManager.cs
- DrawingContext.cs
- IndexingContentUnit.cs
- SelectionProcessor.cs
- CreateUserWizard.cs
- CodeCatchClauseCollection.cs
- clipboard.cs
- COM2ExtendedBrowsingHandler.cs
- AccessKeyManager.cs
- NumberSubstitution.cs
- FigureHelper.cs
- ClonableStack.cs
- TriState.cs
- AnnotationResource.cs
- PageStatePersister.cs
- DynamicActionMessageFilter.cs
- PartitionResolver.cs
- FormViewModeEventArgs.cs
- Camera.cs
- IndentedWriter.cs
- HtmlInputImage.cs
- ObjectView.cs
- FunctionDetailsReader.cs
- ScriptIgnoreAttribute.cs
- Helpers.cs
- PathFigure.cs
- BaseConfigurationRecord.cs
- InstanceKeyCompleteException.cs
- LabelTarget.cs
- ThemeableAttribute.cs
- Light.cs
- TabControlAutomationPeer.cs
- MembershipValidatePasswordEventArgs.cs
- Table.cs
- DeferredReference.cs
- SelectionProcessor.cs
- DataGridLinkButton.cs
- DropSourceBehavior.cs
- ApplicationProxyInternal.cs
- JournalEntry.cs
- RemoteWebConfigurationHostServer.cs
- SmtpCommands.cs
- ProfileGroupSettings.cs
- RadioButtonStandardAdapter.cs
- DrawListViewSubItemEventArgs.cs