Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / ThrowOnMultipleAssignment.cs / 1305376 / ThrowOnMultipleAssignment.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Selectors { using System; using Microsoft.InfoCards.Diagnostics; using IDT=Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary: // This class throws an Argument exception if an attempt is made to assign a non-null // value to the Value property more than once. // class ThrowOnMultipleAssignment{ string m_errorString; T m_value; public T Value { get { return m_value; } set { if( null != m_value && null != value ) { throw IDT.ThrowHelperArgument( m_errorString ); } else if( null == m_value ) { m_value = value; } } } // // Parameters: // errorString - If Value gets assigned to more than once an argument exception will be thrown with this // string as the Exception string. // public ThrowOnMultipleAssignment( string errorString ) { IDT.DebugAssert( !String.IsNullOrEmpty( errorString ), "Must have an error string" ); m_errorString = errorString; } } } // 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
- ExtenderHelpers.cs
- Vector3DValueSerializer.cs
- ErrorTableItemStyle.cs
- ImportCatalogPart.cs
- EntitySet.cs
- TemplateDefinition.cs
- AttributeCollection.cs
- PhonemeConverter.cs
- ResourcesChangeInfo.cs
- AttributeCollection.cs
- WebControl.cs
- TouchDevice.cs
- InputReport.cs
- RoleService.cs
- embossbitmapeffect.cs
- DriveInfo.cs
- GregorianCalendarHelper.cs
- FreezableCollection.cs
- SelfIssuedSamlTokenFactory.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- DependencySource.cs
- SslStream.cs
- CalendarDayButton.cs
- EncodingInfo.cs
- EmptyElement.cs
- ConfigurationManagerInternalFactory.cs
- XmlUrlEditor.cs
- SetState.cs
- thaishape.cs
- _ContextAwareResult.cs
- Int16KeyFrameCollection.cs
- ServiceDescriptions.cs
- XmlNullResolver.cs
- PrincipalPermission.cs
- EmbeddedMailObject.cs
- FontWeights.cs
- PauseStoryboard.cs
- TextBox.cs
- MetadataCache.cs
- DataGridCellClipboardEventArgs.cs
- InvalidProgramException.cs
- WebResponse.cs
- SafeTimerHandle.cs
- GenericTextProperties.cs
- JournalEntryStack.cs
- DataControlImageButton.cs
- DataGridViewCheckBoxCell.cs
- Stroke2.cs
- TextSchema.cs
- TextTreeTextElementNode.cs
- PrimarySelectionGlyph.cs
- StylusCaptureWithinProperty.cs
- ResourceCodeDomSerializer.cs
- PageSettings.cs
- WindowsGraphics.cs
- ReadOnlyCollectionBase.cs
- CommonDialog.cs
- TCPListener.cs
- OdbcRowUpdatingEvent.cs
- SqlDataSourceFilteringEventArgs.cs
- TableCellCollection.cs
- ExpandSegment.cs
- MemoryFailPoint.cs
- DBProviderConfigurationHandler.cs
- Models.cs
- MarkedHighlightComponent.cs
- SelectionEditingBehavior.cs
- ScriptResourceInfo.cs
- ParameterCollection.cs
- IntermediatePolicyValidator.cs
- ExpressionBuilder.cs
- SinglePhaseEnlistment.cs
- UserInitiatedNavigationPermission.cs
- ChangesetResponse.cs
- GenericEnumConverter.cs
- ToolboxComponentsCreatingEventArgs.cs
- XamlSerializationHelper.cs
- DataGridViewCell.cs
- TargetControlTypeCache.cs
- HtmlControl.cs
- TextWriter.cs
- ComponentEvent.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- CmsInterop.cs
- Rule.cs
- ControlBuilder.cs
- ScriptDescriptor.cs
- Stackframe.cs
- IsolationInterop.cs
- _MultipleConnectAsync.cs
- PromptStyle.cs
- ProgressChangedEventArgs.cs
- XpsDocumentEvent.cs
- RotateTransform.cs
- DataTemplate.cs
- CompiledQueryCacheEntry.cs
- ControlCollection.cs
- ExpressionPrinter.cs
- Thumb.cs
- ClientUrlResolverWrapper.cs