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
- ToolStripDropDownMenu.cs
- _SslStream.cs
- ConnectivityStatus.cs
- ControlPaint.cs
- NonBatchDirectoryCompiler.cs
- DirectoryInfo.cs
- SelectionEditingBehavior.cs
- ContainerCodeDomSerializer.cs
- TabControl.cs
- TextServicesContext.cs
- TextModifierScope.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- MasterPageCodeDomTreeGenerator.cs
- SimpleExpression.cs
- ObjectConverter.cs
- WebPartAddingEventArgs.cs
- LockRenewalTask.cs
- SystemResourceHost.cs
- SqlFactory.cs
- OdbcErrorCollection.cs
- LogConverter.cs
- ScrollPatternIdentifiers.cs
- HttpFileCollection.cs
- Calendar.cs
- ConfigurationLockCollection.cs
- SizeValueSerializer.cs
- XmlDigitalSignatureProcessor.cs
- WorkflowTransactionService.cs
- ComponentDesigner.cs
- ConfigXmlText.cs
- ScriptServiceAttribute.cs
- AnnotationResourceCollection.cs
- XPathParser.cs
- XamlRtfConverter.cs
- XmlUnspecifiedAttribute.cs
- ApplicationProxyInternal.cs
- DataViewSetting.cs
- ValidationEventArgs.cs
- SettingsPropertyIsReadOnlyException.cs
- Win32Native.cs
- JoinCqlBlock.cs
- Oid.cs
- LoadedEvent.cs
- DrawingAttributes.cs
- TextSelectionProcessor.cs
- Win32Native.cs
- NamespaceDecl.cs
- TableItemStyle.cs
- ParseNumbers.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DefinitionUpdate.cs
- ScrollChrome.cs
- HttpServerUtilityBase.cs
- XmlSchemaImporter.cs
- VisualTreeHelper.cs
- SelectionList.cs
- MaterialCollection.cs
- CommandID.cs
- OleAutBinder.cs
- WebPartsSection.cs
- DetailsView.cs
- XmlText.cs
- WebEncodingValidator.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- GZipDecoder.cs
- SQLBinaryStorage.cs
- DataGridViewRowsAddedEventArgs.cs
- ObjectMemberMapping.cs
- Metafile.cs
- PanelDesigner.cs
- AbstractSvcMapFileLoader.cs
- ListSortDescription.cs
- ParseElement.cs
- SessionPageStatePersister.cs
- OdbcFactory.cs
- httpserverutility.cs
- ObjectAnimationBase.cs
- MultiPageTextView.cs
- RegexStringValidator.cs
- ZipIOLocalFileHeader.cs
- HttpRequestWrapper.cs
- StringHelper.cs
- MediaContext.cs
- ScrollProviderWrapper.cs
- CommonDialog.cs
- LineBreakRecord.cs
- BypassElementCollection.cs
- RewritingPass.cs
- SqlDuplicator.cs
- SymbolMethod.cs
- PropertiesTab.cs
- DefaultValueAttribute.cs
- TransactionScope.cs
- TagNameToTypeMapper.cs
- FigureHelper.cs
- SpAudioStreamWrapper.cs
- _SSPISessionCache.cs
- SqlUtils.cs
- CharEnumerator.cs
- CodeIndexerExpression.cs