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
- ByteAnimationBase.cs
- InfoCardProofToken.cs
- CompiledXpathExpr.cs
- DecimalAnimationBase.cs
- SerializerWriterEventHandlers.cs
- AnnotationMap.cs
- SpecialNameAttribute.cs
- hebrewshape.cs
- DesignerMetadata.cs
- CodeAttributeArgument.cs
- NavigationWindow.cs
- LockCookie.cs
- Util.cs
- PostBackOptions.cs
- ObjectDataSource.cs
- TypeHelper.cs
- ParallelTimeline.cs
- HttpProfileGroupBase.cs
- EmissiveMaterial.cs
- PageStatePersister.cs
- PageContent.cs
- DesignerVerb.cs
- HopperCache.cs
- DocumentPageTextView.cs
- ListComponentEditorPage.cs
- Html32TextWriter.cs
- PowerStatus.cs
- PackageFilter.cs
- PropertyTab.cs
- XmlQualifiedNameTest.cs
- LogLogRecord.cs
- SerializerWriterEventHandlers.cs
- FullTextLine.cs
- SystemBrushes.cs
- ImageBrush.cs
- DataTableNameHandler.cs
- VerificationException.cs
- TreeView.cs
- CompilerError.cs
- ToolStripManager.cs
- HttpCacheVaryByContentEncodings.cs
- XmlUtf8RawTextWriter.cs
- Trace.cs
- Debug.cs
- ButtonFieldBase.cs
- ProtocolsConfigurationEntry.cs
- ExpressionsCollectionEditor.cs
- HandlerBase.cs
- JapaneseCalendar.cs
- MeshGeometry3D.cs
- LinkedDataMemberFieldEditor.cs
- EncryptedPackageFilter.cs
- FactoryGenerator.cs
- ElementNotAvailableException.cs
- ActiveXSite.cs
- PointF.cs
- ObjectDataSourceSelectingEventArgs.cs
- Substitution.cs
- WindowsImpersonationContext.cs
- ErrorProvider.cs
- XmlUrlEditor.cs
- OrderedDictionary.cs
- SiteOfOriginPart.cs
- PerspectiveCamera.cs
- TimelineClockCollection.cs
- SamlConditions.cs
- RTTypeWrapper.cs
- BindUriHelper.cs
- DataSvcMapFileSerializer.cs
- BinaryNode.cs
- CellQuery.cs
- NavigatorOutput.cs
- NotSupportedException.cs
- BuildResult.cs
- InstanceHandleConflictException.cs
- FieldTemplateFactory.cs
- RowToParametersTransformer.cs
- InputQueue.cs
- ImpersonationContext.cs
- DtcInterfaces.cs
- ToolboxDataAttribute.cs
- Animatable.cs
- ReaderContextStackData.cs
- SqlServer2KCompatibilityCheck.cs
- XmlAnyAttributeAttribute.cs
- Input.cs
- OdbcConnectionOpen.cs
- XmlDesignerDataSourceView.cs
- GroupItemAutomationPeer.cs
- SQLDoubleStorage.cs
- WebResponse.cs
- SystemUdpStatistics.cs
- WebAdminConfigurationHelper.cs
- CodeArrayCreateExpression.cs
- IsolatedStorageFilePermission.cs
- ByteKeyFrameCollection.cs
- BaseConfigurationRecord.cs
- EventTrigger.cs
- StringUtil.cs
- FileAuthorizationModule.cs