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
- BindingEditor.xaml.cs
- DataGridParentRows.cs
- MetadataCache.cs
- XmlNodeComparer.cs
- SystemIcmpV6Statistics.cs
- CodeTypeOfExpression.cs
- CompensatableTransactionScopeActivityDesigner.cs
- Msmq.cs
- HitTestWithPointDrawingContextWalker.cs
- SelectionItemProviderWrapper.cs
- GeometryHitTestParameters.cs
- Span.cs
- InvalidCastException.cs
- Stream.cs
- PixelShader.cs
- RTLAwareMessageBox.cs
- XamlGridLengthSerializer.cs
- UInt32Storage.cs
- SafeCloseHandleCritical.cs
- RegexRunner.cs
- TryCatchDesigner.xaml.cs
- EndpointNotFoundException.cs
- BitmapImage.cs
- RecipientInfo.cs
- CommonObjectSecurity.cs
- userdatakeys.cs
- InvokePattern.cs
- DispatcherTimer.cs
- RsaEndpointIdentity.cs
- XmlSerializerSection.cs
- StylusLogic.cs
- AutomationProperty.cs
- SequenceFullException.cs
- RichTextBoxAutomationPeer.cs
- RectangleGeometry.cs
- FolderBrowserDialog.cs
- DynamicActivityXamlReader.cs
- ErrorRuntimeConfig.cs
- ChannelHandler.cs
- SapiAttributeParser.cs
- Process.cs
- DataGridDetailsPresenterAutomationPeer.cs
- ScaleTransform3D.cs
- ActivationServices.cs
- DataGridBoolColumn.cs
- TrackingServices.cs
- XDeferredAxisSource.cs
- WorkflowInstanceRecord.cs
- SrgsItemList.cs
- Timeline.cs
- PhonemeEventArgs.cs
- XmlnsCache.cs
- OracleBinary.cs
- ToolBar.cs
- ListViewContainer.cs
- PriorityBindingExpression.cs
- AsyncOperationManager.cs
- BasicKeyConstraint.cs
- Bits.cs
- SafeSerializationManager.cs
- _UriTypeConverter.cs
- TimeSpanSecondsConverter.cs
- ProfilePropertyNameValidator.cs
- TemplateKeyConverter.cs
- _NetworkingPerfCounters.cs
- ConstructorNeedsTagAttribute.cs
- ProxyWebPart.cs
- CompensationHandlingFilter.cs
- SafeHandle.cs
- InternalCache.cs
- NativeRightsManagementAPIsStructures.cs
- ProviderIncompatibleException.cs
- WebPageTraceListener.cs
- SplitterEvent.cs
- WebPartDisplayModeCollection.cs
- ProxyAttribute.cs
- VisualBrush.cs
- TrustLevel.cs
- PackWebRequestFactory.cs
- BaseDataList.cs
- SqlPersonalizationProvider.cs
- DrawingServices.cs
- ServiceReflector.cs
- BindingsCollection.cs
- CharacterMetrics.cs
- CodeBlockBuilder.cs
- DataControlFieldHeaderCell.cs
- BindingCompleteEventArgs.cs
- _SpnDictionary.cs
- SqlTypeConverter.cs
- SortDescription.cs
- ReflectEventDescriptor.cs
- FieldBuilder.cs
- DnsPermission.cs
- ConnectionStringEditor.cs
- VariableAction.cs
- securitycriticaldata.cs
- BrowserDefinition.cs
- NullExtension.cs
- ProfilePropertyNameValidator.cs