Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DLinq / Dlinq / SqlClient / Common / SqlNodeAnnotations.cs / 1305376 / SqlNodeAnnotations.cs
using System; using System.Collections.Generic; using System.Text; namespace System.Data.Linq.SqlClient { ////// Associate annotations with SqlNodes. /// internal class SqlNodeAnnotations { Dictionary> annotationMap = new Dictionary >(); Dictionary uniqueTypes = new Dictionary (); /// /// Add an annotation to the given node. /// internal void Add(SqlNode node, SqlNodeAnnotation annotation) { Listlist = null; if (!this.annotationMap.TryGetValue(node, out list)) { list = new List (); this.annotationMap[node]=list; } uniqueTypes[annotation.GetType()] = String.Empty; list.Add(annotation); } /// /// Gets the annotations for the given node. Null if none. /// internal ListGet(SqlNode node) { List list = null; this.annotationMap.TryGetValue(node, out list); return list; } /// /// Whether the given node has annotations. /// internal bool NodeIsAnnotated(SqlNode node) { if (node == null) return false; return this.annotationMap.ContainsKey(node); } ////// Checks whether there's at least one annotation of the given type. /// internal bool HasAnnotationType(Type type) { return this.uniqueTypes.ContainsKey(type); } } } // 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
- ChtmlPageAdapter.cs
- SQLBytes.cs
- WindowsSysHeader.cs
- CapacityStreamGeometryContext.cs
- XmlSchemaCollection.cs
- PageSetupDialog.cs
- XmlSchemaElement.cs
- SecureEnvironment.cs
- SqlRowUpdatedEvent.cs
- XmlNodeComparer.cs
- IMembershipProvider.cs
- FrameworkPropertyMetadata.cs
- FastEncoder.cs
- DesignerWithHeader.cs
- HMACSHA1.cs
- DbModificationCommandTree.cs
- ReaderWriterLock.cs
- EdmItemCollection.OcAssemblyCache.cs
- _AcceptOverlappedAsyncResult.cs
- EFTableProvider.cs
- ContentElementAutomationPeer.cs
- MetadataArtifactLoaderResource.cs
- Table.cs
- UnconditionalPolicy.cs
- ClientOptions.cs
- ExtensibleClassFactory.cs
- QilScopedVisitor.cs
- ACL.cs
- EFColumnProvider.cs
- RelationshipConverter.cs
- Line.cs
- TreeNodeClickEventArgs.cs
- FirstMatchCodeGroup.cs
- SecUtil.cs
- UInt64.cs
- MenuItem.cs
- ToolStripGripRenderEventArgs.cs
- HtmlInputButton.cs
- FormViewPagerRow.cs
- UrlAuthFailedErrorFormatter.cs
- ProtocolViolationException.cs
- WebPartCatalogAddVerb.cs
- RoleService.cs
- AlgoModule.cs
- InternalControlCollection.cs
- EnumMemberAttribute.cs
- WebUtil.cs
- QilLiteral.cs
- PassportIdentity.cs
- WMIInterop.cs
- PathGeometry.cs
- FreezableDefaultValueFactory.cs
- SafeReadContext.cs
- BlurBitmapEffect.cs
- VectorKeyFrameCollection.cs
- EnumValAlphaComparer.cs
- QilPatternFactory.cs
- DependencyPropertyDescriptor.cs
- httpapplicationstate.cs
- MenuItemBindingCollection.cs
- LineBreakRecord.cs
- ScrollEventArgs.cs
- ContextDataSource.cs
- TableRowGroupCollection.cs
- DataContext.cs
- InvalidDataException.cs
- CompoundFileReference.cs
- DiagnosticsConfigurationHandler.cs
- FrameworkObject.cs
- ObjectSecurity.cs
- RtfFormatStack.cs
- ItemDragEvent.cs
- ProxyHelper.cs
- WindowsMenu.cs
- XmlSchemaComplexContentExtension.cs
- TextBlockAutomationPeer.cs
- Calendar.cs
- GlyphCache.cs
- ComponentSerializationService.cs
- ToolStripPanelSelectionGlyph.cs
- WrappedIUnknown.cs
- JsonDataContract.cs
- RegexMatch.cs
- XmlFormatWriterGenerator.cs
- StyleSheet.cs
- DatagridviewDisplayedBandsData.cs
- CodeAccessSecurityEngine.cs
- ValidationVisibilityAttribute.cs
- BitVector32.cs
- CorrelationManager.cs
- RoleManagerEventArgs.cs
- ReturnValue.cs
- ProtocolsConfigurationHandler.cs
- ConfigurationElementProperty.cs
- TypeDescriptionProviderAttribute.cs
- HttpProcessUtility.cs
- StyleHelper.cs
- SafeThreadHandle.cs
- PKCS1MaskGenerationMethod.cs
- MissingMemberException.cs