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
- AdCreatedEventArgs.cs
- SmtpDigestAuthenticationModule.cs
- DataTableClearEvent.cs
- AssemblyHash.cs
- IPPacketInformation.cs
- AuthenticationModuleElement.cs
- MonthCalendarDesigner.cs
- ObjectStorage.cs
- EntityDataSourceViewSchema.cs
- SqlProviderServices.cs
- QilExpression.cs
- BitStack.cs
- FileIOPermission.cs
- HttpContextWrapper.cs
- PolyBezierSegment.cs
- XmlSchemaSet.cs
- XmlSchemaRedefine.cs
- WindowsUpDown.cs
- GeneralTransform3DGroup.cs
- NonParentingControl.cs
- ControlEvent.cs
- ButtonBase.cs
- ContainerControl.cs
- DesignerActionPanel.cs
- OleDbException.cs
- TdsParserSessionPool.cs
- BackoffTimeoutHelper.cs
- XmlSchemaDatatype.cs
- ColorConverter.cs
- DataServiceProviderWrapper.cs
- FileClassifier.cs
- PenThread.cs
- TypeElementCollection.cs
- MsmqIntegrationProcessProtocolHandler.cs
- SqlProcedureAttribute.cs
- SchemaNames.cs
- UnionCodeGroup.cs
- CngUIPolicy.cs
- SingleAnimationUsingKeyFrames.cs
- DocumentGridContextMenu.cs
- MeshGeometry3D.cs
- SystemWebCachingSectionGroup.cs
- DataServiceProviderWrapper.cs
- ZeroOpNode.cs
- COM2ExtendedTypeConverter.cs
- ComEventsMethod.cs
- SchemaInfo.cs
- TraceData.cs
- RenderingEventArgs.cs
- Listen.cs
- WebPartZone.cs
- CapabilitiesRule.cs
- MemberProjectionIndex.cs
- ObfuscateAssemblyAttribute.cs
- StaticDataManager.cs
- WebException.cs
- VirtualPathUtility.cs
- PerformanceCounter.cs
- RuntimeEnvironment.cs
- GridViewSelectEventArgs.cs
- Signature.cs
- DashStyle.cs
- WinEventHandler.cs
- Int32CollectionConverter.cs
- TextRunTypographyProperties.cs
- BaseConfigurationRecord.cs
- SqlRowUpdatingEvent.cs
- CodePageUtils.cs
- Selector.cs
- ReflectionHelper.cs
- ClientEndpointLoader.cs
- RowVisual.cs
- ADMembershipProvider.cs
- SlotInfo.cs
- IgnoreFileBuildProvider.cs
- ObfuscateAssemblyAttribute.cs
- BitmapEffectInput.cs
- DBSqlParserTable.cs
- CompilationUtil.cs
- MessageSecurityProtocolFactory.cs
- RouteItem.cs
- WsatStrings.cs
- RbTree.cs
- DataGridColumnCollection.cs
- DataGridViewRowsRemovedEventArgs.cs
- LocatorPart.cs
- LongValidator.cs
- UpdateManifestForBrowserApplication.cs
- EntityContainerAssociationSetEnd.cs
- RootProfilePropertySettingsCollection.cs
- CellTreeNode.cs
- LoadedOrUnloadedOperation.cs
- LoginDesignerUtil.cs
- CachingHintValidation.cs
- Size3D.cs
- EndSelectCardRequest.cs
- DataGridHelper.cs
- NullableBoolConverter.cs
- TextChange.cs
- SQLBinary.cs