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
- ConnectionStringsExpressionBuilder.cs
- FontCollection.cs
- SoapCodeExporter.cs
- ResourcesChangeInfo.cs
- BeginStoryboard.cs
- ColorMatrix.cs
- TreeViewImageGenerator.cs
- NativeCppClassAttribute.cs
- DBSchemaRow.cs
- ParallelTimeline.cs
- MatrixTransform.cs
- FrameworkReadOnlyPropertyMetadata.cs
- SystemIcmpV6Statistics.cs
- DataGridViewCheckBoxCell.cs
- MethodBuilder.cs
- FontSizeConverter.cs
- DelegateBodyWriter.cs
- ProcessStartInfo.cs
- ContextMenu.cs
- RawStylusInput.cs
- DocumentAutomationPeer.cs
- GeneralTransform.cs
- BuildDependencySet.cs
- TextParentUndoUnit.cs
- TraceLog.cs
- XmlResolver.cs
- DiscoveryClientChannelFactory.cs
- SqlBulkCopy.cs
- XmlSchema.cs
- MemberJoinTreeNode.cs
- StreamWithDictionary.cs
- NamespaceListProperty.cs
- wmiprovider.cs
- WrapperEqualityComparer.cs
- ObservableCollection.cs
- Baml6Assembly.cs
- AdPostCacheSubstitution.cs
- Math.cs
- SQLResource.cs
- XmlBinaryWriterSession.cs
- SocketException.cs
- UrlMappingCollection.cs
- RoleService.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ComEventsSink.cs
- TypeBuilderInstantiation.cs
- ParsedAttributeCollection.cs
- Label.cs
- ObjectPropertyMapping.cs
- GlobalizationSection.cs
- NavigateUrlConverter.cs
- EntityDataSourceWizardForm.cs
- MonthCalendar.cs
- Converter.cs
- DataGridItemCollection.cs
- HwndKeyboardInputProvider.cs
- TypedDataSetSchemaImporterExtension.cs
- GeometryConverter.cs
- WebPartMovingEventArgs.cs
- EntityModelSchemaGenerator.cs
- OptimalBreakSession.cs
- AuthorizationRule.cs
- LongMinMaxAggregationOperator.cs
- ParseNumbers.cs
- Bits.cs
- SymbolDocumentInfo.cs
- SignatureToken.cs
- Send.cs
- TreeViewAutomationPeer.cs
- Byte.cs
- TextLine.cs
- ApplicationContext.cs
- TrackingRecord.cs
- sqlmetadatafactory.cs
- GenericEnumConverter.cs
- Types.cs
- EntityUtil.cs
- LockRenewalTask.cs
- XmlResolver.cs
- WmlCommandAdapter.cs
- ControlBuilderAttribute.cs
- Pair.cs
- SubstitutionResponseElement.cs
- RequestContext.cs
- DataGridHelper.cs
- ConstructorBuilder.cs
- DataFieldEditor.cs
- Action.cs
- Overlapped.cs
- InputReport.cs
- CheckedListBox.cs
- VisualProxy.cs
- webeventbuffer.cs
- ChildTable.cs
- TransformDescriptor.cs
- SHA512Managed.cs
- InternalException.cs
- SapiInterop.cs
- WebServiceData.cs
- Query.cs