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
- ViewStateException.cs
- DataGridViewRowStateChangedEventArgs.cs
- NativeCppClassAttribute.cs
- SqlErrorCollection.cs
- NameValueSectionHandler.cs
- NodeFunctions.cs
- RowVisual.cs
- DateTimeOffsetStorage.cs
- PerformanceCounterCategory.cs
- mediaclock.cs
- UnmanagedMemoryStreamWrapper.cs
- ThreadInterruptedException.cs
- OracleException.cs
- WebPartCollection.cs
- DuplicateDetector.cs
- X509CertificateValidator.cs
- RTLAwareMessageBox.cs
- TreeIterator.cs
- SocketAddress.cs
- VScrollBar.cs
- OperandQuery.cs
- IRCollection.cs
- SafeEventHandle.cs
- ScriptModule.cs
- WebPartEditorApplyVerb.cs
- SortedList.cs
- InstancePersistenceException.cs
- SqlDataSourceCache.cs
- ExportFileRequest.cs
- mediaclock.cs
- OracleException.cs
- LongPath.cs
- RbTree.cs
- LocalBuilder.cs
- AsymmetricKeyExchangeDeformatter.cs
- SqlVisitor.cs
- hresults.cs
- RequestQueue.cs
- WinFormsSecurity.cs
- Maps.cs
- embossbitmapeffect.cs
- XPathAncestorIterator.cs
- EdmToObjectNamespaceMap.cs
- DataGridColumnCollection.cs
- WebPartPersonalization.cs
- MimeObjectFactory.cs
- ToolboxBitmapAttribute.cs
- XmlSchemaInclude.cs
- UTF32Encoding.cs
- WebConfigurationHostFileChange.cs
- Icon.cs
- UnmanagedHandle.cs
- ModelTypeConverter.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- ScriptManagerProxy.cs
- Constraint.cs
- DropShadowEffect.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- DesignerActionMethodItem.cs
- ComplexTypeEmitter.cs
- EntityWithChangeTrackerStrategy.cs
- TextPointer.cs
- ComponentConverter.cs
- PeerApplicationLaunchInfo.cs
- ElementMarkupObject.cs
- JsonGlobals.cs
- ExceptionRoutedEventArgs.cs
- XamlWriter.cs
- MemberInfoSerializationHolder.cs
- FileSystemWatcher.cs
- ZipIORawDataFileBlock.cs
- NamespaceCollection.cs
- RouteData.cs
- OdbcConnectionHandle.cs
- HtmlButton.cs
- versioninfo.cs
- Int32.cs
- KnownAssembliesSet.cs
- HostUtils.cs
- objectresult_tresulttype.cs
- UserControlAutomationPeer.cs
- ObjRef.cs
- TextRangeEditTables.cs
- PolyQuadraticBezierSegment.cs
- WorkflowPrinting.cs
- TransformProviderWrapper.cs
- ConnectionProviderAttribute.cs
- TableCellCollection.cs
- AddInController.cs
- PerformanceCounterPermissionAttribute.cs
- EdgeProfileValidation.cs
- PageAdapter.cs
- DesignerView.Commands.cs
- RadioButton.cs
- Misc.cs
- MarkupWriter.cs
- ListenerConfig.cs
- LeaseManager.cs
- SelectionListDesigner.cs
- WebPartDisplayModeEventArgs.cs