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
- KeyGestureValueSerializer.cs
- ImmutableCommunicationTimeouts.cs
- PostBackOptions.cs
- DataGridAutoFormat.cs
- ColumnMapVisitor.cs
- DeadCharTextComposition.cs
- AdornerLayer.cs
- SerTrace.cs
- GacUtil.cs
- MediaTimeline.cs
- RequestResizeEvent.cs
- NaturalLanguageHyphenator.cs
- CanonicalFontFamilyReference.cs
- printdlgexmarshaler.cs
- AsmxEndpointPickerExtension.cs
- CodeCatchClause.cs
- GetIndexBinder.cs
- StyleSelector.cs
- basecomparevalidator.cs
- ResXResourceWriter.cs
- TagElement.cs
- SplitterPanel.cs
- SizeAnimationBase.cs
- EntityDataSourceValidationException.cs
- ASCIIEncoding.cs
- Relationship.cs
- StorageModelBuildProvider.cs
- XmlLanguage.cs
- PageFunction.cs
- MediaCommands.cs
- BooleanSwitch.cs
- CredentialCache.cs
- HwndSubclass.cs
- PropagatorResult.cs
- PanelContainerDesigner.cs
- TextEditorTables.cs
- OdbcUtils.cs
- DetailsViewInsertEventArgs.cs
- SystemPens.cs
- DataGridViewCheckBoxColumn.cs
- XmlValueConverter.cs
- MailSettingsSection.cs
- Canvas.cs
- EmptyCollection.cs
- SmtpNegotiateAuthenticationModule.cs
- templategroup.cs
- Permission.cs
- DataSetMappper.cs
- WindowsImpersonationContext.cs
- ObjectItemNoOpAssemblyLoader.cs
- ISFTagAndGuidCache.cs
- ClipboardProcessor.cs
- SqlReorderer.cs
- LabelExpression.cs
- DataGridViewBand.cs
- MediaScriptCommandRoutedEventArgs.cs
- PublisherIdentityPermission.cs
- WindowsStatusBar.cs
- ReadWriteSpinLock.cs
- SafeUserTokenHandle.cs
- ContainsRowNumberChecker.cs
- CroppedBitmap.cs
- WebUtility.cs
- InstanceLockTracking.cs
- SmiGettersStream.cs
- TextEditorMouse.cs
- BitmapImage.cs
- XPathNodePointer.cs
- Region.cs
- SessionSwitchEventArgs.cs
- ListParagraph.cs
- RemotingConfigParser.cs
- DataGridTextBox.cs
- MissingMemberException.cs
- MailMessage.cs
- IsolatedStorageException.cs
- ChildrenQuery.cs
- Codec.cs
- Timeline.cs
- DrawingAttributes.cs
- ExceptionList.cs
- SqlServer2KCompatibilityAnnotation.cs
- XmlReflectionImporter.cs
- WindowShowOrOpenTracker.cs
- SHA256Managed.cs
- CatalogPartChrome.cs
- SubstitutionList.cs
- AxHost.cs
- NonClientArea.cs
- UnmanagedMemoryAccessor.cs
- KnownBoxes.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- FormViewModeEventArgs.cs
- ScriptingJsonSerializationSection.cs
- PrivacyNoticeElement.cs
- figurelengthconverter.cs
- HttpProfileGroupBase.cs
- Helper.cs
- PerformanceCounterManager.cs
- Stacktrace.cs