Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / ThrowOnMultipleAssignment.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WorkflowItemsPresenter.cs
- CodeDelegateInvokeExpression.cs
- XmlArrayItemAttributes.cs
- VerticalAlignConverter.cs
- XmlSchemaComplexContentRestriction.cs
- TreeNodeConverter.cs
- StyleCollectionEditor.cs
- FontConverter.cs
- QueryExecutionOption.cs
- SortedList.cs
- TextSearch.cs
- CompositeTypefaceMetrics.cs
- SoapSchemaExporter.cs
- Size.cs
- MimeObjectFactory.cs
- ComPersistableTypeElementCollection.cs
- ColorTransformHelper.cs
- HelpProvider.cs
- QuadTree.cs
- DbProviderConfigurationHandler.cs
- ObjectCloneHelper.cs
- Message.cs
- Assembly.cs
- AdvancedBindingEditor.cs
- MSG.cs
- LessThanOrEqual.cs
- InheritanceAttribute.cs
- TagPrefixAttribute.cs
- RsaSecurityTokenAuthenticator.cs
- CompilerInfo.cs
- NavigationExpr.cs
- PointAnimationUsingPath.cs
- IpcPort.cs
- RunWorkerCompletedEventArgs.cs
- Constants.cs
- PerformanceCounters.cs
- HttpProcessUtility.cs
- UrlRoutingHandler.cs
- TextDecorationCollection.cs
- LineGeometry.cs
- EndpointInstanceProvider.cs
- DrawListViewColumnHeaderEventArgs.cs
- DataGridViewHeaderCell.cs
- CapacityStreamGeometryContext.cs
- HttpRequestContext.cs
- SimplePropertyEntry.cs
- AvtEvent.cs
- CodeAssignStatement.cs
- BrowserTree.cs
- ImpersonationContext.cs
- SqlOuterApplyReducer.cs
- regiisutil.cs
- CodeStatement.cs
- AesManaged.cs
- ThaiBuddhistCalendar.cs
- XhtmlConformanceSection.cs
- MessageVersion.cs
- CodeCommentStatementCollection.cs
- WebPartUserCapability.cs
- TemplateXamlTreeBuilder.cs
- ProvideValueServiceProvider.cs
- _SslState.cs
- ContentControl.cs
- GridLengthConverter.cs
- DataGridCell.cs
- ModuleConfigurationInfo.cs
- WindowsContainer.cs
- NameValueCollection.cs
- ArrayEditor.cs
- ResourceDescriptionAttribute.cs
- ContentIterators.cs
- QueryNode.cs
- StaticFileHandler.cs
- PreservationFileWriter.cs
- TypedReference.cs
- EFAssociationProvider.cs
- HtmlTextArea.cs
- PrinterSettings.cs
- BooleanStorage.cs
- ByteAnimationUsingKeyFrames.cs
- FillBehavior.cs
- SerializationSectionGroup.cs
- GcHandle.cs
- XmlSecureResolver.cs
- TableLayoutStyleCollection.cs
- CodeAccessSecurityEngine.cs
- SmiTypedGetterSetter.cs
- SaveFileDialog.cs
- TerminateSequenceResponse.cs
- TreeView.cs
- DataContract.cs
- DynamicEndpointElement.cs
- ClientScriptManager.cs
- StrokeCollectionDefaultValueFactory.cs
- XmlWriterSettings.cs
- WaitingCursor.cs
- CultureInfoConverter.cs
- ConfigUtil.cs
- EventHandlingScope.cs
- AttachedAnnotationChangedEventArgs.cs