Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XAMLParseException.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- BrowserInteropHelper.cs
- WebPartCatalogAddVerb.cs
- TypeDelegator.cs
- TrustManagerPromptUI.cs
- TypeListConverter.cs
- BamlRecordWriter.cs
- CompilerCollection.cs
- ReflectionUtil.cs
- Win32.cs
- ComponentResourceKeyConverter.cs
- WebPartDisplayModeCollection.cs
- DataGridViewComboBoxColumn.cs
- EdmConstants.cs
- AnnotationDocumentPaginator.cs
- WmfPlaceableFileHeader.cs
- BitmapFrameDecode.cs
- TypeGeneratedEventArgs.cs
- EndOfStreamException.cs
- Events.cs
- SystemUdpStatistics.cs
- compensatingcollection.cs
- EventsTab.cs
- SqlWorkflowInstanceStoreLock.cs
- WebControl.cs
- PageClientProxyGenerator.cs
- EntityDataSourceStatementEditor.cs
- ToolStripLocationCancelEventArgs.cs
- TextAction.cs
- HttpInputStream.cs
- CodeCatchClause.cs
- AnnotationComponentManager.cs
- EventDescriptorCollection.cs
- MethodSignatureGenerator.cs
- AnimationStorage.cs
- EqualityComparer.cs
- ComponentRenameEvent.cs
- SqlUtils.cs
- ExpressionBuilder.cs
- IIS7UserPrincipal.cs
- HtmlUtf8RawTextWriter.cs
- WriterOutput.cs
- DebugInfo.cs
- PriorityBindingExpression.cs
- HtmlTextArea.cs
- WorkerRequest.cs
- AdornedElementPlaceholder.cs
- SystemUnicastIPAddressInformation.cs
- DependencyPropertyChangedEventArgs.cs
- WebPartConnectionsCloseVerb.cs
- CookielessHelper.cs
- ContractListAdapter.cs
- ProviderConnectionPointCollection.cs
- ObjectDataSource.cs
- pingexception.cs
- MimeWriter.cs
- Binding.cs
- DecoderFallback.cs
- _ProxyChain.cs
- WindowsPen.cs
- DropSource.cs
- UIPermission.cs
- ConstructorBuilder.cs
- DataGridViewImageCell.cs
- followingquery.cs
- DocumentViewerConstants.cs
- StylusPointPropertyInfo.cs
- PageEventArgs.cs
- DurationConverter.cs
- ZipIOLocalFileDataDescriptor.cs
- ExpressionPrefixAttribute.cs
- MailDefinition.cs
- WindowClosedEventArgs.cs
- CompModHelpers.cs
- DbParameterHelper.cs
- CertificateManager.cs
- ReflectionUtil.cs
- WindowsAuthenticationEventArgs.cs
- ChangeNode.cs
- IndexedGlyphRun.cs
- EventlogProvider.cs
- DesignTimeParseData.cs
- AppModelKnownContentFactory.cs
- ProgressBarHighlightConverter.cs
- RotationValidation.cs
- LassoHelper.cs
- InheritedPropertyChangedEventArgs.cs
- bidPrivateBase.cs
- ValidationSummary.cs
- Queue.cs
- TabletDevice.cs
- SequenceFullException.cs
- SimpleWorkerRequest.cs
- SamlAuthorizationDecisionStatement.cs
- MatrixTransform.cs
- TreeChangeInfo.cs
- DesignerHelpers.cs
- MouseGestureValueSerializer.cs
- PageFunction.cs