Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DLinq / Dlinq / SqlClient / Common / SqlNodeAnnotations.cs / 1 / 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. 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
- FunctionNode.cs
- SymbolType.cs
- ResourcesChangeInfo.cs
- DescendantOverDescendantQuery.cs
- CodeCatchClause.cs
- FileInfo.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- InstanceView.cs
- UnknownBitmapEncoder.cs
- TextEvent.cs
- HashStream.cs
- MdiWindowListItemConverter.cs
- PersonalizationStateQuery.cs
- AsymmetricAlgorithm.cs
- Array.cs
- XmlWriter.cs
- ImageListDesigner.cs
- ConfigurationLocationCollection.cs
- Separator.cs
- SqlNamer.cs
- SqlCachedBuffer.cs
- LoginName.cs
- TraceLog.cs
- loginstatus.cs
- ReliabilityContractAttribute.cs
- Timer.cs
- CommandField.cs
- RichTextBox.cs
- EtwTrace.cs
- TypeFieldSchema.cs
- InkCanvasAutomationPeer.cs
- XmlSchemaDocumentation.cs
- XsltSettings.cs
- SystemParameters.cs
- ClaimSet.cs
- RequestNavigateEventArgs.cs
- EntityCommand.cs
- ServiceDebugElement.cs
- NullToBooleanConverter.cs
- ActiveXHost.cs
- ExpandCollapsePatternIdentifiers.cs
- HotSpot.cs
- MetadataSource.cs
- FieldNameLookup.cs
- UrlMapping.cs
- WebControlParameterProxy.cs
- DiffuseMaterial.cs
- ArrangedElementCollection.cs
- ActivityCodeGenerator.cs
- XmlCountingReader.cs
- ClientSettingsProvider.cs
- AssemblyHash.cs
- FrameworkElementFactoryMarkupObject.cs
- EntityDataSourceQueryBuilder.cs
- ProxyWebPart.cs
- EncoderExceptionFallback.cs
- IdentityNotMappedException.cs
- CqlErrorHelper.cs
- SqlDesignerDataSourceView.cs
- ClientUIRequest.cs
- CustomTypeDescriptor.cs
- ProgressBar.cs
- WsdlHelpGeneratorElement.cs
- ExceptionHelpers.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- GeneralTransformGroup.cs
- FormViewPagerRow.cs
- EditorAttribute.cs
- RequiredAttributeAttribute.cs
- StylusEditingBehavior.cs
- RecognizerInfo.cs
- CodeIndexerExpression.cs
- IndexingContentUnit.cs
- TextLineResult.cs
- BitmapEffect.cs
- Transactions.cs
- DescendantBaseQuery.cs
- FloaterParagraph.cs
- HMACRIPEMD160.cs
- PropagatorResult.cs
- InvalidPipelineStoreException.cs
- RoutedCommand.cs
- WebPartPersonalization.cs
- _FtpControlStream.cs
- ZipIOCentralDirectoryBlock.cs
- NullExtension.cs
- Error.cs
- TriggerBase.cs
- UserControlParser.cs
- XmlMembersMapping.cs
- ActivityExecutorSurrogate.cs
- AnnotationHighlightLayer.cs
- ValidatingReaderNodeData.cs
- ActivationService.cs
- StatusBarDrawItemEvent.cs
- WindowsStartMenu.cs
- Vector3DConverter.cs
- MetabaseReader.cs
- Converter.cs
- ListQueryResults.cs