Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PackWebRequest.cs
- AppDomainFactory.cs
- EncryptedXml.cs
- SqlConnectionManager.cs
- HeaderCollection.cs
- Timer.cs
- XPathSingletonIterator.cs
- Authorization.cs
- InternalRelationshipCollection.cs
- ProfileProvider.cs
- HttpRequest.cs
- Registry.cs
- TableRow.cs
- QuaternionValueSerializer.cs
- NullReferenceException.cs
- Permission.cs
- SuppressMessageAttribute.cs
- XmlSchemaInfo.cs
- DataGridViewSelectedColumnCollection.cs
- LinearKeyFrames.cs
- Screen.cs
- FunctionImportElement.cs
- PageParser.cs
- FontSizeConverter.cs
- ClientCultureInfo.cs
- SatelliteContractVersionAttribute.cs
- TraceContextRecord.cs
- UntrustedRecipientException.cs
- ListBase.cs
- FileStream.cs
- ZoneButton.cs
- SmiEventSink_Default.cs
- AutoGeneratedField.cs
- ApplicationManager.cs
- DeflateStream.cs
- BaseParser.cs
- ChtmlTextWriter.cs
- TemporaryBitmapFile.cs
- MultiTrigger.cs
- Addressing.cs
- XmlDomTextWriter.cs
- EmptyEnumerable.cs
- GraphicsContext.cs
- ReadOnlyDictionary.cs
- DataServiceException.cs
- AutoResizedEvent.cs
- LocalizationComments.cs
- InternalBufferManager.cs
- SizeF.cs
- SiteMapPath.cs
- Decorator.cs
- ProtectedConfigurationSection.cs
- OleDbEnumerator.cs
- SessionParameter.cs
- WeakReadOnlyCollection.cs
- MD5CryptoServiceProvider.cs
- RangeValidator.cs
- File.cs
- MeasurementDCInfo.cs
- Base64Encoder.cs
- Assert.cs
- ControlPropertyNameConverter.cs
- TraversalRequest.cs
- ServiceContractDetailViewControl.cs
- MimeFormImporter.cs
- keycontainerpermission.cs
- XPathExpr.cs
- BridgeDataRecord.cs
- RewritingProcessor.cs
- GeneralTransform.cs
- _NegotiateClient.cs
- SurrogateEncoder.cs
- SoapFormatter.cs
- ServicePointManager.cs
- WebPartEditVerb.cs
- SqlXml.cs
- AstTree.cs
- OSFeature.cs
- IOThreadScheduler.cs
- PageParserFilter.cs
- ActivityIdHeader.cs
- RegexCharClass.cs
- SvcMapFileLoader.cs
- SpecialFolderEnumConverter.cs
- Accessible.cs
- VirtualizingStackPanel.cs
- SkipStoryboardToFill.cs
- OdbcDataAdapter.cs
- CompositeTypefaceMetrics.cs
- GeneralTransformCollection.cs
- EmbeddedMailObjectsCollection.cs
- COMException.cs
- RefreshPropertiesAttribute.cs
- GraphicsPathIterator.cs
- FillErrorEventArgs.cs
- XsdDuration.cs
- FormsAuthenticationUserCollection.cs
- TreeBuilderBamlTranslator.cs
- SafeHandles.cs
- CodeNamespaceImport.cs