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
- PowerModeChangedEventArgs.cs
- Int16KeyFrameCollection.cs
- TextLineResult.cs
- SortQuery.cs
- FtpWebResponse.cs
- DataRowChangeEvent.cs
- MessageSmuggler.cs
- ExpressionBindingCollection.cs
- SortExpressionBuilder.cs
- XPathDocumentBuilder.cs
- GenerateTemporaryTargetAssembly.cs
- AlternateView.cs
- TableLayoutRowStyleCollection.cs
- RijndaelManaged.cs
- ObjectDataProvider.cs
- OneToOneMappingSerializer.cs
- HostingMessageProperty.cs
- ProvidePropertyAttribute.cs
- MissingMemberException.cs
- ScrollChrome.cs
- __Error.cs
- AdCreatedEventArgs.cs
- ConfigXmlSignificantWhitespace.cs
- LayoutEditorPart.cs
- TransformerTypeCollection.cs
- LockCookie.cs
- EventLogger.cs
- GroupByQueryOperator.cs
- TextEmbeddedObject.cs
- StreamHelper.cs
- GridView.cs
- DiagnosticTrace.cs
- SqlUtils.cs
- GridViewRow.cs
- GridViewRowPresenterBase.cs
- RegistryPermission.cs
- InteropBitmapSource.cs
- Internal.cs
- Msec.cs
- EntityStoreSchemaFilterEntry.cs
- QueryConverter.cs
- XPSSignatureDefinition.cs
- TransformationRules.cs
- RequestCacheEntry.cs
- PreservationFileWriter.cs
- ItemCheckEvent.cs
- PenThreadWorker.cs
- SingleAnimationBase.cs
- XXXInfos.cs
- AnnotationResource.cs
- DataGridViewCellCancelEventArgs.cs
- DataGridViewLayoutData.cs
- GeometryConverter.cs
- EventRoute.cs
- TableCell.cs
- ConstraintEnumerator.cs
- HasCopySemanticsAttribute.cs
- ControlPaint.cs
- FormsAuthenticationUser.cs
- TcpProcessProtocolHandler.cs
- SpellerHighlightLayer.cs
- ButtonPopupAdapter.cs
- AstNode.cs
- ReferenceCountedObject.cs
- SafeHandles.cs
- TraceLevelStore.cs
- NumberFunctions.cs
- InputScopeConverter.cs
- MemberHolder.cs
- SqlDataSourceConfigureFilterForm.cs
- Triplet.cs
- HttpCookie.cs
- DelimitedListTraceListener.cs
- WebReferenceCollection.cs
- Calendar.cs
- OdbcErrorCollection.cs
- LinearGradientBrush.cs
- FileDataSource.cs
- ObjectManager.cs
- StylusButton.cs
- PointConverter.cs
- TextRangeEditTables.cs
- KnownColorTable.cs
- DashStyles.cs
- StylusDownEventArgs.cs
- WebPartEventArgs.cs
- VersionedStreamOwner.cs
- SRGSCompiler.cs
- ConnectionManagementElementCollection.cs
- RunWorkerCompletedEventArgs.cs
- versioninfo.cs
- CompatibleComparer.cs
- WpfKnownTypeInvoker.cs
- RunWorkerCompletedEventArgs.cs
- PartitionedStreamMerger.cs
- StringArrayConverter.cs
- FillErrorEventArgs.cs
- XmlImplementation.cs
- ColorTransform.cs
- AutomationPeer.cs