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
- OdbcReferenceCollection.cs
- ColumnHeader.cs
- SQLMembershipProvider.cs
- PackageRelationshipCollection.cs
- NamedPipeProcessProtocolHandler.cs
- BrushMappingModeValidation.cs
- ByteStack.cs
- RoleManagerEventArgs.cs
- WebPartMenuStyle.cs
- PointF.cs
- RequestCachePolicyConverter.cs
- FontFamilyValueSerializer.cs
- TemplatePartAttribute.cs
- Splitter.cs
- DataControlCommands.cs
- FileChangesMonitor.cs
- WebRequestModuleElementCollection.cs
- DateTimeUtil.cs
- EntityDataSourceWrapper.cs
- columnmapkeybuilder.cs
- SecurityResources.cs
- EpmAttributeNameBuilder.cs
- ThemeDictionaryExtension.cs
- coordinatorscratchpad.cs
- UIElementParagraph.cs
- XmlSchemaSimpleTypeUnion.cs
- Style.cs
- ScrollChangedEventArgs.cs
- QuestionEventArgs.cs
- TimeEnumHelper.cs
- LineInfo.cs
- ShapeTypeface.cs
- IgnoreSectionHandler.cs
- DesignerUtils.cs
- __Filters.cs
- PersonalizablePropertyEntry.cs
- NameValueConfigurationCollection.cs
- SignedXml.cs
- VisualBrush.cs
- ProcessModelSection.cs
- ListParagraph.cs
- ITextView.cs
- NameScope.cs
- TextSelection.cs
- InkPresenter.cs
- UnmanagedMemoryStreamWrapper.cs
- KoreanLunisolarCalendar.cs
- CombinedHttpChannel.cs
- ValidateNames.cs
- CorrelationExtension.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ResourceSetExpression.cs
- CategoryAttribute.cs
- WarningException.cs
- PassportAuthenticationModule.cs
- FontDialog.cs
- ContainerSelectorGlyph.cs
- SHA512.cs
- XmlSchemaSimpleContent.cs
- StorageFunctionMapping.cs
- X509CertificateCollection.cs
- MD5CryptoServiceProvider.cs
- ComPlusTypeLoader.cs
- COM2PictureConverter.cs
- CaseStatement.cs
- StaticFileHandler.cs
- ChtmlMobileTextWriter.cs
- EntityTypeBase.cs
- AdornedElementPlaceholder.cs
- DynamicResourceExtension.cs
- BmpBitmapDecoder.cs
- ButtonAutomationPeer.cs
- Event.cs
- RuleSettingsCollection.cs
- ToolStripPanelSelectionGlyph.cs
- DbInsertCommandTree.cs
- IUnknownConstantAttribute.cs
- X509WindowsSecurityToken.cs
- UrlMapping.cs
- WebPartConnectionsDisconnectVerb.cs
- DispatcherTimer.cs
- _ConnectionGroup.cs
- PersianCalendar.cs
- MD5.cs
- RegisteredHiddenField.cs
- EndpointDiscoveryBehavior.cs
- GridProviderWrapper.cs
- UnknownBitmapDecoder.cs
- TdsParserSessionPool.cs
- COM2ExtendedTypeConverter.cs
- SessionStateSection.cs
- GB18030Encoding.cs
- FixedSOMLineCollection.cs
- Lookup.cs
- DataGridParentRows.cs
- DynamicPropertyReader.cs
- GradientBrush.cs
- BamlBinaryReader.cs
- controlskin.cs
- ToolStripItemEventArgs.cs