Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / ParserOptions.cs / 1305376 / ParserOptions.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql { using System; using System.Globalization; // // disables XML doc overloads warning as error // #pragma warning disable 0419 ////// Represents eSQL Text Compilation options. /// ParserOptions can be optionaly passed to CqlQuery.Compile or CqlQuery.Parse methods /// internal sealed class ParserOptions { //////
///Thrown if the properties are changed after being consumed by CqlQuery.Parse or CqlQuery.Compile ////// Once ParserOptions is passed and consumed by Compile or Parse Methods, it cannot be changed. /// If a setter is called after a ParserOptions instance is consumed by Parse or Compile methods, a EntityException will be raised. /// ///- ///
Compile Method - ///
Parse Method /// Makes options read-only /// ///internal ParserOptions MakeReadOnly() { _bReadOnly = true; return this; } private bool _bReadOnly = false; internal enum CompilationMode { /// /// Normal mode. Compiles eSQL command without restrictions. /// NormalMode, ////// View generation mode: optimizes compilation process to ignore uncessary eSQL constructs: /// - GROUP BY, HAVING and ORDER BY clauses are ignored. /// - WITH RELATIONSHIP clause is allowed in type constructors. /// RestrictedViewGenerationMode, ////// Same as CompilationMode.Normal plus WITH RELATIONSHIP clause is allowed in type constructors. /// UserViewGenerationMode } ////// Sets/Gets eSQL parser compilation mode. /// internal CompilationMode ParserCompilationMode { get { return _compilationMode; } set { CheckIfReadOnly(); _compilationMode = value; } } private CompilationMode _compilationMode = CompilationMode.NormalMode; ////// Verify if setters are allowed. /// private void CheckIfReadOnly() { if (_bReadOnly) { throw EntityUtil.EntitySqlError(System.Data.Entity.Strings.PropertyCannotBeChangedAtThisTime); } } } #pragma warning restore 0419 } // 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
- ResXResourceWriter.cs
- MethodToken.cs
- DiscoveryDocumentSearchPattern.cs
- Point.cs
- ZipIOLocalFileBlock.cs
- AsymmetricSecurityBindingElement.cs
- ActivityMetadata.cs
- XmlDomTextWriter.cs
- MemberAssignment.cs
- MSAAEventDispatcher.cs
- XmlEntityReference.cs
- BrowserCapabilitiesCodeGenerator.cs
- StateManagedCollection.cs
- DataSvcMapFileSerializer.cs
- SubpageParagraph.cs
- OperationParameterInfoCollection.cs
- ContextMenuService.cs
- TextCompositionEventArgs.cs
- FixedHyperLink.cs
- ContractNamespaceAttribute.cs
- DropShadowBitmapEffect.cs
- WpfPayload.cs
- RoamingStoreFile.cs
- AnchoredBlock.cs
- ScrollEvent.cs
- UriParserTemplates.cs
- AutoGeneratedField.cs
- SymbolEqualComparer.cs
- RightsManagementInformation.cs
- HtmlHead.cs
- HTMLTagNameToTypeMapper.cs
- Stopwatch.cs
- FrameworkElementFactory.cs
- SqlProfileProvider.cs
- SoapSchemaMember.cs
- BaseCollection.cs
- WebBaseEventKeyComparer.cs
- SizeChangedEventArgs.cs
- UserControlAutomationPeer.cs
- TransferMode.cs
- AnimationException.cs
- ResourceExpression.cs
- KeyValueInternalCollection.cs
- String.cs
- ObjectContextServiceProvider.cs
- Visual3DCollection.cs
- LineMetrics.cs
- XamlDesignerSerializationManager.cs
- FrameworkElementAutomationPeer.cs
- AppSecurityManager.cs
- SmiMetaData.cs
- ContextMenu.cs
- Parameter.cs
- XmlSchemaSimpleTypeUnion.cs
- DelegatingTypeDescriptionProvider.cs
- MultiDataTrigger.cs
- xml.cs
- DesignerValidationSummaryAdapter.cs
- HiddenFieldPageStatePersister.cs
- AdornerLayer.cs
- BitmapEncoder.cs
- ProtectedConfiguration.cs
- DynamicPropertyHolder.cs
- SqlFlattener.cs
- TabControlAutomationPeer.cs
- MetadataFile.cs
- StringDictionary.cs
- DownloadProgressEventArgs.cs
- VisualTreeHelper.cs
- DataSvcMapFile.cs
- UidManager.cs
- COM2PictureConverter.cs
- FrameworkElement.cs
- HeaderUtility.cs
- ClientFormsIdentity.cs
- cookie.cs
- Freezable.cs
- SerializationAttributes.cs
- FrameworkTemplate.cs
- Int32Rect.cs
- EntitySqlException.cs
- GetReadStreamResult.cs
- FieldNameLookup.cs
- DragEvent.cs
- PublishLicense.cs
- BindableAttribute.cs
- DynamicEntity.cs
- MimeFormReflector.cs
- ParseChildrenAsPropertiesAttribute.cs
- ToolStripSettings.cs
- ToolStripItemTextRenderEventArgs.cs
- EntityViewContainer.cs
- sqlstateclientmanager.cs
- DataGridRowDetailsEventArgs.cs
- XmlEncodedRawTextWriter.cs
- AssemblyCache.cs
- FormViewDeletedEventArgs.cs
- StubHelpers.cs
- XXXInfos.cs
- SchemaMapping.cs