Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UnmanagedMemoryStreamWrapper.cs
- ReaderWriterLockWrapper.cs
- ExpressionSelection.cs
- xmlsaver.cs
- FontFamilyValueSerializer.cs
- TransactionWaitAsyncResult.cs
- AsymmetricSecurityProtocolFactory.cs
- BaseCodePageEncoding.cs
- Object.cs
- DescendentsWalkerBase.cs
- TerminateSequenceResponse.cs
- GPPOINTF.cs
- SplineQuaternionKeyFrame.cs
- QilGeneratorEnv.cs
- StaticSiteMapProvider.cs
- SchemaRegistration.cs
- TemplateContentLoader.cs
- DeleteMemberBinder.cs
- EditorZone.cs
- CompilerGlobalScopeAttribute.cs
- ViewCellSlot.cs
- WebBrowser.cs
- StreamSecurityUpgradeProvider.cs
- HtmlControl.cs
- Identity.cs
- Latin1Encoding.cs
- StrokeNodeOperations.cs
- ISFClipboardData.cs
- JavaScriptObjectDeserializer.cs
- SiblingIterators.cs
- ConfigXmlAttribute.cs
- MetadataUtilsSmi.cs
- SendMailErrorEventArgs.cs
- UnhandledExceptionEventArgs.cs
- DataGridViewColumnHeaderCell.cs
- SecurityResources.cs
- MetadataArtifactLoaderCompositeResource.cs
- NullableConverter.cs
- WorkflowDesignerMessageFilter.cs
- CollectionExtensions.cs
- Win32KeyboardDevice.cs
- AdPostCacheSubstitution.cs
- TransformConverter.cs
- ParallelTimeline.cs
- XmlHierarchicalEnumerable.cs
- DeriveBytes.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- MdImport.cs
- DataTableMapping.cs
- XmlUtil.cs
- StorageSetMapping.cs
- Interlocked.cs
- ObjectViewListener.cs
- Tokenizer.cs
- TrackingProfileCache.cs
- NullableIntMinMaxAggregationOperator.cs
- HighlightComponent.cs
- DesignerSerializerAttribute.cs
- DesignerSerializationOptionsAttribute.cs
- RestHandler.cs
- PerfCounters.cs
- ColorConvertedBitmap.cs
- Application.cs
- StringInfo.cs
- SymmetricKeyWrap.cs
- TableLayoutSettings.cs
- ArraySubsetEnumerator.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- MetaTable.cs
- DBCommand.cs
- ActivityXRefConverter.cs
- HttpServerChannel.cs
- InternalCompensate.cs
- Baml2006ReaderSettings.cs
- DialogWindow.cs
- PersonalizationProvider.cs
- EventsTab.cs
- LineVisual.cs
- Int32Collection.cs
- InternalBase.cs
- SubpageParagraph.cs
- BaseDataListComponentEditor.cs
- WinInetCache.cs
- XmlILIndex.cs
- MaterializeFromAtom.cs
- PassportAuthenticationModule.cs
- CodeDirectiveCollection.cs
- InputBuffer.cs
- LocalValueEnumerator.cs
- Accessors.cs
- SQLInt32Storage.cs
- StackBuilderSink.cs
- GregorianCalendarHelper.cs
- Parsers.cs
- DoWhileDesigner.xaml.cs
- TextDpi.cs
- TraceAsyncResult.cs
- RemotingConfigParser.cs
- PolicyUnit.cs
- DataGridViewIntLinkedList.cs