Code:
/ DotNET / DotNET / 8.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
- CodeDelegateInvokeExpression.cs
- ModuleBuilder.cs
- WebRequest.cs
- EntityDataSourceContainerNameItem.cs
- ClientOptions.cs
- DesignerObjectListAdapter.cs
- XmlHierarchyData.cs
- ImageBrush.cs
- DataGridHelper.cs
- Label.cs
- EditorReuseAttribute.cs
- ActivityMarkupSerializationProvider.cs
- ReadWriteSpinLock.cs
- PassportIdentity.cs
- sqlinternaltransaction.cs
- CopyEncoder.cs
- GenericTypeParameterBuilder.cs
- SmiEventSink.cs
- ReferencedAssemblyResolver.cs
- HttpCacheParams.cs
- CompiledScopeCriteria.cs
- ChangeNode.cs
- SqlRecordBuffer.cs
- AnnotationHighlightLayer.cs
- RawUIStateInputReport.cs
- ScrollableControl.cs
- Debug.cs
- ArglessEventHandlerProxy.cs
- InstanceNormalEvent.cs
- CatalogPart.cs
- PathGradientBrush.cs
- ToolboxItemCollection.cs
- FormViewUpdateEventArgs.cs
- DataViewSetting.cs
- OutputCacheSettingsSection.cs
- SocketException.cs
- ToolStripHighContrastRenderer.cs
- WebPartTransformerCollection.cs
- AttributeCallbackBuilder.cs
- StylusPlugin.cs
- XmlUtil.cs
- DispatcherObject.cs
- WorkflowInspectionServices.cs
- DataGridColumnStyleMappingNameEditor.cs
- ZipIOExtraFieldZip64Element.cs
- UnsafeCollabNativeMethods.cs
- XmlAttributes.cs
- SplineKeyFrames.cs
- ConfigurationStrings.cs
- RenderData.cs
- GreaterThan.cs
- SectionRecord.cs
- RepeatBehavior.cs
- IsolatedStorageFile.cs
- ThreadStateException.cs
- XamlToRtfWriter.cs
- EntityDataSourceChangedEventArgs.cs
- CompilerInfo.cs
- DateTimeOffset.cs
- UserPersonalizationStateInfo.cs
- MobileResource.cs
- HandleExceptionArgs.cs
- TargetConverter.cs
- querybuilder.cs
- TypeConverterValueSerializer.cs
- HierarchicalDataSourceIDConverter.cs
- IConvertible.cs
- WorkflowInlining.cs
- DesignerDataTableBase.cs
- HyperLink.cs
- Main.cs
- SqlUtils.cs
- ActivityStatusChangeEventArgs.cs
- WithStatement.cs
- DispatcherTimer.cs
- PolygonHotSpot.cs
- _DomainName.cs
- ErrorRuntimeConfig.cs
- ServiceMetadataPublishingElement.cs
- FocusWithinProperty.cs
- Polygon.cs
- TrustSection.cs
- XmlSchemaObjectCollection.cs
- TraceHandler.cs
- Quaternion.cs
- ProtocolsConfigurationHandler.cs
- EntryWrittenEventArgs.cs
- AuthStoreRoleProvider.cs
- OleDbMetaDataFactory.cs
- DocumentPageViewAutomationPeer.cs
- XamlTypeMapper.cs
- DynamicValueConverter.cs
- SEHException.cs
- XamlToRtfWriter.cs
- RSAOAEPKeyExchangeFormatter.cs
- CodeDelegateInvokeExpression.cs
- WebPageTraceListener.cs
- NamedObject.cs
- StrokeNodeOperations.cs
- WebAdminConfigurationHelper.cs