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
- sqlcontext.cs
- WebCategoryAttribute.cs
- IisTraceListener.cs
- XmlSerializerVersionAttribute.cs
- EdmMember.cs
- PropertyPushdownHelper.cs
- NeutralResourcesLanguageAttribute.cs
- EntityViewContainer.cs
- Pair.cs
- WSHttpBindingCollectionElement.cs
- EventlogProvider.cs
- GACMembershipCondition.cs
- BooleanStorage.cs
- XmlWrappingWriter.cs
- StorageSetMapping.cs
- ApplicationGesture.cs
- Function.cs
- SafeLibraryHandle.cs
- DataGridViewHitTestInfo.cs
- DPCustomTypeDescriptor.cs
- DesignerSerializerAttribute.cs
- NamespaceDecl.cs
- SqlXmlStorage.cs
- XamlToRtfParser.cs
- TypeSystemProvider.cs
- _ChunkParse.cs
- GenericTypeParameterBuilder.cs
- NavigationWindow.cs
- DataGridViewRowsAddedEventArgs.cs
- ParentUndoUnit.cs
- SpecialFolderEnumConverter.cs
- SecurityTokenAttachmentMode.cs
- ComponentEditorForm.cs
- DynamicDataResources.Designer.cs
- DataGridViewCellStyleConverter.cs
- SqlBooleanMismatchVisitor.cs
- SubMenuStyleCollection.cs
- TypeSource.cs
- SAPIEngineTypes.cs
- ApplicationProxyInternal.cs
- SearchExpression.cs
- _ContextAwareResult.cs
- HttpModuleActionCollection.cs
- SqlBuilder.cs
- ListBoxChrome.cs
- InkPresenterAutomationPeer.cs
- SoundPlayer.cs
- ExpandCollapseProviderWrapper.cs
- EdmError.cs
- AssociationEndMember.cs
- _HTTPDateParse.cs
- CustomAttribute.cs
- StringUtil.cs
- DescriptionAttribute.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- DataRowComparer.cs
- ConnectionStringsSection.cs
- AdPostCacheSubstitution.cs
- ConfigurationConverterBase.cs
- DefaultConfirmation.cs
- NetworkInformationException.cs
- DataContractSet.cs
- DataListGeneralPage.cs
- ColorInterpolationModeValidation.cs
- SqlRowUpdatingEvent.cs
- OracleSqlParser.cs
- RelationshipWrapper.cs
- ListViewCommandEventArgs.cs
- CompModSwitches.cs
- OrderedDictionaryStateHelper.cs
- XmlMessageFormatter.cs
- Vector.cs
- AdPostCacheSubstitution.cs
- ActiveXContainer.cs
- XmlAttributeCache.cs
- MobileResource.cs
- StatusBar.cs
- CompilationUtil.cs
- SolidColorBrush.cs
- PostBackOptions.cs
- DataGridViewImageCell.cs
- ModelItemKeyValuePair.cs
- MissingMemberException.cs
- Decimal.cs
- Math.cs
- RoutedEventValueSerializer.cs
- Missing.cs
- XmlSchemaAppInfo.cs
- TypeNameHelper.cs
- ThreadBehavior.cs
- ReferencedCollectionType.cs
- _SSPIWrapper.cs
- TemplateControlBuildProvider.cs
- FolderBrowserDialogDesigner.cs
- WebPartDescriptionCollection.cs
- AtomMaterializer.cs
- OpCopier.cs
- UriScheme.cs
- Int64.cs
- HttpModuleAction.cs