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
- RangeBaseAutomationPeer.cs
- GeneralTransform.cs
- SignalGate.cs
- COM2PictureConverter.cs
- Column.cs
- XmlCodeExporter.cs
- PropertyGridView.cs
- DeflateStream.cs
- cache.cs
- ParameterInfo.cs
- ThreadAttributes.cs
- WebServiceParameterData.cs
- SmtpReplyReader.cs
- SEHException.cs
- LambdaCompiler.Statements.cs
- CFStream.cs
- TextTreeRootNode.cs
- EntitySetBase.cs
- DetailsViewInsertedEventArgs.cs
- QueryContinueDragEventArgs.cs
- ChameleonKey.cs
- BindingWorker.cs
- _SslSessionsCache.cs
- MeasureItemEvent.cs
- SimpleType.cs
- listitem.cs
- OpenFileDialog.cs
- PageContentCollection.cs
- ListParaClient.cs
- InputLangChangeRequestEvent.cs
- Ports.cs
- TemplateColumn.cs
- XmlSchemaNotation.cs
- ADMembershipUser.cs
- controlskin.cs
- CalendarDay.cs
- WebPartMenu.cs
- Block.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- ObjectSecurity.cs
- QilChoice.cs
- Mapping.cs
- FeatureSupport.cs
- CategoryList.cs
- PropertyGeneratedEventArgs.cs
- TextElement.cs
- Polyline.cs
- TdsParser.cs
- MSG.cs
- CallbackValidator.cs
- SortFieldComparer.cs
- MimeWriter.cs
- RegexParser.cs
- LinkClickEvent.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- Queue.cs
- StorageMappingItemCollection.cs
- CodeIdentifiers.cs
- HtmlTable.cs
- StrokeNodeOperations.cs
- _FixedSizeReader.cs
- ValidationVisibilityAttribute.cs
- WebMessageBodyStyleHelper.cs
- Privilege.cs
- SessionEndingCancelEventArgs.cs
- ProxySimple.cs
- LogWriteRestartAreaAsyncResult.cs
- MultiSelectRootGridEntry.cs
- XmlSerializerFormatAttribute.cs
- SpeechDetectedEventArgs.cs
- URLString.cs
- ListViewPagedDataSource.cs
- NamespaceQuery.cs
- ArgumentNullException.cs
- DataGridViewColumnCollection.cs
- WindowsImpersonationContext.cs
- EmptyReadOnlyDictionaryInternal.cs
- HashSetDebugView.cs
- MessageSecurityOverTcp.cs
- DataObjectMethodAttribute.cs
- TraceListeners.cs
- WebUtil.cs
- PenThreadWorker.cs
- GeneralTransformCollection.cs
- InstallerTypeAttribute.cs
- DispatchChannelSink.cs
- InternalDispatchObject.cs
- ComplexTypeEmitter.cs
- Timer.cs
- AsyncStreamReader.cs
- GPRECTF.cs
- DefaultObjectMappingItemCollection.cs
- XmlIncludeAttribute.cs
- SoapServerMethod.cs
- HostProtectionPermission.cs
- ProxyFragment.cs
- ElementNotAvailableException.cs
- EventLogger.cs
- NamedPipeTransportSecurityElement.cs
- ItemCheckEvent.cs