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 / Expr.cs / 1 / Expr.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;
enum AstExprKind
{
Generic,
Query,
Insert,
Update,
Delete
}
///
/// Represents the base type of all Expression Nodes
///
internal abstract class Expr : AstNode
{
internal Expr() : base() { }
internal Expr( string query, int inputPos ) : base(query, inputPos) { }
internal virtual AstExprKind ExprKind
{
get { return AstExprKind.Generic; }
}
}
///
/// Represents generic list of expressions.
///
/// expression type
internal sealed class ExprList : Expr, System.Collections.Generic.IEnumerable
{
private List _exprList = new List();
///
/// default constructor
///
internal ExprList()
{
}
///
/// initializes adding one item to the list.
///
/// expression
internal ExprList( T item )
{
_exprList.Add(item);
}
///
/// add an expression to the expression list.
///
/// Expression
/// Updated ExpressionList
internal ExprList Add( T item )
{
_exprList.Add(item);
return this;
}
///
/// Returns the list of expressions
///
internal List Expressions
{
get { return _exprList; }
}
#if __WHEN_NEEDED__
///
/// Verifies if list elements if of specified type.
///
/// instance of a given type
/// true if is the same type, false otherwise
internal bool IsListOf( object o )
{
return o.GetType().Equals( typeof( T ) );
}
#endif
///
/// Returns the number of elements in the list
///
internal int Count
{
get { return _exprList.Count; }
}
///
/// Indexer to the list entries.
///
/// integer position of the element in the list
/// Expression
internal T this[int index]
{
get { return _exprList[index]; }
}
#region GetEnumerator
System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator()
{
return _exprList.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return _exprList.GetEnumerator();
}
#endregion
}
}
// 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;
enum AstExprKind
{
Generic,
Query,
Insert,
Update,
Delete
}
///
/// Represents the base type of all Expression Nodes
///
internal abstract class Expr : AstNode
{
internal Expr() : base() { }
internal Expr( string query, int inputPos ) : base(query, inputPos) { }
internal virtual AstExprKind ExprKind
{
get { return AstExprKind.Generic; }
}
}
///
/// Represents generic list of expressions.
///
/// expression type
internal sealed class ExprList : Expr, System.Collections.Generic.IEnumerable
{
private List _exprList = new List();
///
/// default constructor
///
internal ExprList()
{
}
///
/// initializes adding one item to the list.
///
/// expression
internal ExprList( T item )
{
_exprList.Add(item);
}
///
/// add an expression to the expression list.
///
/// Expression
/// Updated ExpressionList
internal ExprList Add( T item )
{
_exprList.Add(item);
return this;
}
///
/// Returns the list of expressions
///
internal List Expressions
{
get { return _exprList; }
}
#if __WHEN_NEEDED__
///
/// Verifies if list elements if of specified type.
///
/// instance of a given type
/// true if is the same type, false otherwise
internal bool IsListOf( object o )
{
return o.GetType().Equals( typeof( T ) );
}
#endif
///
/// Returns the number of elements in the list
///
internal int Count
{
get { return _exprList.Count; }
}
///
/// Indexer to the list entries.
///
/// integer position of the element in the list
/// Expression
internal T this[int index]
{
get { return _exprList[index]; }
}
#region GetEnumerator
System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator()
{
return _exprList.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return _exprList.GetEnumerator();
}
#endregion
}
}
// 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
- FilterException.cs
- SessionViewState.cs
- DataControlCommands.cs
- ReadOnlyHierarchicalDataSourceView.cs
- HtmlShim.cs
- DataControlFieldCollection.cs
- Misc.cs
- XmlEnumAttribute.cs
- OdbcConnectionFactory.cs
- ExpressionBinding.cs
- XmlDataLoader.cs
- ProgressiveCrcCalculatingStream.cs
- MetaChildrenColumn.cs
- CultureTable.cs
- MissingManifestResourceException.cs
- ScrollViewerAutomationPeer.cs
- SQLDoubleStorage.cs
- wgx_sdk_version.cs
- RegexCaptureCollection.cs
- PriorityQueue.cs
- DataKeyCollection.cs
- ExtractorMetadata.cs
- WorkflowRuntime.cs
- CompilerInfo.cs
- BCryptNative.cs
- DeploymentSection.cs
- JsonDeserializer.cs
- webbrowsersite.cs
- ColorAnimationBase.cs
- ProfileModule.cs
- NameTable.cs
- ItemAutomationPeer.cs
- Int16Animation.cs
- DataGridItemAttachedStorage.cs
- SessionStateItemCollection.cs
- ValidatorCompatibilityHelper.cs
- OutputCacheProfile.cs
- UnsettableComboBox.cs
- Marshal.cs
- Queue.cs
- Mouse.cs
- ObjectStorage.cs
- ElementHost.cs
- IsolatedStorageFilePermission.cs
- RectAnimationBase.cs
- PopupRootAutomationPeer.cs
- ObjectDataSourceEventArgs.cs
- IndentedWriter.cs
- FormsAuthenticationUserCollection.cs
- util.cs
- Thread.cs
- UriParserTemplates.cs
- TreeNode.cs
- bindurihelper.cs
- _TimerThread.cs
- ConstantExpression.cs
- PathTooLongException.cs
- ToolboxItemSnapLineBehavior.cs
- ReadOnlyAttribute.cs
- GPPOINTF.cs
- SqlHelper.cs
- NetPeerTcpBindingCollectionElement.cs
- HeaderElement.cs
- _DomainName.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DataSourceGroupCollection.cs
- ExecutionEngineException.cs
- SchemaCollectionPreprocessor.cs
- CipherData.cs
- ControlPropertyNameConverter.cs
- InlineUIContainer.cs
- Line.cs
- x509store.cs
- NetStream.cs
- BufferedReadStream.cs
- CanonicalizationDriver.cs
- PrinterSettings.cs
- StyleSheetComponentEditor.cs
- MenuItemBindingCollection.cs
- SqlFunctionAttribute.cs
- DataTablePropertyDescriptor.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- TreeBuilder.cs
- TextEndOfLine.cs
- ResizeBehavior.cs
- DebugView.cs
- Resources.Designer.cs
- ToolStripDropDownClosedEventArgs.cs
- ReflectTypeDescriptionProvider.cs
- SizeChangedInfo.cs
- HttpResponseWrapper.cs
- Rijndael.cs
- counter.cs
- DatePickerDateValidationErrorEventArgs.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- sqlstateclientmanager.cs
- IResourceProvider.cs
- WebPartTransformerCollection.cs
- SqlError.cs
- PnrpPermission.cs