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
- XmlDictionaryWriter.cs
- ReverseQueryOperator.cs
- String.cs
- SiteMembershipCondition.cs
- AffineTransform3D.cs
- SettingsPropertyCollection.cs
- LinkClickEvent.cs
- TreeNode.cs
- TimelineClockCollection.cs
- DisplayInformation.cs
- FontFamilyIdentifier.cs
- SolidColorBrush.cs
- WinFormsComponentEditor.cs
- DynamicEntity.cs
- ApplicationDirectoryMembershipCondition.cs
- Crc32.cs
- _SslSessionsCache.cs
- EntityFunctions.cs
- ParameterCollection.cs
- RsaEndpointIdentity.cs
- MetaTableHelper.cs
- Module.cs
- KoreanCalendar.cs
- SafeSystemMetrics.cs
- TcpHostedTransportConfiguration.cs
- EntityDataSourceQueryBuilder.cs
- ServiceAuthorizationBehavior.cs
- CreationContext.cs
- PeerConnector.cs
- CurrentTimeZone.cs
- OdbcDataAdapter.cs
- DataObjectSettingDataEventArgs.cs
- RequestCache.cs
- PreProcessInputEventArgs.cs
- NavigationService.cs
- VersionConverter.cs
- WebRequest.cs
- ResourceReferenceKeyNotFoundException.cs
- IntPtr.cs
- DataGridViewBindingCompleteEventArgs.cs
- Identity.cs
- XmlBindingWorker.cs
- ReturnType.cs
- PostBackTrigger.cs
- TextTreePropertyUndoUnit.cs
- ConstraintCollection.cs
- PagePropertiesChangingEventArgs.cs
- XmlSchemaType.cs
- StateBag.cs
- WindowHideOrCloseTracker.cs
- ArgumentDirectionHelper.cs
- CommandValueSerializer.cs
- EasingKeyFrames.cs
- AQNBuilder.cs
- PathData.cs
- DesignerLoader.cs
- Pair.cs
- TreeChangeInfo.cs
- RightsManagementEncryptedStream.cs
- RotateTransform3D.cs
- SQLSingleStorage.cs
- GridViewColumnCollection.cs
- X509Utils.cs
- _ConnectStream.cs
- EntityDataSourceState.cs
- TextViewBase.cs
- ObjectIDGenerator.cs
- BinaryQueryOperator.cs
- RegisteredArrayDeclaration.cs
- MetaData.cs
- EraserBehavior.cs
- XmlKeywords.cs
- CodeLabeledStatement.cs
- Lock.cs
- SqlError.cs
- DesignerActionMethodItem.cs
- Identity.cs
- BitmapSourceSafeMILHandle.cs
- StorageEntitySetMapping.cs
- CompModSwitches.cs
- FormViewPagerRow.cs
- SQLDoubleStorage.cs
- CriticalHandle.cs
- MemberPathMap.cs
- RtfToken.cs
- Span.cs
- PasswordRecovery.cs
- DataPager.cs
- Int16KeyFrameCollection.cs
- ImageListUtils.cs
- XmlQualifiedName.cs
- EventSourceCreationData.cs
- WorkflowControlEndpoint.cs
- Vector3DConverter.cs
- TextServicesCompartmentEventSink.cs
- SafeHandle.cs
- InternalBufferOverflowException.cs
- Permission.cs
- RootBuilder.cs
- DescendantOverDescendantQuery.cs