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
- SoapExtensionTypeElement.cs
- RequestCachePolicyConverter.cs
- Bold.cs
- Object.cs
- SelectionChangedEventArgs.cs
- PtsHost.cs
- WebPartTransformer.cs
- WebBrowser.cs
- XmlMembersMapping.cs
- Parallel.cs
- CollaborationHelperFunctions.cs
- XmlCharCheckingReader.cs
- WebConfigurationFileMap.cs
- WriteFileContext.cs
- Timer.cs
- mediaclock.cs
- VirtualStackFrame.cs
- DbTypeMap.cs
- LicFileLicenseProvider.cs
- ClientRuntimeConfig.cs
- Variant.cs
- Currency.cs
- TextPattern.cs
- BooleanExpr.cs
- UndoManager.cs
- uribuilder.cs
- Operators.cs
- CodeSubDirectoriesCollection.cs
- HostedController.cs
- ObjectDataSourceDisposingEventArgs.cs
- WindowsUpDown.cs
- Frame.cs
- ThreadSafeList.cs
- SqlPersonalizationProvider.cs
- ChooseAction.cs
- _ProxyChain.cs
- DockingAttribute.cs
- MetadataItem_Static.cs
- ToolStripItem.cs
- DataPager.cs
- XmlElementAttributes.cs
- SafeTimerHandle.cs
- ListBoxItemAutomationPeer.cs
- CustomAttributeSerializer.cs
- OuterGlowBitmapEffect.cs
- KeyboardDevice.cs
- XamlVector3DCollectionSerializer.cs
- ColorTransform.cs
- StreamingContext.cs
- ExceptionValidationRule.cs
- Drawing.cs
- TemplateXamlParser.cs
- SqlMethods.cs
- DispatcherHookEventArgs.cs
- InvalidOperationException.cs
- SHA1.cs
- SqlBuilder.cs
- DecoderFallback.cs
- NativeObjectSecurity.cs
- CommandManager.cs
- ProfileService.cs
- Boolean.cs
- ActivityDesignerResources.cs
- NullExtension.cs
- CompareInfo.cs
- DetailsViewPageEventArgs.cs
- ExtensionDataReader.cs
- FormsAuthenticationTicket.cs
- SafePipeHandle.cs
- ValidatingPropertiesEventArgs.cs
- RootCodeDomSerializer.cs
- IResourceProvider.cs
- SqlTopReducer.cs
- DefaultBinder.cs
- WorkflowRuntimeSection.cs
- FixedTextBuilder.cs
- PermissionToken.cs
- Geometry.cs
- ResourcePermissionBaseEntry.cs
- Msmq3PoisonHandler.cs
- InternalSafeNativeMethods.cs
- TabControlDesigner.cs
- GroupBox.cs
- ReliableSessionBindingElementImporter.cs
- MobileComponentEditorPage.cs
- InfocardExtendedInformationCollection.cs
- AssemblyName.cs
- SamlAssertion.cs
- EventlogProvider.cs
- ConfigurationValidatorBase.cs
- PrintDialog.cs
- URLAttribute.cs
- SliderAutomationPeer.cs
- ADMembershipUser.cs
- Rss20ItemFormatter.cs
- MeasurementDCInfo.cs
- DocumentPage.cs
- TagPrefixAttribute.cs
- _SslStream.cs
- ZoneLinkButton.cs