Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Structures / ConstantSlot.cs / 1 / ConstantSlot.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Mapping.ViewGeneration.CqlGeneration; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace System.Data.Mapping.ViewGeneration.Structures { // A constant that can be projected in a cell query internal class ConstantSlot : ProjectedSlot { #region Constructors // effects: Creates a slot with constant value being "value" internal ConstantSlot(CellConstant value) { Debug.Assert(value != null); m_constant = value; Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions"); } #endregion #region Fields private CellConstant m_constant; // The actual value #endregion #region Properties // effects: Returns the value stored in this constant internal CellConstant CellConstant { get {return m_constant;} } #endregion #region ProjectedSlot Members internal override ProjectedSlot MakeAliasedSlot(CqlBlock block, MemberPath memberPath, int slotNum) { return this; // Nothing to create } internal override ProjectedSlot RemapSlot(Dictionaryremap) { return this; // No remapping needed } internal override StringBuilder AsCql(StringBuilder builder, MemberPath outputMember, string blockAlias, int indentLevel) { return m_constant.AsCql(builder, outputMember, blockAlias); } protected override bool IsEqualTo(ProjectedSlot right) { ConstantSlot rightSlot = right as ConstantSlot; if (rightSlot == null) { return false; } return CellConstant.EqualityComparer.Equals(m_constant, rightSlot.m_constant); } protected override int GetHash() { return CellConstant.EqualityComparer.GetHashCode(m_constant); } #endregion internal override void ToCompactString(StringBuilder builder) { m_constant.ToCompactString(builder); } } } // 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.CqlGeneration; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace System.Data.Mapping.ViewGeneration.Structures { // A constant that can be projected in a cell query internal class ConstantSlot : ProjectedSlot { #region Constructors // effects: Creates a slot with constant value being "value" internal ConstantSlot(CellConstant value) { Debug.Assert(value != null); m_constant = value; Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions"); } #endregion #region Fields private CellConstant m_constant; // The actual value #endregion #region Properties // effects: Returns the value stored in this constant internal CellConstant CellConstant { get {return m_constant;} } #endregion #region ProjectedSlot Members internal override ProjectedSlot MakeAliasedSlot(CqlBlock block, MemberPath memberPath, int slotNum) { return this; // Nothing to create } internal override ProjectedSlot RemapSlot(Dictionaryremap) { return this; // No remapping needed } internal override StringBuilder AsCql(StringBuilder builder, MemberPath outputMember, string blockAlias, int indentLevel) { return m_constant.AsCql(builder, outputMember, blockAlias); } protected override bool IsEqualTo(ProjectedSlot right) { ConstantSlot rightSlot = right as ConstantSlot; if (rightSlot == null) { return false; } return CellConstant.EqualityComparer.Equals(m_constant, rightSlot.m_constant); } protected override int GetHash() { return CellConstant.EqualityComparer.GetHashCode(m_constant); } #endregion internal override void ToCompactString(StringBuilder builder) { m_constant.ToCompactString(builder); } } } // 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
- AssemblyHash.cs
- UriTemplate.cs
- ExtendedProtectionPolicy.cs
- basevalidator.cs
- TextBox.cs
- EntityDataSourceUtil.cs
- Tablet.cs
- HyperLinkColumn.cs
- ImpersonationContext.cs
- ExpressionHelper.cs
- DataGridViewRowPostPaintEventArgs.cs
- AddInActivator.cs
- ObjectReaderCompiler.cs
- BamlRecordReader.cs
- Brush.cs
- SqlCommand.cs
- InvalidFilterCriteriaException.cs
- StyleXamlTreeBuilder.cs
- XPathQueryGenerator.cs
- DbProviderFactoriesConfigurationHandler.cs
- XmlSerializerAssemblyAttribute.cs
- WebConfigurationManager.cs
- Helpers.cs
- ExceptionAggregator.cs
- HtmlInputControl.cs
- GridItemCollection.cs
- Grant.cs
- FormView.cs
- IgnoreSectionHandler.cs
- RelationshipSet.cs
- DispatcherHooks.cs
- NativeMethods.cs
- TableLayoutRowStyleCollection.cs
- PermissionListSet.cs
- WebPartManager.cs
- LayeredChannelFactory.cs
- XmlValidatingReader.cs
- GlyphTypeface.cs
- Exceptions.cs
- XmlSortKey.cs
- ControlParameter.cs
- WebPartAuthorizationEventArgs.cs
- GraphicsState.cs
- RSAProtectedConfigurationProvider.cs
- StylusPoint.cs
- Selector.cs
- ChildTable.cs
- TypeSemantics.cs
- SeekStoryboard.cs
- ContainerSelectorBehavior.cs
- DayRenderEvent.cs
- XsdBuilder.cs
- ExpressionVisitor.cs
- DropDownHolder.cs
- OdbcParameter.cs
- Brush.cs
- XpsS0ValidatingLoader.cs
- CatalogPartChrome.cs
- ScriptResourceInfo.cs
- VisualStyleInformation.cs
- mactripleDES.cs
- QuadraticBezierSegment.cs
- ResourceIDHelper.cs
- OrderedDictionaryStateHelper.cs
- ArrayExtension.cs
- RawKeyboardInputReport.cs
- UnsafeMethods.cs
- TextDecorationCollectionConverter.cs
- BitStack.cs
- DataPager.cs
- DesignerCommandSet.cs
- SchemaCollectionPreprocessor.cs
- _LocalDataStoreMgr.cs
- PrintDialog.cs
- RequestCacheValidator.cs
- ManifestBasedResourceGroveler.cs
- ObjectNotFoundException.cs
- FixedDSBuilder.cs
- Matrix3D.cs
- DesignRelation.cs
- DataGridViewRowStateChangedEventArgs.cs
- Signature.cs
- XmlNamespaceManager.cs
- XmlFormatWriterGenerator.cs
- LeaseManager.cs
- UrlAuthFailureHandler.cs
- DbMetaDataCollectionNames.cs
- WebPartDeleteVerb.cs
- RightNameExpirationInfoPair.cs
- OSFeature.cs
- EntityContainerEmitter.cs
- Keyboard.cs
- ChannelOptions.cs
- CanonicalizationDriver.cs
- Storyboard.cs
- HTMLTagNameToTypeMapper.cs
- TextTreeTextBlock.cs
- ParentQuery.cs
- CategoryNameCollection.cs
- OrderedDictionaryStateHelper.cs