Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / AST / Identifier.cs / 1305376 / Identifier.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; using System.Text; ////// Represents an identifier ast node. /// internal sealed class Identifier : Node { private readonly string _name; private readonly bool _isEscaped; ////// Initializes identifier. /// internal Identifier(string symbol, bool isEscaped, string query, int inputPos) : base(query, inputPos) { Debug.Assert(!String.IsNullOrEmpty(symbol), "symbol must not be null or empty"); string name = symbol; if (isEscaped) { if (name.Length < 2 || name[0] != '[' || name[name.Length - 1] != ']') { throw EntityUtil.EntitySqlError(this.ErrCtx, System.Data.Entity.Strings.InvalidEscapedIdentifier(name)); } name = name.Substring(1, name.Length - 2); } else { bool isIdentifierASCII = true; if (!CqlLexer.IsLetterOrDigitOrUnderscore(name, out isIdentifierASCII)) { if (isIdentifierASCII) { throw EntityUtil.EntitySqlError(this.ErrCtx, System.Data.Entity.Strings.InvalidSimpleIdentifier(name)); } else { throw EntityUtil.EntitySqlError(this.ErrCtx, System.Data.Entity.Strings.InvalidSimpleIdentifierNonASCII(name)); } } } _name = name; _isEscaped = isEscaped; } ////// Returns identifier name (without escaping chars). /// internal string Name { get { return _name; } } ////// True if an identifier is escaped. /// internal bool IsEscaped { get { return _isEscaped; } } } } // 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
- SortDescription.cs
- CompilerGlobalScopeAttribute.cs
- DataGridViewEditingControlShowingEventArgs.cs
- DesignerProperties.cs
- ReliabilityContractAttribute.cs
- SmiContext.cs
- CircleHotSpot.cs
- TraceXPathNavigator.cs
- ToolStripDropDown.cs
- PkcsMisc.cs
- FormViewPagerRow.cs
- ApplicationFileParser.cs
- ContextBase.cs
- XamlDesignerSerializationManager.cs
- Monitor.cs
- TagNameToTypeMapper.cs
- IteratorDescriptor.cs
- ConfigViewGenerator.cs
- login.cs
- AggregateNode.cs
- HtmlEncodedRawTextWriter.cs
- ConsumerConnectionPoint.cs
- NumberAction.cs
- WebPartMinimizeVerb.cs
- ToolStripItemBehavior.cs
- KeyboardEventArgs.cs
- BaseInfoTable.cs
- _BaseOverlappedAsyncResult.cs
- ExtentCqlBlock.cs
- StreamInfo.cs
- SendKeys.cs
- DiscoveryMessageSequenceGenerator.cs
- FlowLayout.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TableHeaderCell.cs
- Content.cs
- Version.cs
- SoapCommonClasses.cs
- Queue.cs
- Transform.cs
- SelectionProcessor.cs
- IdentityNotMappedException.cs
- NavigateUrlConverter.cs
- DocumentEventArgs.cs
- MetadataPropertyCollection.cs
- ICspAsymmetricAlgorithm.cs
- XmlSchemaAttribute.cs
- ResXDataNode.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ColorAnimation.cs
- ProtocolElementCollection.cs
- CodeSnippetExpression.cs
- ComponentResourceKey.cs
- xsdvalidator.cs
- DirectoryNotFoundException.cs
- BuildProvidersCompiler.cs
- VirtualPathData.cs
- FlowLayoutPanel.cs
- StringExpressionSet.cs
- UserPersonalizationStateInfo.cs
- SystemDropShadowChrome.cs
- XmlSchemaRedefine.cs
- SettingsBase.cs
- Dispatcher.cs
- FileNotFoundException.cs
- OdbcConnectionPoolProviderInfo.cs
- URLMembershipCondition.cs
- ServiceReference.cs
- SR.cs
- LocalizableAttribute.cs
- DocumentReferenceCollection.cs
- HasCopySemanticsAttribute.cs
- PersonalizableTypeEntry.cs
- BindableTemplateBuilder.cs
- AssemblyResourceLoader.cs
- httpserverutility.cs
- PeerNameRecord.cs
- BitmapEffect.cs
- DrawToolTipEventArgs.cs
- TextEffect.cs
- StorageMappingItemCollection.cs
- webbrowsersite.cs
- Sorting.cs
- AssociatedControlConverter.cs
- OraclePermission.cs
- StylusLogic.cs
- ObjectRef.cs
- ReadOnlyHierarchicalDataSourceView.cs
- WebBrowserDesigner.cs
- ToolStrip.cs
- GC.cs
- DBCommandBuilder.cs
- SchemaEntity.cs
- AssemblyFilter.cs
- ListContractAdapter.cs
- Object.cs
- X509WindowsSecurityToken.cs
- OleDbRowUpdatedEvent.cs
- SqlConnectionStringBuilder.cs
- DetailsViewModeEventArgs.cs