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
- XmlStringTable.cs
- ToolboxItemAttribute.cs
- StylusEditingBehavior.cs
- ValidateNames.cs
- HatchBrush.cs
- XNodeValidator.cs
- XPathMultyIterator.cs
- Rights.cs
- DataGridViewComboBoxCell.cs
- PackageProperties.cs
- ActionMessageFilterTable.cs
- UInt64Storage.cs
- ContractCodeDomInfo.cs
- GradientBrush.cs
- DispatchChannelSink.cs
- SiteMapDesignerDataSourceView.cs
- HijriCalendar.cs
- ItemPager.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DesignerDataParameter.cs
- KeyedHashAlgorithm.cs
- XPathBuilder.cs
- XComponentModel.cs
- DataGridViewRowConverter.cs
- TextEditorSelection.cs
- TransformPattern.cs
- QueryExpression.cs
- ListParaClient.cs
- SafeEventLogReadHandle.cs
- EmptyQuery.cs
- ToggleProviderWrapper.cs
- COM2Properties.cs
- UidManager.cs
- DashStyle.cs
- MessageQueue.cs
- ReadOnlyMetadataCollection.cs
- DefaultTraceListener.cs
- PagedControl.cs
- IDQuery.cs
- HttpServerUtilityWrapper.cs
- DocumentPageViewAutomationPeer.cs
- CodeGenerator.cs
- CacheRequest.cs
- PriorityItem.cs
- DisplayNameAttribute.cs
- Accessible.cs
- SqlDataSourceCommandEventArgs.cs
- XPathNodePointer.cs
- SchemaMapping.cs
- BlobPersonalizationState.cs
- FrugalMap.cs
- HostProtectionException.cs
- ArrayList.cs
- DownloadProgressEventArgs.cs
- GZipDecoder.cs
- AmbientLight.cs
- SqlServer2KCompatibilityAnnotation.cs
- EventLogEntry.cs
- CommonDialog.cs
- DocumentViewerBase.cs
- InputMethod.cs
- CodeLinePragma.cs
- FormParameter.cs
- InputElement.cs
- TextReader.cs
- DataReceivedEventArgs.cs
- WebZoneDesigner.cs
- EncodingTable.cs
- SafeReversePInvokeHandle.cs
- CommonDialog.cs
- ResourceCategoryAttribute.cs
- Screen.cs
- FormViewUpdatedEventArgs.cs
- PackWebRequestFactory.cs
- KnownTypes.cs
- SafeFindHandle.cs
- SoapDocumentMethodAttribute.cs
- PenCursorManager.cs
- sitestring.cs
- PartitionerQueryOperator.cs
- AnnotationMap.cs
- TemplatedAdorner.cs
- FieldTemplateFactory.cs
- ResXBuildProvider.cs
- SerTrace.cs
- InteropAutomationProvider.cs
- PropertyItem.cs
- SystemDiagnosticsSection.cs
- WindowsListViewGroup.cs
- CacheForPrimitiveTypes.cs
- RepeatInfo.cs
- Int32AnimationBase.cs
- RootProfilePropertySettingsCollection.cs
- IdentityNotMappedException.cs
- manifestimages.cs
- ClientSettingsProvider.cs
- hwndwrapper.cs
- DayRenderEvent.cs
- SystemUnicastIPAddressInformation.cs
- SafeCoTaskMem.cs