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
- MeasureItemEvent.cs
- String.cs
- ReflectPropertyDescriptor.cs
- BufferedGraphicsContext.cs
- DiscoveryClientChannelFactory.cs
- HotCommands.cs
- XmlEncodedRawTextWriter.cs
- RegexWorker.cs
- ClientSideQueueItem.cs
- BinaryNode.cs
- IndexedEnumerable.cs
- ToolStripRenderer.cs
- ContractsBCL.cs
- ExpressionBuilder.cs
- WebEvents.cs
- PriorityRange.cs
- ErrorFormatter.cs
- CommonRemoteMemoryBlock.cs
- MethodToken.cs
- WindowsGraphics.cs
- GeometryConverter.cs
- PrintPageEvent.cs
- HtmlEmptyTagControlBuilder.cs
- Tile.cs
- DynamicEndpoint.cs
- CurrencyManager.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- OracleConnectionString.cs
- LicenseManager.cs
- SerializationInfo.cs
- ProcessHostFactoryHelper.cs
- RefExpr.cs
- QueryAsyncResult.cs
- FormsAuthenticationModule.cs
- SortedList.cs
- AssertFilter.cs
- BaseCollection.cs
- RegisteredDisposeScript.cs
- RawStylusSystemGestureInputReport.cs
- HtmlInputRadioButton.cs
- ScrollViewerAutomationPeer.cs
- MappingException.cs
- InsufficientMemoryException.cs
- StrokeCollection.cs
- VirtualDirectoryMapping.cs
- WindowsFormsHostPropertyMap.cs
- X509CertificateCollection.cs
- RegexCode.cs
- ImpersonationOption.cs
- TypedDataSetSchemaImporterExtension.cs
- DesignerActionPropertyItem.cs
- OLEDB_Enum.cs
- MediaPlayer.cs
- CreateUserWizardStep.cs
- TemplatePartAttribute.cs
- Model3DGroup.cs
- NumberAction.cs
- XPathNavigatorKeyComparer.cs
- XmlSchemaProviderAttribute.cs
- PermissionSet.cs
- DBNull.cs
- CodeEntryPointMethod.cs
- EventMappingSettings.cs
- SiteMap.cs
- COM2Properties.cs
- RewritingValidator.cs
- TextRangeEdit.cs
- OledbConnectionStringbuilder.cs
- MimeMultiPart.cs
- ExtensibleClassFactory.cs
- FrugalList.cs
- PackageDigitalSignatureManager.cs
- TdsParserStateObject.cs
- ADRole.cs
- PolicyLevel.cs
- ObjectManager.cs
- DataTableReaderListener.cs
- indexingfiltermarshaler.cs
- GeometryDrawing.cs
- Stroke.cs
- PolyLineSegment.cs
- GuidelineSet.cs
- FileNotFoundException.cs
- StyleSheetRefUrlEditor.cs
- KeyGestureConverter.cs
- RectAnimationClockResource.cs
- MachineKeyConverter.cs
- PropertyValidationContext.cs
- DocumentCollection.cs
- WorkflowInstanceExtensionProvider.cs
- TransportConfigurationTypeElementCollection.cs
- OutputCacheSection.cs
- QuaternionRotation3D.cs
- HostedImpersonationContext.cs
- ProfileGroupSettingsCollection.cs
- PropertyInfoSet.cs
- SecurityContext.cs
- Version.cs
- TypeConverterHelper.cs
- DrawingAttributeSerializer.cs