Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / ResourceDefaultValueAttribute.cs / 1 / ResourceDefaultValueAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Reflection; using System.Web.Resources; [AttributeUsage(AttributeTargets.All)] internal sealed class ResourceDefaultValueAttribute : DefaultValueAttribute { private Type _type; private bool _resourceLoaded; internal ResourceDefaultValueAttribute(Type type, string value) : base(value) { _type = type; } internal ResourceDefaultValueAttribute(string value) : base(value) { } public override object TypeId { get { return typeof(DefaultValueAttribute); } } public override object Value { get { if (!_resourceLoaded) { _resourceLoaded = true; string baseValue = (string)base.Value; if (!String.IsNullOrEmpty(baseValue)) { object value = AtlasWeb.ResourceManager.GetString(baseValue, AtlasWeb.Culture); 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
- TargetParameterCountException.cs
- XmlSchemaProviderAttribute.cs
- MaskPropertyEditor.cs
- Parallel.cs
- UriScheme.cs
- FormViewUpdateEventArgs.cs
- XmlNotation.cs
- RSACryptoServiceProvider.cs
- MenuItemStyleCollection.cs
- DefaultPerformanceCounters.cs
- CodeTypeConstructor.cs
- TransactionProtocolConverter.cs
- HandleCollector.cs
- SQLBinaryStorage.cs
- RootCodeDomSerializer.cs
- SecurityCapabilities.cs
- AmbientValueAttribute.cs
- LineServicesRun.cs
- DesignerCalendarAdapter.cs
- BuilderPropertyEntry.cs
- DispatcherExceptionEventArgs.cs
- FixedDocument.cs
- EngineSite.cs
- HttpCookiesSection.cs
- MarginCollapsingState.cs
- GreaterThan.cs
- ContextActivityUtils.cs
- XmlSchemas.cs
- SoapProtocolReflector.cs
- SafeThreadHandle.cs
- CommentEmitter.cs
- _ProxyChain.cs
- ScrollEvent.cs
- JsonEnumDataContract.cs
- WindowsAuthenticationEventArgs.cs
- Util.cs
- SiteMapDataSource.cs
- DataGridCommandEventArgs.cs
- RangeBase.cs
- StorageFunctionMapping.cs
- XmlTextReaderImpl.cs
- HtmlInputHidden.cs
- SecurityException.cs
- ChannelSinkStacks.cs
- ClientConfigPaths.cs
- SettingsPropertyIsReadOnlyException.cs
- EventLogger.cs
- SortableBindingList.cs
- EarlyBoundInfo.cs
- WebHostedComPlusServiceHost.cs
- WebPartChrome.cs
- coordinator.cs
- ValidationHelper.cs
- SrgsElementList.cs
- VariableAction.cs
- XpsImageSerializationService.cs
- RemoteWebConfigurationHostStream.cs
- XmlSchemaValidator.cs
- HttpPostedFile.cs
- GlyphCache.cs
- _CacheStreams.cs
- WmlFormAdapter.cs
- XmlSecureResolver.cs
- ConditionValidator.cs
- RulePatternOps.cs
- DataStorage.cs
- SystemUdpStatistics.cs
- Window.cs
- CodeIterationStatement.cs
- CrossSiteScriptingValidation.cs
- LeaseManager.cs
- SelectQueryOperator.cs
- XmlCharType.cs
- MaxMessageSizeStream.cs
- PtsContext.cs
- Timeline.cs
- ApplicationSettingsBase.cs
- DateTimeEditor.cs
- GradientBrush.cs
- AsyncPostBackTrigger.cs
- TraceLevelStore.cs
- AsnEncodedData.cs
- SqlRecordBuffer.cs
- DataServiceResponse.cs
- PageClientProxyGenerator.cs
- Visitors.cs
- HtmlForm.cs
- LinkConverter.cs
- MediaScriptCommandRoutedEventArgs.cs
- PropertyEntry.cs
- MetadataItemEmitter.cs
- IIS7UserPrincipal.cs
- EditableTreeList.cs
- DnsCache.cs
- UnionCqlBlock.cs
- WCFServiceClientProxyGenerator.cs
- SetIndexBinder.cs
- Compress.cs
- ObjectDataSourceStatusEventArgs.cs
- DeferredTextReference.cs