Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / BuiltInExpr.cs / 2 / BuiltInExpr.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backup [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql { using System; using System.Globalization; using System.Collections; using System.Collections.Generic; ////// defines the function class of builtin expressions. /// internal enum BuiltInKind { And, Or, Not, Cast, OfType, Treat, IsOf, Union, UnionAll, Intersect, Overlaps, AnyElement, Element, Except, Exists, Flatten, In, NotIn, Distinct, IsNull, IsNotNull, Like, Equal, NotEqual, LessEqual, LessThan, GreaterThan, GreaterEqual, Plus, Minus, Multiply, Divide, Modulus, UnaryMinus, UnaryPlus, Between, NotBetween } ////// Represents a builtin ast expression node /// internal sealed class BuiltInExpr : Expr { private BuiltInKind _kind; private string _name; private ExprList_argList = new ExprList (); private BuiltInExpr( BuiltInKind kind, string name ) { _kind = kind; _name = name.ToUpperInvariant(); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1 ) : this(kind, name) { _argList.Add(arg1); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1, Expr arg2 ) : this(kind, name, arg1) { _argList.Add(arg2); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1, Expr arg2, Expr arg3 ) : this(kind, name, arg1, arg2) { _argList.Add(arg3); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1, Expr arg2, Expr arg3, Expr arg4 ) : this(kind, name, arg1, arg2, arg3) { _argList.Add(arg4); } internal BuiltInKind Kind { get { return _kind; } set { _kind = value; } } internal string Name { get { return _name; } } internal ExprList ArgList { get { return _argList; } } internal Expr Arg1 { get { if (_argList.Count < 1) { return null; } return _argList[0]; } } internal Expr Arg2 { get { if (_argList.Count < 2) return null; return _argList[1]; } } internal int ArgCount { get { return ArgList.Count; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backup [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql { using System; using System.Globalization; using System.Collections; using System.Collections.Generic; ////// defines the function class of builtin expressions. /// internal enum BuiltInKind { And, Or, Not, Cast, OfType, Treat, IsOf, Union, UnionAll, Intersect, Overlaps, AnyElement, Element, Except, Exists, Flatten, In, NotIn, Distinct, IsNull, IsNotNull, Like, Equal, NotEqual, LessEqual, LessThan, GreaterThan, GreaterEqual, Plus, Minus, Multiply, Divide, Modulus, UnaryMinus, UnaryPlus, Between, NotBetween } ////// Represents a builtin ast expression node /// internal sealed class BuiltInExpr : Expr { private BuiltInKind _kind; private string _name; private ExprList_argList = new ExprList (); private BuiltInExpr( BuiltInKind kind, string name ) { _kind = kind; _name = name.ToUpperInvariant(); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1 ) : this(kind, name) { _argList.Add(arg1); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1, Expr arg2 ) : this(kind, name, arg1) { _argList.Add(arg2); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1, Expr arg2, Expr arg3 ) : this(kind, name, arg1, arg2) { _argList.Add(arg3); } internal BuiltInExpr( BuiltInKind kind, string name, Expr arg1, Expr arg2, Expr arg3, Expr arg4 ) : this(kind, name, arg1, arg2, arg3) { _argList.Add(arg4); } internal BuiltInKind Kind { get { return _kind; } set { _kind = value; } } internal string Name { get { return _name; } } internal ExprList ArgList { get { return _argList; } } internal Expr Arg1 { get { if (_argList.Count < 1) { return null; } return _argList[0]; } } internal Expr Arg2 { get { if (_argList.Count < 2) return null; return _argList[1]; } } internal int ArgCount { get { return ArgList.Count; } } } } // 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
- DataControlImageButton.cs
- DoubleKeyFrameCollection.cs
- AmbiguousMatchException.cs
- Cursors.cs
- HighContrastHelper.cs
- DrawingImage.cs
- XmlQueryContext.cs
- RelatedImageListAttribute.cs
- Mutex.cs
- RadioButtonAutomationPeer.cs
- EntityDataSourceQueryBuilder.cs
- prompt.cs
- XPathAncestorIterator.cs
- Activator.cs
- ReflectionUtil.cs
- EmptyStringExpandableObjectConverter.cs
- ContainerTracking.cs
- ContextMenu.cs
- MetadataException.cs
- base64Transforms.cs
- TransactionWaitAsyncResult.cs
- Timer.cs
- SizeIndependentAnimationStorage.cs
- StructuralObject.cs
- BamlLocalizabilityResolver.cs
- ButtonBaseAutomationPeer.cs
- CssTextWriter.cs
- CutCopyPasteHelper.cs
- SoapIncludeAttribute.cs
- XmlNode.cs
- AllMembershipCondition.cs
- MissingMethodException.cs
- Qualifier.cs
- ComEventsSink.cs
- SubqueryRules.cs
- DBConnectionString.cs
- New.cs
- XmlParserContext.cs
- BindingCollection.cs
- ZipIOCentralDirectoryBlock.cs
- SQLBinary.cs
- ChangeTracker.cs
- PeerCollaboration.cs
- ToolboxComponentsCreatedEventArgs.cs
- OdbcCommand.cs
- TagMapInfo.cs
- Matrix3DValueSerializer.cs
- InternalUserCancelledException.cs
- IteratorFilter.cs
- XmlSchemaType.cs
- TableNameAttribute.cs
- XmlSerializerOperationGenerator.cs
- SecurityTokenTypes.cs
- IntSecurity.cs
- AttachedPropertyMethodSelector.cs
- XmlException.cs
- DiscoveryDocumentSerializer.cs
- BitmapEffectDrawingContextState.cs
- Mutex.cs
- DataListItemCollection.cs
- EffectiveValueEntry.cs
- HttpProcessUtility.cs
- AvtEvent.cs
- SQLDouble.cs
- JsonSerializer.cs
- ApplicationFileParser.cs
- WebPartConnectionsCancelEventArgs.cs
- AssemblyResourceLoader.cs
- SystemColorTracker.cs
- wgx_exports.cs
- recordstate.cs
- InternalSendMessage.cs
- CheckStoreFileValidityRequest.cs
- IntellisenseTextBox.designer.cs
- CodeNamespaceImportCollection.cs
- TimeSpan.cs
- XmlUtil.cs
- DBAsyncResult.cs
- ServiceHttpHandlerFactory.cs
- HealthMonitoringSection.cs
- ContainerParagraph.cs
- TextOutput.cs
- ResXFileRef.cs
- FixedFlowMap.cs
- DesignerProperties.cs
- GridViewColumn.cs
- SafeRegistryHandle.cs
- TextPattern.cs
- BindingsCollection.cs
- NavigationProgressEventArgs.cs
- TextServicesContext.cs
- CornerRadiusConverter.cs
- SQLConvert.cs
- __FastResourceComparer.cs
- BinaryConverter.cs
- Setter.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- Misc.cs
- ServiceNameElement.cs
- AsyncCompletedEventArgs.cs