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
- LogLogRecordHeader.cs
- CookieHandler.cs
- FormViewRow.cs
- CallContext.cs
- WebBrowserPermission.cs
- listitem.cs
- TypefaceCollection.cs
- SwitchElementsCollection.cs
- MessageFault.cs
- PnrpPermission.cs
- ComponentDispatcher.cs
- CqlGenerator.cs
- OpenTypeLayout.cs
- Reference.cs
- DropShadowEffect.cs
- ImplicitInputBrush.cs
- Cursor.cs
- WithStatement.cs
- XhtmlMobileTextWriter.cs
- SHA384Managed.cs
- Interlocked.cs
- AmbiguousMatchException.cs
- UdpDiscoveryEndpoint.cs
- SessionStateContainer.cs
- EastAsianLunisolarCalendar.cs
- SHA1.cs
- WebPartCatalogAddVerb.cs
- ChildTable.cs
- RoutedPropertyChangedEventArgs.cs
- NetTcpSecurityElement.cs
- AutoGeneratedFieldProperties.cs
- AnimatedTypeHelpers.cs
- MeasurementDCInfo.cs
- ProtectedProviderSettings.cs
- Utils.cs
- CommandHelpers.cs
- ListViewEditEventArgs.cs
- EntityClientCacheEntry.cs
- ClientTargetSection.cs
- Merger.cs
- ADMembershipUser.cs
- SchemaDeclBase.cs
- PreloadHost.cs
- FixedSchema.cs
- XNodeNavigator.cs
- PixelFormats.cs
- BinaryObjectInfo.cs
- Nullable.cs
- Activator.cs
- WebBrowserEvent.cs
- Asn1Utilities.cs
- PackageDigitalSignatureManager.cs
- DispatcherOperation.cs
- XamlRtfConverter.cs
- XmlQueryContext.cs
- ChtmlCalendarAdapter.cs
- UnsafeNativeMethods.cs
- ProofTokenCryptoHandle.cs
- ConfigurationValidatorBase.cs
- InputDevice.cs
- DiscoveryDefaults.cs
- DesignerDataSchemaClass.cs
- WebConfigurationHostFileChange.cs
- DetailsViewInsertEventArgs.cs
- InteropAutomationProvider.cs
- DiscoveryDocumentSearchPattern.cs
- BindingsCollection.cs
- MarginsConverter.cs
- Stacktrace.cs
- LogicalMethodInfo.cs
- DependencyObjectProvider.cs
- InvalidCommandTreeException.cs
- ChoiceConverter.cs
- WeakEventManager.cs
- IRCollection.cs
- TrailingSpaceComparer.cs
- DesignerOptions.cs
- WebPartConnectionsDisconnectVerb.cs
- WindowsEditBoxRange.cs
- MsmqIntegrationChannelFactory.cs
- StorageAssociationTypeMapping.cs
- DataDocumentXPathNavigator.cs
- ProcessHostConfigUtils.cs
- PropertyEntry.cs
- PeerDuplexChannelListener.cs
- Attributes.cs
- TypeSystemProvider.cs
- DataGrid.cs
- RoleManagerModule.cs
- Timeline.cs
- EditableTreeList.cs
- QueueProcessor.cs
- ExitEventArgs.cs
- PeerNameResolver.cs
- GridViewColumnCollectionChangedEventArgs.cs
- HierarchicalDataTemplate.cs
- RegularExpressionValidator.cs
- DataControlField.cs
- PngBitmapDecoder.cs
- ProfileInfo.cs