Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- DependencyProperty.cs
- RowTypePropertyElement.cs
- TextParaClient.cs
- BooleanToVisibilityConverter.cs
- DataServiceHost.cs
- NativeMethods.cs
- SiblingIterators.cs
- XmlMembersMapping.cs
- TextDecorationCollection.cs
- MethodSet.cs
- InvokeProviderWrapper.cs
- OptimisticConcurrencyException.cs
- ObjectDataSourceStatusEventArgs.cs
- Region.cs
- SQLDecimalStorage.cs
- ColumnWidthChangedEvent.cs
- StyleModeStack.cs
- XmlHierarchicalEnumerable.cs
- ClientApiGenerator.cs
- InheritanceAttribute.cs
- EventToken.cs
- ItemContainerProviderWrapper.cs
- InvalidAsynchronousStateException.cs
- Int64AnimationBase.cs
- TableItemStyle.cs
- BaseUriHelper.cs
- FormsAuthenticationUser.cs
- TemplateContainer.cs
- UnsafeNativeMethodsTablet.cs
- RoutedCommand.cs
- SortedList.cs
- DataServiceQueryException.cs
- ActionFrame.cs
- DtdParser.cs
- Buffer.cs
- SqlOuterApplyReducer.cs
- XmlNamedNodeMap.cs
- SourceFileBuildProvider.cs
- Process.cs
- TextElementEnumerator.cs
- WebReference.cs
- DesignTimeVisibleAttribute.cs
- CommandHelper.cs
- ElementHostAutomationPeer.cs
- TransactionFlowBindingElement.cs
- QuaternionAnimation.cs
- SizeAnimationBase.cs
- CriticalFileToken.cs
- ClientSettingsSection.cs
- InputMethodStateChangeEventArgs.cs
- FamilyMapCollection.cs
- DelayedRegex.cs
- RuleSetDialog.Designer.cs
- DateTimeOffsetAdapter.cs
- DataGridItem.cs
- DataServiceKeyAttribute.cs
- RecognitionEventArgs.cs
- MethodRental.cs
- ImageIndexConverter.cs
- DesignTimeTemplateParser.cs
- EdmScalarPropertyAttribute.cs
- CrossContextChannel.cs
- FormViewUpdateEventArgs.cs
- PrePostDescendentsWalker.cs
- SelectionHighlightInfo.cs
- TextSerializer.cs
- _SSPIWrapper.cs
- RegionData.cs
- AttachInfo.cs
- RSAOAEPKeyExchangeFormatter.cs
- XamlToRtfParser.cs
- HttpRequestCacheValidator.cs
- UnsettableComboBox.cs
- ControlEvent.cs
- MatchingStyle.cs
- ExpressionBuilder.cs
- XmlSignatureProperties.cs
- DefaultAssemblyResolver.cs
- ObjectDataSource.cs
- PathGradientBrush.cs
- LogFlushAsyncResult.cs
- UICuesEvent.cs
- SoapObjectWriter.cs
- BitmapPalette.cs
- OleAutBinder.cs
- BinaryMessageEncodingElement.cs
- Win32KeyboardDevice.cs
- MdImport.cs
- HttpCookiesSection.cs
- InputProviderSite.cs
- ClientRoleProvider.cs
- Privilege.cs
- ProfilePropertyMetadata.cs
- EntitySetBase.cs
- SrgsGrammar.cs
- XsltSettings.cs
- MergablePropertyAttribute.cs
- SqlInfoMessageEvent.cs
- ButtonBaseAdapter.cs
- FrameworkContentElement.cs