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
- MouseGestureValueSerializer.cs
- DataControlFieldCell.cs
- PageBuildProvider.cs
- MessageQueueException.cs
- ExpressionParser.cs
- ellipse.cs
- WorkflowInstance.cs
- CodeNamespace.cs
- ObjectDataSourceChooseMethodsPanel.cs
- DataGridViewColumnEventArgs.cs
- InvokeHandlers.cs
- IndentTextWriter.cs
- HttpListenerException.cs
- DocumentSequenceHighlightLayer.cs
- IPEndPointCollection.cs
- PackagingUtilities.cs
- AgileSafeNativeMemoryHandle.cs
- DbConnectionStringCommon.cs
- LassoSelectionBehavior.cs
- PropertyItemInternal.cs
- ExpressionEditorSheet.cs
- StructuredType.cs
- TextLine.cs
- ContainerAction.cs
- WebReferenceOptions.cs
- Quaternion.cs
- DocumentPageHost.cs
- EntityStoreSchemaGenerator.cs
- InfoCardTraceRecord.cs
- CompositeCollection.cs
- SeparatorAutomationPeer.cs
- SecurityUtils.cs
- FeatureSupport.cs
- UnsafeNativeMethodsTablet.cs
- ReferencedCollectionType.cs
- WebFormDesignerActionService.cs
- ManagementClass.cs
- CryptoKeySecurity.cs
- FrameworkContentElement.cs
- FunctionImportMapping.cs
- XhtmlTextWriter.cs
- XmlAttributeAttribute.cs
- DbProviderManifest.cs
- AnonymousIdentificationSection.cs
- DesignerVerbToolStripMenuItem.cs
- DBConnection.cs
- TransactionManager.cs
- ResourcePool.cs
- Size.cs
- SoapExtensionImporter.cs
- Rectangle.cs
- LocatorGroup.cs
- AndCondition.cs
- TableCell.cs
- EnterpriseServicesHelper.cs
- QueryBranchOp.cs
- RelationshipEndMember.cs
- ToolCreatedEventArgs.cs
- WebPart.cs
- DrawingContext.cs
- HttpRequestContext.cs
- SwitchAttribute.cs
- HTTPRemotingHandler.cs
- SettingsPropertyValue.cs
- VisualBasicValue.cs
- XmlAnyElementAttribute.cs
- SendMailErrorEventArgs.cs
- SHA256Managed.cs
- Vector3DValueSerializer.cs
- DictionaryContent.cs
- PropertyValueUIItem.cs
- RayMeshGeometry3DHitTestResult.cs
- TimelineCollection.cs
- UserUseLicenseDictionaryLoader.cs
- XamlGridLengthSerializer.cs
- DependsOnAttribute.cs
- ClaimTypes.cs
- EventNotify.cs
- Literal.cs
- FontDriver.cs
- CellTreeNode.cs
- SecurityKeyIdentifier.cs
- HijriCalendar.cs
- MetaModel.cs
- HMACMD5.cs
- WsdlParser.cs
- GenericUriParser.cs
- MetadataPropertyAttribute.cs
- VisualStyleElement.cs
- GeneralTransform3DGroup.cs
- HtmlContainerControl.cs
- ReadOnlyPropertyMetadata.cs
- CodeGroup.cs
- ThicknessKeyFrameCollection.cs
- RemoveStoryboard.cs
- ProjectionPlanCompiler.cs
- MiniModule.cs
- AtomMaterializerLog.cs
- InputProviderSite.cs
- XmlAttributeAttribute.cs