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
- SessionStateModule.cs
- SqlDataSourceCommandEventArgs.cs
- ObjectParameterCollection.cs
- SQLChars.cs
- WSFederationHttpSecurityMode.cs
- ImageButton.cs
- TraceListener.cs
- CopyAction.cs
- CodeBinaryOperatorExpression.cs
- EdmTypeAttribute.cs
- DataGridViewCellValueEventArgs.cs
- Decimal.cs
- StaticSiteMapProvider.cs
- AvTraceDetails.cs
- LinkArea.cs
- BaseTransportHeaders.cs
- ContextMenu.cs
- UIElementParaClient.cs
- ComponentManagerBroker.cs
- DefaultCompensation.cs
- GlyphRun.cs
- HttpRequest.cs
- ScrollViewer.cs
- ConversionContext.cs
- TextRangeEditTables.cs
- BitmapImage.cs
- dtdvalidator.cs
- ShapeTypeface.cs
- URLBuilder.cs
- RoutedCommand.cs
- InvalidateEvent.cs
- DelayedRegex.cs
- ComPlusTypeValidator.cs
- RepeatButton.cs
- ContractBase.cs
- UpdatePanelTrigger.cs
- InProcStateClientManager.cs
- ColumnWidthChangedEvent.cs
- OracleEncoding.cs
- SQLInt16Storage.cs
- ThicknessAnimation.cs
- PriorityBinding.cs
- MdiWindowListStrip.cs
- CatalogZone.cs
- WebPartConnectionsCancelVerb.cs
- SystemIPv4InterfaceProperties.cs
- StubHelpers.cs
- SignedXml.cs
- SynchronizationFilter.cs
- SubclassTypeValidatorAttribute.cs
- GeneralTransformGroup.cs
- TypeTypeConverter.cs
- ContextToken.cs
- HostProtectionException.cs
- _Connection.cs
- SyndicationElementExtension.cs
- ConfigXmlComment.cs
- RuntimeResourceSet.cs
- formatstringdialog.cs
- JournalEntry.cs
- SolidColorBrush.cs
- PerformanceCounterManager.cs
- LineSegment.cs
- DiscoveryServerProtocol.cs
- EmptyReadOnlyDictionaryInternal.cs
- TransformedBitmap.cs
- ClientBuildManager.cs
- TransactionalPackage.cs
- TransformerConfigurationWizardBase.cs
- CodeTypeConstructor.cs
- TrackingCondition.cs
- ColorPalette.cs
- InheritanceService.cs
- ResolvedKeyFrameEntry.cs
- ProjectionPlanCompiler.cs
- HandlerFactoryWrapper.cs
- FieldTemplateUserControl.cs
- tooltip.cs
- X509SecurityTokenAuthenticator.cs
- CallbackWrapper.cs
- CodeGenHelper.cs
- XmlAttribute.cs
- MaskedTextBoxDesignerActionList.cs
- ConstrainedDataObject.cs
- DetailsViewUpdateEventArgs.cs
- InplaceBitmapMetadataWriter.cs
- PersonalizationDictionary.cs
- ArraySubsetEnumerator.cs
- CachedCompositeFamily.cs
- SoapFormatterSinks.cs
- PolyBezierSegmentFigureLogic.cs
- DataObjectMethodAttribute.cs
- XmlFormatWriterGenerator.cs
- Activation.cs
- WeakHashtable.cs
- WebPageTraceListener.cs
- DetectEofStream.cs
- LogLogRecordHeader.cs
- RemoteArgument.cs
- NTAccount.cs