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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BreadCrumbTextConverter.cs
- InsufficientMemoryException.cs
- QueueException.cs
- SwitchLevelAttribute.cs
- GB18030Encoding.cs
- DesignerLoader.cs
- SpecularMaterial.cs
- AudioFormatConverter.cs
- CompressedStack.cs
- ArgIterator.cs
- TdsRecordBufferSetter.cs
- FieldNameLookup.cs
- SelectionWordBreaker.cs
- AsyncOperationManager.cs
- BookmarkWorkItem.cs
- HexParser.cs
- ParameterCollection.cs
- AssociatedControlConverter.cs
- LogManagementAsyncResult.cs
- RoamingStoreFileUtility.cs
- BooleanConverter.cs
- ReferentialConstraintRoleElement.cs
- QuaternionAnimation.cs
- BoundsDrawingContextWalker.cs
- SQlBooleanStorage.cs
- TextDecorationCollection.cs
- DataGridViewLinkCell.cs
- ImageButton.cs
- TreeViewHitTestInfo.cs
- BufferedGraphics.cs
- ToolStripComboBox.cs
- StreamingContext.cs
- DeviceContext.cs
- FileUtil.cs
- MeasurementDCInfo.cs
- Predicate.cs
- GenericIdentity.cs
- sqlinternaltransaction.cs
- FacetDescriptionElement.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- EtwTrace.cs
- SharedUtils.cs
- MessageEnumerator.cs
- BamlCollectionHolder.cs
- DiscardableAttribute.cs
- ExpressionBuilder.cs
- HotSpotCollection.cs
- ImageIndexEditor.cs
- AssociationTypeEmitter.cs
- XsltInput.cs
- Debug.cs
- HwndProxyElementProvider.cs
- Vector3DAnimationUsingKeyFrames.cs
- BreakRecordTable.cs
- InlineObject.cs
- ZoneButton.cs
- ForeignKeyConstraint.cs
- BasicKeyConstraint.cs
- ObjectDataSourceStatusEventArgs.cs
- FunctionDetailsReader.cs
- FormattedText.cs
- DXD.cs
- ListBase.cs
- Matrix3D.cs
- AssociationEndMember.cs
- BuildResult.cs
- LassoHelper.cs
- AssemblyContextControlItem.cs
- WizardStepCollectionEditor.cs
- KeyInfo.cs
- X509AsymmetricSecurityKey.cs
- DesignerVerb.cs
- TextFormatterContext.cs
- SettingsAttributes.cs
- JpegBitmapEncoder.cs
- DictionaryMarkupSerializer.cs
- ProviderSettingsCollection.cs
- XmlReflectionImporter.cs
- DateTimeOffset.cs
- DomainUpDown.cs
- WmiEventSink.cs
- BitmapFrame.cs
- ContextMarshalException.cs
- CodeTypeMember.cs
- Evidence.cs
- ButtonStandardAdapter.cs
- DynamicScriptObject.cs
- XmlUTF8TextWriter.cs
- ClaimSet.cs
- EntityContainer.cs
- TemplateKey.cs
- MDIControlStrip.cs
- Permission.cs
- EmptyWorkItem.cs
- DbDataSourceEnumerator.cs
- XmlReaderSettings.cs
- BindingList.cs
- HtmlInputPassword.cs
- XsdBuildProvider.cs
- WindowShowOrOpenTracker.cs