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
- HtmlHistory.cs
- TextReader.cs
- DataTableTypeConverter.cs
- RTLAwareMessageBox.cs
- CharAnimationBase.cs
- PersonalizationStateInfoCollection.cs
- PackUriHelper.cs
- httpapplicationstate.cs
- ViewLoader.cs
- TransformedBitmap.cs
- TextChange.cs
- EllipseGeometry.cs
- FormViewModeEventArgs.cs
- SystemIPGlobalStatistics.cs
- ThrowOnMultipleAssignment.cs
- TemplateBindingExtensionConverter.cs
- CaseInsensitiveHashCodeProvider.cs
- CollectionsUtil.cs
- WebControl.cs
- DateTimeParse.cs
- PropertyMapper.cs
- SelectionPatternIdentifiers.cs
- TextAction.cs
- OutOfProcStateClientManager.cs
- VariableQuery.cs
- GeneralTransformCollection.cs
- RegionInfo.cs
- SchemaElementDecl.cs
- ScriptReference.cs
- DragDeltaEventArgs.cs
- AnimationStorage.cs
- TrackingParameters.cs
- OdbcHandle.cs
- BypassElementCollection.cs
- DoubleLinkList.cs
- FontInfo.cs
- LocalFileSettingsProvider.cs
- LeaseManager.cs
- DefaultTypeArgumentAttribute.cs
- RsaSecurityKey.cs
- ExtensibleClassFactory.cs
- SimpleFileLog.cs
- SchemaImporter.cs
- EventEntry.cs
- MultiAsyncResult.cs
- IdentifierService.cs
- LoginView.cs
- DataBoundControl.cs
- AssemblyInfo.cs
- CompareInfo.cs
- SafeArrayRankMismatchException.cs
- CollectionViewGroup.cs
- LazyTextWriterCreator.cs
- CloudCollection.cs
- EnumMemberAttribute.cs
- WmlControlAdapter.cs
- ping.cs
- MonitoringDescriptionAttribute.cs
- XmlValueConverter.cs
- PKCS1MaskGenerationMethod.cs
- PermissionListSet.cs
- ServiceModelConfigurationSectionCollection.cs
- SafeFindHandle.cs
- ByteAnimation.cs
- EditingCoordinator.cs
- TreeViewImageIndexConverter.cs
- ExpressionParser.cs
- ParentUndoUnit.cs
- FormViewCommandEventArgs.cs
- TextClipboardData.cs
- ReadOnlyDictionary.cs
- ApplicationProxyInternal.cs
- AnnotationAdorner.cs
- OdbcConnectionFactory.cs
- BasicExpressionVisitor.cs
- ComponentManagerBroker.cs
- EntitySqlQueryCacheEntry.cs
- CollectionChangedEventManager.cs
- Utils.cs
- AuthenticationServiceManager.cs
- Point4D.cs
- RSACryptoServiceProvider.cs
- UniqueIdentifierService.cs
- HtmlElementCollection.cs
- ColumnWidthChangingEvent.cs
- HttpAsyncResult.cs
- RequestStatusBarUpdateEventArgs.cs
- WebPartConnectionsCancelEventArgs.cs
- NameHandler.cs
- XamlVector3DCollectionSerializer.cs
- Scene3D.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- sqlnorm.cs
- SmtpDigestAuthenticationModule.cs
- RectIndependentAnimationStorage.cs
- XmlSignificantWhitespace.cs
- GeneralTransform3D.cs
- DrawingContextWalker.cs
- Message.cs
- FixedSOMLineRanges.cs