Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / ResourceDefaultValueAttribute.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripGrip.cs
- TextProperties.cs
- DataSvcMapFileSerializer.cs
- MessagePropertyDescription.cs
- HtmlButton.cs
- MetabaseSettings.cs
- StyleSelector.cs
- HighContrastHelper.cs
- TrackBar.cs
- GestureRecognizer.cs
- BamlWriter.cs
- UnsafeNativeMethods.cs
- PngBitmapEncoder.cs
- HttpRequestCacheValidator.cs
- MetadataArtifactLoaderFile.cs
- MetadataArtifactLoader.cs
- AttachedPropertyInfo.cs
- PropertyDescriptorCollection.cs
- ApplicationManager.cs
- WebConfigurationFileMap.cs
- UnmanagedHandle.cs
- QilIterator.cs
- HandlerBase.cs
- DrawingGroup.cs
- FactoryRecord.cs
- SpellerHighlightLayer.cs
- WinFormsSecurity.cs
- QilDataSource.cs
- TcpProcessProtocolHandler.cs
- XmlDomTextWriter.cs
- TableRowCollection.cs
- JpegBitmapDecoder.cs
- ConvertEvent.cs
- UserControlBuildProvider.cs
- CollectionViewProxy.cs
- ExistsInCollection.cs
- PtsHost.cs
- KeyGestureConverter.cs
- HMACMD5.cs
- Win32Exception.cs
- HotCommands.cs
- CodeCompiler.cs
- OptimizerPatterns.cs
- Codec.cs
- TargetParameterCountException.cs
- XmlElementList.cs
- MatrixConverter.cs
- SafeNativeMethods.cs
- httpserverutility.cs
- EditorZone.cs
- NameValueCache.cs
- XPathNode.cs
- ViewGenResults.cs
- TakeQueryOptionExpression.cs
- Normalization.cs
- DocumentApplicationJournalEntry.cs
- Signature.cs
- ImplicitInputBrush.cs
- ApplicationDirectoryMembershipCondition.cs
- LinkClickEvent.cs
- BookmarkOptionsHelper.cs
- XmlProcessingInstruction.cs
- GridViewDeleteEventArgs.cs
- WebPartChrome.cs
- XNodeNavigator.cs
- CodePageUtils.cs
- ConnectionPointCookie.cs
- FormViewInsertEventArgs.cs
- Polyline.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- followingsibling.cs
- TemplatePropertyEntry.cs
- RelationshipConverter.cs
- ResourceKey.cs
- HandlerMappingMemo.cs
- CompositeActivityTypeDescriptorProvider.cs
- JsonWriterDelegator.cs
- DataGrid.cs
- SQlBooleanStorage.cs
- FontFamily.cs
- RequestSecurityTokenResponse.cs
- InvalidBodyAccessException.cs
- ToolboxDataAttribute.cs
- Cast.cs
- DbDataSourceEnumerator.cs
- SizeChangedInfo.cs
- DecimalAnimationUsingKeyFrames.cs
- MimePart.cs
- InternalDispatchObject.cs
- IdentityManager.cs
- SmiRequestExecutor.cs
- DataGridCellEditEndingEventArgs.cs
- SQLResource.cs
- HMACSHA1.cs
- UserControl.cs
- WebContext.cs
- externdll.cs
- ResourceDisplayNameAttribute.cs
- LayoutEditorPart.cs
- TabItemWrapperAutomationPeer.cs