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
- ZipIOCentralDirectoryFileHeader.cs
- DelegatedStream.cs
- StringDictionary.cs
- CompilationSection.cs
- DynamicObject.cs
- CompressedStack.cs
- _Events.cs
- GridViewSortEventArgs.cs
- AnimationTimeline.cs
- PartDesigner.cs
- MailDefinition.cs
- HostedTransportConfigurationManager.cs
- DelegatingTypeDescriptionProvider.cs
- StandardMenuStripVerb.cs
- JsonCollectionDataContract.cs
- NameValueFileSectionHandler.cs
- OdbcEnvironmentHandle.cs
- OrderedHashRepartitionEnumerator.cs
- SessionPageStateSection.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- PrimitiveXmlSerializers.cs
- Win32MouseDevice.cs
- _FtpDataStream.cs
- FieldMetadata.cs
- StretchValidation.cs
- PointLightBase.cs
- ComponentSerializationService.cs
- EventLogPermission.cs
- ScriptReference.cs
- DataGridViewIntLinkedList.cs
- PassportIdentity.cs
- SystemIPInterfaceStatistics.cs
- StatusBar.cs
- WizardSideBarListControlItem.cs
- HeaderCollection.cs
- SoapObjectReader.cs
- TreeNodeClickEventArgs.cs
- FontCacheUtil.cs
- ActivityDesignerResources.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- NamespaceCollection.cs
- NumericUpDown.cs
- TextBlockAutomationPeer.cs
- sqlcontext.cs
- ReversePositionQuery.cs
- ValidationRule.cs
- DropTarget.cs
- TextServicesDisplayAttribute.cs
- IntegrationExceptionEventArgs.cs
- ViewRendering.cs
- DataGridViewDesigner.cs
- OleDbCommand.cs
- JulianCalendar.cs
- RemoteArgument.cs
- OleDbReferenceCollection.cs
- InputElement.cs
- WindowVisualStateTracker.cs
- PrintPageEvent.cs
- DataRowComparer.cs
- UDPClient.cs
- ZipIOExtraField.cs
- UIHelper.cs
- DownloadProgressEventArgs.cs
- KeyValuePair.cs
- DataGridViewComboBoxCell.cs
- HotSpotCollection.cs
- NativeActivityAbortContext.cs
- securestring.cs
- BuildResult.cs
- EDesignUtil.cs
- HtmlTableRowCollection.cs
- ToolboxBitmapAttribute.cs
- PickDesigner.xaml.cs
- DesignTable.cs
- FragmentQueryKB.cs
- AstTree.cs
- DataBinder.cs
- ButtonBaseAutomationPeer.cs
- XmlDocumentType.cs
- PropertyTabAttribute.cs
- PolicyLevel.cs
- AlignmentXValidation.cs
- ContainerSelectorGlyph.cs
- RuleValidation.cs
- Command.cs
- Vector3dCollection.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- SetStoryboardSpeedRatio.cs
- ViewSimplifier.cs
- _ContextAwareResult.cs
- HtmlMeta.cs
- ValueQuery.cs
- SqlServer2KCompatibilityAnnotation.cs
- ObjectCacheHost.cs
- LinqDataSourceSelectEventArgs.cs
- PropertyGridCommands.cs
- DoubleConverter.cs
- XamlFigureLengthSerializer.cs
- ToolStripContentPanel.cs
- EncoderBestFitFallback.cs