Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataChangedEventManager.cs
- AppDomain.cs
- StyleSelector.cs
- BitFlagsGenerator.cs
- ControlTemplate.cs
- FileSecurity.cs
- MessageLogger.cs
- HostedImpersonationContext.cs
- PropertyDescriptors.cs
- XpsFilter.cs
- MessageBox.cs
- HuffmanTree.cs
- DictionaryKeyPropertyAttribute.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- TextStore.cs
- SchemaType.cs
- SettingsAttributes.cs
- PermissionListSet.cs
- Version.cs
- StrokeDescriptor.cs
- DataGridViewHeaderCell.cs
- FlowLayoutSettings.cs
- SqlWriter.cs
- AuthenticationModuleElement.cs
- Vector3DValueSerializer.cs
- EDesignUtil.cs
- Image.cs
- PersistNameAttribute.cs
- TransformerTypeCollection.cs
- NavigateUrlConverter.cs
- DesignerObject.cs
- ProxyFragment.cs
- CodeExpressionCollection.cs
- ConfigXmlElement.cs
- UrlPath.cs
- sqlnorm.cs
- AutoSizeToolBoxItem.cs
- InvokeMethodActivityDesigner.cs
- XamlStream.cs
- DataError.cs
- DataControlCommands.cs
- SudsParser.cs
- EdmProviderManifest.cs
- CultureInfoConverter.cs
- BaseCAMarshaler.cs
- EmptyEnumerator.cs
- CellConstant.cs
- RunWorkerCompletedEventArgs.cs
- StaticTextPointer.cs
- DataGridViewRow.cs
- ExceptionHelpers.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- EmbeddedMailObjectsCollection.cs
- RadioButton.cs
- AssemblyNameProxy.cs
- SwitchElementsCollection.cs
- PatternMatcher.cs
- LiteralControl.cs
- HTTPNotFoundHandler.cs
- ExpressionBuilder.cs
- _emptywebproxy.cs
- UIElement3D.cs
- GridViewAutomationPeer.cs
- DataGridViewImageCell.cs
- AsyncCompletedEventArgs.cs
- AlphaSortedEnumConverter.cs
- QueryAccessibilityHelpEvent.cs
- Monitor.cs
- DataGridViewCellParsingEventArgs.cs
- PipelineComponent.cs
- ThreadSafeList.cs
- FigureParaClient.cs
- MessageQueueInstaller.cs
- DefaultHttpHandler.cs
- PrintDialog.cs
- StylusSystemGestureEventArgs.cs
- SimpleFieldTemplateUserControl.cs
- SafeWaitHandle.cs
- Resources.Designer.cs
- dataprotectionpermission.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- OrderingQueryOperator.cs
- XmlQueryRuntime.cs
- ActivityXRefConverter.cs
- ToolStripGripRenderEventArgs.cs
- DocumentReferenceCollection.cs
- HtmlFormAdapter.cs
- DictionaryKeyPropertyAttribute.cs
- SpoolingTaskBase.cs
- TerminateWorkflow.cs
- M3DUtil.cs
- ExeContext.cs
- FlowDocumentView.cs
- SecurityPermission.cs
- BooleanAnimationBase.cs
- MessageSmuggler.cs
- StrongName.cs
- PageParserFilter.cs
- CodeDomConfigurationHandler.cs
- PopupEventArgs.cs