Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / Parameter.cs / 2 / Parameter.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;
///
/// represents an ast parameter node
///
internal sealed class Parameter : Expr
{
private string _name;
///
/// initializes parameter
///
///
///
///
///
/// Thrown if the parameter name does not conform to the expected format
///
internal Parameter( string parameterName, string query, int inputPos )
: base(query, inputPos)
{
_name = parameterName.Substring(1);
//
// valid parameter format is: @({LETTER})(_|{LETTER}|{DIGIT})*
//
if (_name.StartsWith("_", StringComparison.OrdinalIgnoreCase) || Char.IsDigit(_name, 0))
{
throw EntityUtil.EntitySqlError(ErrCtx, System.Data.Entity.Strings.InvalidParameterFormat(_name));
}
}
///
/// returns parameter parameterName (without @ sign)
///
internal string Name
{
get { return _name; }
}
}
}
// 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;
///
/// represents an ast parameter node
///
internal sealed class Parameter : Expr
{
private string _name;
///
/// initializes parameter
///
///
///
///
///
/// Thrown if the parameter name does not conform to the expected format
///
internal Parameter( string parameterName, string query, int inputPos )
: base(query, inputPos)
{
_name = parameterName.Substring(1);
//
// valid parameter format is: @({LETTER})(_|{LETTER}|{DIGIT})*
//
if (_name.StartsWith("_", StringComparison.OrdinalIgnoreCase) || Char.IsDigit(_name, 0))
{
throw EntityUtil.EntitySqlError(ErrCtx, System.Data.Entity.Strings.InvalidParameterFormat(_name));
}
}
///
/// returns parameter parameterName (without @ sign)
///
internal string Name
{
get { return _name; }
}
}
}
// 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
- MemberHolder.cs
- GAC.cs
- VectorCollectionConverter.cs
- BindingSource.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SchemaSetCompiler.cs
- RegexParser.cs
- RSACryptoServiceProvider.cs
- ContentValidator.cs
- DecimalAnimationBase.cs
- MsmqMessageProperty.cs
- DrawingCollection.cs
- DataGridColumn.cs
- DataSourceIDConverter.cs
- ValidatorCompatibilityHelper.cs
- XmlSchemaSimpleType.cs
- KeyConverter.cs
- Frame.cs
- DiscreteKeyFrames.cs
- DispatcherEventArgs.cs
- ReflectTypeDescriptionProvider.cs
- IndentedWriter.cs
- ScriptHandlerFactory.cs
- TraceHandler.cs
- assertwrapper.cs
- SecurityStateEncoder.cs
- RegexNode.cs
- ExtendedProtectionPolicyElement.cs
- PackageDocument.cs
- MulticastDelegate.cs
- DataGridViewSortCompareEventArgs.cs
- StatusBar.cs
- NullableLongMinMaxAggregationOperator.cs
- UnsafeNativeMethods.cs
- SqlNotificationEventArgs.cs
- AuthenticatedStream.cs
- ConnectionPointCookie.cs
- ActiveDocumentEvent.cs
- Signature.cs
- InterleavedZipPartStream.cs
- TextRunProperties.cs
- FileChangesMonitor.cs
- TemplateBindingExpressionConverter.cs
- RoleGroup.cs
- EdmScalarPropertyAttribute.cs
- BitmapCodecInfoInternal.cs
- HtmlHistory.cs
- DiffuseMaterial.cs
- DeflateStream.cs
- ExceptionUtility.cs
- DBPropSet.cs
- QuadraticBezierSegment.cs
- ValueChangedEventManager.cs
- PrimitiveXmlSerializers.cs
- GeneralTransformGroup.cs
- TraceHandler.cs
- XamlParser.cs
- SessionKeyExpiredException.cs
- TouchPoint.cs
- XmlSchemaValidationException.cs
- LinqDataSourceContextEventArgs.cs
- FileDialogCustomPlace.cs
- DataTemplate.cs
- Config.cs
- CodeGenerator.cs
- StrokeFIndices.cs
- RowToFieldTransformer.cs
- storepermissionattribute.cs
- Trace.cs
- columnmapkeybuilder.cs
- SchemaCollectionPreprocessor.cs
- BasicViewGenerator.cs
- NetworkCredential.cs
- AssemblyHash.cs
- Buffer.cs
- DesignTimeSiteMapProvider.cs
- ConsoleCancelEventArgs.cs
- DynamicPropertyHolder.cs
- EntityClassGenerator.cs
- DesignerAdapterAttribute.cs
- DataGridAddNewRow.cs
- XmlSerializer.cs
- XmlSequenceWriter.cs
- Wildcard.cs
- SoapAttributeOverrides.cs
- Empty.cs
- TableTextElementCollectionInternal.cs
- SchemaExporter.cs
- SmiRecordBuffer.cs
- TogglePattern.cs
- SQLByte.cs
- DataControlPagerLinkButton.cs
- StringSource.cs
- log.cs
- XmlHierarchyData.cs
- MessagingDescriptionAttribute.cs
- SemaphoreFullException.cs
- DiscreteKeyFrames.cs
- ContainerVisual.cs
- KeyGestureConverter.cs