Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / AST / DotExpr.cs / 1305376 / DotExpr.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql.AST { using System; using System.Globalization; using System.Collections; using System.Collections.Generic; using System.Diagnostics; ////// Represents dotExpr: expr.Identifier /// internal sealed class DotExpr : Node { private readonly Node _leftExpr; private readonly Identifier _identifier; private bool? _isMultipartIdentifierComputed; private string[] _names; ////// initializes /// internal DotExpr(Node leftExpr, Identifier id) { _leftExpr = leftExpr; _identifier = id; } ////// For the following expression: "a.b.c.d", Left returns "a.b.c". /// internal Node Left { get { return _leftExpr; } } ////// For the following expression: "a.b.c.d", Identifier returns "d". /// internal Identifier Identifier { get { return _identifier; } } ////// Returns true if all parts of this expression are identifiers like in "a.b.c", /// false for expressions like "FunctionCall().a.b.c". /// internal bool IsMultipartIdentifier(out string[] names) { if (_isMultipartIdentifierComputed.HasValue) { names = _names; return _isMultipartIdentifierComputed.Value; } _names = null; Identifier leftIdenitifier = _leftExpr as Identifier; if (leftIdenitifier != null) { _names = new string[] { leftIdenitifier.Name, _identifier.Name }; } DotExpr leftDotExpr = _leftExpr as DotExpr; string[] leftNames; if (leftDotExpr != null && leftDotExpr.IsMultipartIdentifier(out leftNames)) { _names = new string[leftNames.Length + 1]; leftNames.CopyTo(_names, 0); _names[_names.Length - 1] = _identifier.Name; } Debug.Assert(_names == null || _names.Length > 0, "_names must be null or non-empty"); _isMultipartIdentifierComputed = _names != null; names = _names; return _isMultipartIdentifierComputed.Value; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextElementCollection.cs
- GeneratedView.cs
- OleDbInfoMessageEvent.cs
- GorillaCodec.cs
- RightNameExpirationInfoPair.cs
- TriggerAction.cs
- SvcMapFileSerializer.cs
- InvalidDataContractException.cs
- SqlDataSourceSummaryPanel.cs
- ReferenceService.cs
- SectionInput.cs
- ScrollableControl.cs
- SafeLocalMemHandle.cs
- OperationCanceledException.cs
- ReachDocumentSequenceSerializer.cs
- DataRecordObjectView.cs
- WinCategoryAttribute.cs
- SegmentInfo.cs
- ToolBarPanel.cs
- Freezable.cs
- ApplicationTrust.cs
- EventHandlersDesigner.cs
- ParallelRangeManager.cs
- WinEventQueueItem.cs
- PDBReader.cs
- DbProviderFactories.cs
- EntityParameterCollection.cs
- VBIdentifierName.cs
- HandlerBase.cs
- VisualStyleTypesAndProperties.cs
- SlotInfo.cs
- X509Extension.cs
- DataGridViewComboBoxEditingControl.cs
- GridViewRowEventArgs.cs
- IteratorFilter.cs
- TextSyndicationContentKindHelper.cs
- ModelServiceImpl.cs
- GradientStop.cs
- DataControlCommands.cs
- WindowsComboBox.cs
- ServiceBuildProvider.cs
- Label.cs
- WebPartMovingEventArgs.cs
- SkewTransform.cs
- StylusCollection.cs
- SecurityTokenTypes.cs
- ImageMapEventArgs.cs
- StateBag.cs
- PointAnimationBase.cs
- TextRunCache.cs
- RequiredFieldValidator.cs
- WindowsMenu.cs
- SizeConverter.cs
- GcHandle.cs
- TargetControlTypeCache.cs
- Graph.cs
- ScriptControlManager.cs
- EditorBrowsableAttribute.cs
- DataMisalignedException.cs
- TypeUtils.cs
- SHA512.cs
- GuidTagList.cs
- PageAsyncTask.cs
- UpWmlMobileTextWriter.cs
- ControlFilterExpression.cs
- RoleManagerSection.cs
- ManagementDateTime.cs
- ThreadExceptionEvent.cs
- StringConverter.cs
- UnsafeNativeMethods.cs
- basemetadatamappingvisitor.cs
- SecurityException.cs
- StateRuntime.cs
- Visual3D.cs
- NavigationPropertySingletonExpression.cs
- HtmlImageAdapter.cs
- OverrideMode.cs
- LayoutTable.cs
- FileChangesMonitor.cs
- FileRegion.cs
- ProbeMatchesApril2005.cs
- IsolatedStorageFilePermission.cs
- SchemaImporterExtensionElement.cs
- CorrelationValidator.cs
- PopupEventArgs.cs
- GeneralTransform.cs
- BrowserDefinitionCollection.cs
- SqlDataSourceSelectingEventArgs.cs
- InputScopeConverter.cs
- MethodBody.cs
- SessionStateItemCollection.cs
- OleDbDataReader.cs
- HyperlinkAutomationPeer.cs
- Guid.cs
- PagePropertiesChangingEventArgs.cs
- StringReader.cs
- Util.cs
- WorkflowEventArgs.cs
- ComponentRenameEvent.cs
- XmlRawWriterWrapper.cs