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
- ClientCultureInfo.cs
- ScrollableControl.cs
- TransactionInterop.cs
- DataRelation.cs
- CodeDirectoryCompiler.cs
- RightsManagementResourceHelper.cs
- GorillaCodec.cs
- KeyGestureValueSerializer.cs
- CatalogPartChrome.cs
- NamedElement.cs
- FixUpCollection.cs
- AmbientProperties.cs
- UserControl.cs
- HttpWriter.cs
- RtfNavigator.cs
- DuplicateMessageDetector.cs
- FreeFormPanel.cs
- Color.cs
- DateTimeSerializationSection.cs
- QilParameter.cs
- CookieProtection.cs
- MetadataCacheItem.cs
- HttpHandlerAction.cs
- WebControlsSection.cs
- WebPartConnectionsCancelEventArgs.cs
- ComplexLine.cs
- IndexingContentUnit.cs
- HostedHttpContext.cs
- CapabilitiesSection.cs
- CryptoApi.cs
- FSWPathEditor.cs
- SqlClientWrapperSmiStream.cs
- PointAnimationClockResource.cs
- dataprotectionpermission.cs
- HybridWebProxyFinder.cs
- PersonalizationDictionary.cs
- Rect.cs
- ScriptRef.cs
- WebZoneDesigner.cs
- RegistryKey.cs
- CompositeScriptReference.cs
- InkCanvasAutomationPeer.cs
- CodeSnippetTypeMember.cs
- ScrollViewer.cs
- Sorting.cs
- ExternalFile.cs
- ToolstripProfessionalRenderer.cs
- WebBrowserNavigatingEventHandler.cs
- DSASignatureFormatter.cs
- PropVariant.cs
- StylusDevice.cs
- RegexNode.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ImageListImage.cs
- TextEditorCopyPaste.cs
- Condition.cs
- PagerSettings.cs
- SoapReflectionImporter.cs
- DesignerRegionMouseEventArgs.cs
- WindowsListViewSubItem.cs
- NetNamedPipeSecurityElement.cs
- HtmlFormParameterReader.cs
- DataPagerField.cs
- PaintEvent.cs
- CodeDelegateCreateExpression.cs
- SqlRetyper.cs
- UpDownEvent.cs
- Rect3D.cs
- XmlArrayItemAttribute.cs
- BitmapScalingModeValidation.cs
- AuthenticateEventArgs.cs
- SocketElement.cs
- IdentitySection.cs
- VisualBasicImportReference.cs
- WizardPanel.cs
- GPPOINTF.cs
- ClientSponsor.cs
- DataGridViewMethods.cs
- CollectionViewGroupRoot.cs
- OptimizerPatterns.cs
- LongPath.cs
- VectorAnimationUsingKeyFrames.cs
- UncommonField.cs
- RequestTimeoutManager.cs
- RenamedEventArgs.cs
- CustomErrorCollection.cs
- SystemIPv6InterfaceProperties.cs
- DetailsViewPagerRow.cs
- GPRECT.cs
- Action.cs
- EntitySet.cs
- ResizeGrip.cs
- UmAlQuraCalendar.cs
- RouteUrlExpressionBuilder.cs
- PickDesigner.xaml.cs
- PeerValidationBehavior.cs
- FocusManager.cs
- CodeAttributeArgumentCollection.cs
- DecodeHelper.cs
- GridViewUpdateEventArgs.cs