Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Utils / ExternalCalls.cs / 2 / ExternalCalls.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Data.Mapping.ViewGeneration.Structures;
using System.Data.Common.CommandTrees;
using System.Data.Common.EntitySql;
using System.Data.Metadata.Edm;
using System.Diagnostics;
using System.Collections.Generic;
namespace System.Data.Mapping.ViewGeneration.Utils {
// This class encapsulates "external" calls from view generation
// to other System.Data.Entity components
internal static class ExternalCalls {
static internal bool IsReservedKeyword(string name) {
return CqlLexer.IsReservedKeyword(name);
}
static internal DbCommandTree CompileView(string viewDef, MetadataWorkspace metadataWorkspace, ParserOptions.CompilationMode compilationMode) {
Perspective perspective = new TargetPerspective(metadataWorkspace);
ParserOptions parserOptions = new ParserOptions();
parserOptions.ParserCompilationMode = compilationMode;
DbCommandTree expr = CqlQuery.Compile(viewDef, perspective, parserOptions, null, null, true);
Debug.Assert(expr != null, "Compile returned empty tree?");
return expr;
}
static internal ItemCollection GetItemCollection(MetadataWorkspace workspace, DataSpace space) {
return workspace.GetItemCollection(space);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Data.Mapping.ViewGeneration.Structures;
using System.Data.Common.CommandTrees;
using System.Data.Common.EntitySql;
using System.Data.Metadata.Edm;
using System.Diagnostics;
using System.Collections.Generic;
namespace System.Data.Mapping.ViewGeneration.Utils {
// This class encapsulates "external" calls from view generation
// to other System.Data.Entity components
internal static class ExternalCalls {
static internal bool IsReservedKeyword(string name) {
return CqlLexer.IsReservedKeyword(name);
}
static internal DbCommandTree CompileView(string viewDef, MetadataWorkspace metadataWorkspace, ParserOptions.CompilationMode compilationMode) {
Perspective perspective = new TargetPerspective(metadataWorkspace);
ParserOptions parserOptions = new ParserOptions();
parserOptions.ParserCompilationMode = compilationMode;
DbCommandTree expr = CqlQuery.Compile(viewDef, perspective, parserOptions, null, null, true);
Debug.Assert(expr != null, "Compile returned empty tree?");
return expr;
}
static internal ItemCollection GetItemCollection(MetadataWorkspace workspace, DataSpace space) {
return workspace.GetItemCollection(space);
}
}
}
// 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
- CodeParameterDeclarationExpressionCollection.cs
- FixedSOMTableRow.cs
- DocumentViewerBaseAutomationPeer.cs
- ISAPIRuntime.cs
- ExtractedStateEntry.cs
- StylusPointPropertyInfoDefaults.cs
- IPipelineRuntime.cs
- PropertyGrid.cs
- BulletedList.cs
- PeerCollaborationPermission.cs
- XamlSerializationHelper.cs
- ElementHostAutomationPeer.cs
- DataList.cs
- PageContent.cs
- StyleXamlParser.cs
- SharedDp.cs
- ApplicationSettingsBase.cs
- AttachedAnnotation.cs
- ConnectionStringsExpressionBuilder.cs
- StatusBar.cs
- TextMetrics.cs
- SqlBuffer.cs
- peersecuritysettings.cs
- XmlWriterSettings.cs
- NameHandler.cs
- ReflectEventDescriptor.cs
- TabletDevice.cs
- ActivityInstanceReference.cs
- Duration.cs
- SerializableAuthorizationContext.cs
- DocumentSequenceHighlightLayer.cs
- SerializationFieldInfo.cs
- RuntimeConfigLKG.cs
- OciLobLocator.cs
- __TransparentProxy.cs
- SmtpReplyReaderFactory.cs
- ListSortDescription.cs
- webclient.cs
- serverconfig.cs
- webbrowsersite.cs
- MultiDataTrigger.cs
- ProfileProvider.cs
- ACE.cs
- HMACSHA256.cs
- UnsafeNativeMethods.cs
- CharConverter.cs
- TypeSystem.cs
- ThemeDirectoryCompiler.cs
- SignedXml.cs
- StylusSystemGestureEventArgs.cs
- DataGridViewCellEventArgs.cs
- ActivityMarkupSerializer.cs
- DataRowChangeEvent.cs
- ObjectStateFormatter.cs
- ClientSettings.cs
- TypeExtension.cs
- ParserStreamGeometryContext.cs
- PrincipalPermission.cs
- SqlTypesSchemaImporter.cs
- ColorInterpolationModeValidation.cs
- COM2PropertyPageUITypeConverter.cs
- BitmapEffectGroup.cs
- ToolboxItemAttribute.cs
- MSHTMLHost.cs
- DecoderFallbackWithFailureFlag.cs
- MailDefinition.cs
- Action.cs
- BindingGraph.cs
- XmlSchemaAnnotation.cs
- login.cs
- MeasureItemEvent.cs
- GridViewRowPresenterBase.cs
- FormViewPageEventArgs.cs
- MarkupWriter.cs
- TextLineBreak.cs
- StretchValidation.cs
- DefaultBindingPropertyAttribute.cs
- FragmentQuery.cs
- MediaElementAutomationPeer.cs
- Argument.cs
- ILGenerator.cs
- GreaterThan.cs
- ServiceOperationUIEditor.cs
- PersonalizationEntry.cs
- NullableDecimalSumAggregationOperator.cs
- TableSectionStyle.cs
- SqlAggregateChecker.cs
- SqlProviderManifest.cs
- MenuCommand.cs
- ClientEventManager.cs
- FixedFindEngine.cs
- DataContractSerializer.cs
- FamilyCollection.cs
- InputProviderSite.cs
- TextEmbeddedObject.cs
- cookieexception.cs
- InternalConfigConfigurationFactory.cs
- HtmlGenericControl.cs
- ParserHooks.cs
- FactoryId.cs