Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / AliasExpr.cs / 1 / AliasExpr.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql { using System; using System.Globalization; using System.Collections; using System.Collections.Generic; ////// Represents a possibly aliased expression. /// internal sealed class AliasExpr : Expr { private Expr _expr; private Identifier _aliasId; internal AliasExpr( Expr expr , Identifier aliasId ) { ValidateAlias(aliasId); _aliasId = aliasId; _expr = expr; } internal AliasExpr( Expr expr ) { _expr = expr; } ////// returns true if expression is aliased, false otherwise /// internal bool HasAlias { get { return ( null != _aliasId ); } } ////// returns expression alias identifier, or null if not aliased /// internal Identifier AliasIdentifier { get { return _aliasId; } } ////// returns expression /// internal Expr Expr { get { return _expr; } } ////// validates alias identifier /// /// private static void ValidateAlias(Identifier aliasIdentifier) { if (String.IsNullOrEmpty(aliasIdentifier.Name)) { throw EntityUtil.EntitySqlError(aliasIdentifier.ErrCtx, System.Data.Entity.Strings.InvalidEmptyIdentifier); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql { using System; using System.Globalization; using System.Collections; using System.Collections.Generic; ////// Represents a possibly aliased expression. /// internal sealed class AliasExpr : Expr { private Expr _expr; private Identifier _aliasId; internal AliasExpr( Expr expr , Identifier aliasId ) { ValidateAlias(aliasId); _aliasId = aliasId; _expr = expr; } internal AliasExpr( Expr expr ) { _expr = expr; } ////// returns true if expression is aliased, false otherwise /// internal bool HasAlias { get { return ( null != _aliasId ); } } ////// returns expression alias identifier, or null if not aliased /// internal Identifier AliasIdentifier { get { return _aliasId; } } ////// returns expression /// internal Expr Expr { get { return _expr; } } ////// validates alias identifier /// /// private static void ValidateAlias(Identifier aliasIdentifier) { if (String.IsNullOrEmpty(aliasIdentifier.Name)) { throw EntityUtil.EntitySqlError(aliasIdentifier.ErrCtx, System.Data.Entity.Strings.InvalidEmptyIdentifier); } } } } // 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
- TypeDescriptorContext.cs
- MarkerProperties.cs
- FormsAuthenticationUserCollection.cs
- XmlHierarchicalDataSourceView.cs
- WebPartTracker.cs
- FontStyles.cs
- PropertyRef.cs
- DigestComparer.cs
- VoiceChangeEventArgs.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- LogExtent.cs
- PropertyGridView.cs
- QilList.cs
- SubpageParaClient.cs
- DataListAutoFormat.cs
- SqlDependencyListener.cs
- ReversePositionQuery.cs
- OneOf.cs
- Setter.cs
- SignedInfo.cs
- bindurihelper.cs
- RectangleF.cs
- SmtpCommands.cs
- wgx_commands.cs
- TabPage.cs
- RemoteWebConfigurationHostStream.cs
- MdiWindowListItemConverter.cs
- CodeArrayCreateExpression.cs
- ExecutionContext.cs
- WindowsFormsHostPropertyMap.cs
- SharedPersonalizationStateInfo.cs
- GridViewHeaderRowPresenter.cs
- ConsoleKeyInfo.cs
- XmlElementAttribute.cs
- SynchronizationContext.cs
- OleDbConnection.cs
- SqlConnectionHelper.cs
- ContainerSelectorActiveEvent.cs
- AutoSizeComboBox.cs
- AuthenticationManager.cs
- SqlPersistenceProviderFactory.cs
- FrugalMap.cs
- WriteTimeStream.cs
- AuthenticationService.cs
- RoleGroupCollection.cs
- TextAnchor.cs
- WebBrowserNavigatedEventHandler.cs
- RemoteDebugger.cs
- BitmapData.cs
- StaticExtensionConverter.cs
- ObjectTag.cs
- SimpleTypesSurrogate.cs
- SoundPlayer.cs
- HandleValueEditor.cs
- GcSettings.cs
- AutomationPeer.cs
- TrimSurroundingWhitespaceAttribute.cs
- OutOfMemoryException.cs
- SqlUserDefinedAggregateAttribute.cs
- BatchWriter.cs
- SqlProviderUtilities.cs
- SignatureToken.cs
- DataControlLinkButton.cs
- GetImportFileNameRequest.cs
- AbstractSvcMapFileLoader.cs
- UnSafeCharBuffer.cs
- ToolBarPanel.cs
- ContextMenuStripActionList.cs
- DataGridTablesFactory.cs
- httpapplicationstate.cs
- StateWorkerRequest.cs
- EndpointDispatcher.cs
- TrackingProfileManager.cs
- ProcessModule.cs
- TrustLevel.cs
- TypeLoadException.cs
- RectangleGeometry.cs
- OdbcErrorCollection.cs
- ModelPropertyImpl.cs
- WindowsGraphics2.cs
- SplayTreeNode.cs
- NativeDirectoryServicesQueryAPIs.cs
- CqlIdentifiers.cs
- SortKey.cs
- QueryCacheEntry.cs
- RichTextBoxContextMenu.cs
- BufferedGraphics.cs
- SharedUtils.cs
- TableRowGroup.cs
- ExceptionHandlerDesigner.cs
- StickyNote.cs
- KoreanCalendar.cs
- FactoryRecord.cs
- InputScopeNameConverter.cs
- EtwTrace.cs
- oledbmetadatacolumnnames.cs
- TypeBuilderInstantiation.cs
- MenuRenderer.cs
- XmlReader.cs
- TableParagraph.cs