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
- RankException.cs
- BinaryKeyIdentifierClause.cs
- BaseTemplateBuildProvider.cs
- Rijndael.cs
- TextProviderWrapper.cs
- FrameworkElementFactoryMarkupObject.cs
- HtmlInputRadioButton.cs
- TemplatedWizardStep.cs
- ProbeMatches11.cs
- PixelShader.cs
- WindowAutomationPeer.cs
- storepermissionattribute.cs
- ClipboardData.cs
- StructuralCache.cs
- SafeLocalMemHandle.cs
- HtmlEncodedRawTextWriter.cs
- _Win32.cs
- SnapshotChangeTrackingStrategy.cs
- MenuItemCollection.cs
- SizeAnimationBase.cs
- OpenTypeLayoutCache.cs
- PixelFormats.cs
- wgx_commands.cs
- MenuDesigner.cs
- VisualTreeUtils.cs
- IdnElement.cs
- BoundColumn.cs
- HttpModuleAction.cs
- ToolStripTextBox.cs
- UrlEncodedParameterWriter.cs
- DataKeyCollection.cs
- XmlEventCache.cs
- DetailsView.cs
- ReadOnlyHierarchicalDataSource.cs
- XmlSchemaSimpleType.cs
- RepeatBehaviorConverter.cs
- ParallelRangeManager.cs
- CanonicalXml.cs
- DomainConstraint.cs
- ViewStateAttachedPropertyFeature.cs
- CodeSnippetExpression.cs
- ReadOnlyDictionary.cs
- XmlSchemaSimpleTypeUnion.cs
- Geometry.cs
- XmlWellformedWriter.cs
- SHA512Managed.cs
- HttpsTransportElement.cs
- Clock.cs
- ToolbarAUtomationPeer.cs
- TextSelectionProcessor.cs
- SqlProvider.cs
- ToolStripOverflow.cs
- QuadraticBezierSegment.cs
- OracleFactory.cs
- CustomMenuItemCollection.cs
- EntityDesignerUtils.cs
- PingReply.cs
- MediaTimeline.cs
- EventLogPermissionEntry.cs
- VectorCollectionValueSerializer.cs
- MetadataSource.cs
- Visual.cs
- FamilyCollection.cs
- EdmError.cs
- SettingsPropertyValueCollection.cs
- Identifier.cs
- LayoutEvent.cs
- BatchParser.cs
- TagMapCollection.cs
- sqlcontext.cs
- TimeoutException.cs
- RightNameExpirationInfoPair.cs
- LifetimeMonitor.cs
- DesignTimeTemplateParser.cs
- Int64Converter.cs
- ReaderContextStackData.cs
- CodeSubDirectoriesCollection.cs
- VoiceObjectToken.cs
- CodeDOMUtility.cs
- PrimitiveCodeDomSerializer.cs
- EntitySqlException.cs
- MenuRendererClassic.cs
- SimpleRecyclingCache.cs
- TimestampInformation.cs
- AttributeCollection.cs
- HTMLTextWriter.cs
- SmiEventSink_DeferedProcessing.cs
- AxHostDesigner.cs
- ContextBase.cs
- DependencyPropertyChangedEventArgs.cs
- CacheForPrimitiveTypes.cs
- PanelStyle.cs
- TabletDeviceInfo.cs
- TextParaLineResult.cs
- DragEventArgs.cs
- SocketAddress.cs
- TableCell.cs
- CryptoProvider.cs
- FormViewUpdatedEventArgs.cs
- AutomationInteropProvider.cs