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
- CatalogZone.cs
- QilXmlReader.cs
- TableRowCollection.cs
- StringFormat.cs
- Label.cs
- HttpCapabilitiesSectionHandler.cs
- MDIControlStrip.cs
- ComponentSerializationService.cs
- GroupBox.cs
- XmlDataImplementation.cs
- DecodeHelper.cs
- Freezable.cs
- SystemIcmpV6Statistics.cs
- CssStyleCollection.cs
- SamlDoNotCacheCondition.cs
- BypassElementCollection.cs
- WindowsGrip.cs
- SpoolingTaskBase.cs
- _RequestCacheProtocol.cs
- WriteableBitmap.cs
- PictureBox.cs
- Trace.cs
- GridViewSelectEventArgs.cs
- CacheOutputQuery.cs
- BamlRecordWriter.cs
- DispatcherHookEventArgs.cs
- XappLauncher.cs
- DataGridPagerStyle.cs
- QueueProcessor.cs
- IMembershipProvider.cs
- ImageClickEventArgs.cs
- SafeCoTaskMem.cs
- HttpWebRequest.cs
- DbConnectionPoolCounters.cs
- TimerElapsedEvenArgs.cs
- ScrollItemPattern.cs
- FontWeightConverter.cs
- HtmlInputControl.cs
- BitmapCodecInfoInternal.cs
- DrawingAttributeSerializer.cs
- EntryWrittenEventArgs.cs
- DeferredSelectedIndexReference.cs
- TdsRecordBufferSetter.cs
- DataSourceHelper.cs
- ColorAnimationBase.cs
- EasingFunctionBase.cs
- HotSpot.cs
- LogSwitch.cs
- TableLayoutCellPaintEventArgs.cs
- ToolStripOverflow.cs
- BuildProviderUtils.cs
- StylusDownEventArgs.cs
- PasswordDeriveBytes.cs
- NameValueConfigurationElement.cs
- AutoResetEvent.cs
- UpDownBase.cs
- ExtenderControl.cs
- CroppedBitmap.cs
- SafeRightsManagementPubHandle.cs
- UpdatePanelTriggerCollection.cs
- TemplateXamlTreeBuilder.cs
- Enum.cs
- StandardBindingElement.cs
- EventLogLink.cs
- SapiAttributeParser.cs
- OleDragDropHandler.cs
- PrimitiveCodeDomSerializer.cs
- Merger.cs
- XmlSchemaValidator.cs
- PersonalizationAdministration.cs
- WebBaseEventKeyComparer.cs
- Site.cs
- DbConnectionPoolOptions.cs
- TableProviderWrapper.cs
- GridItemPattern.cs
- TemplateField.cs
- FileDialog.cs
- PolyBezierSegment.cs
- ValidatorUtils.cs
- SrgsElement.cs
- _Connection.cs
- HyperLinkField.cs
- XmlCharCheckingReader.cs
- GreenMethods.cs
- XPathException.cs
- DependentList.cs
- HyperLink.cs
- ObjectKeyFrameCollection.cs
- PeerServiceMessageContracts.cs
- ProviderCommandInfoUtils.cs
- GeneratedView.cs
- MultiPageTextView.cs
- ExpanderAutomationPeer.cs
- UInt16.cs
- ObfuscateAssemblyAttribute.cs
- TrustSection.cs
- LineServices.cs
- Brushes.cs
- StreamInfo.cs
- CompiledRegexRunner.cs