Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Structures / ConstantProjectedSlot.cs / 1305376 / ConstantProjectedSlot.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 ConstantProjectedSlot : ProjectedSlot { #region Constructors // effects: Creates a slot with constant value being "value" internal ConstantProjectedSlot(Constant 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 Constant m_constant; // The actual value #endregion #region Properties // effects: Returns the value stored in this constant internal Constant 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 StringBuilder AsCql(StringBuilder builder, MemberPath outputMember, string blockAlias, int indentLevel) { return m_constant.AsCql(builder, outputMember, blockAlias); } protected override bool IsEqualTo(ProjectedSlot right) { ConstantProjectedSlot rightSlot = right as ConstantProjectedSlot; if (rightSlot == null) { return false; } return Constant.EqualityComparer.Equals(m_constant, rightSlot.m_constant); } protected override int GetHash() { return Constant.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
- WorkflowServiceNamespace.cs
- ConfigurationManagerInternalFactory.cs
- CaseCqlBlock.cs
- TouchPoint.cs
- precedingquery.cs
- FormView.cs
- SerializationException.cs
- DataRelationPropertyDescriptor.cs
- AuthorizationRuleCollection.cs
- AssemblyGen.cs
- LinqDataSourceValidationException.cs
- XmlNodeChangedEventManager.cs
- ServiceOperation.cs
- XmlHierarchicalDataSourceView.cs
- Graph.cs
- XmlBufferReader.cs
- ConfigurationElementCollection.cs
- SystemException.cs
- dsa.cs
- FreezableDefaultValueFactory.cs
- TaiwanLunisolarCalendar.cs
- SharedPerformanceCounter.cs
- OleDbEnumerator.cs
- RegionData.cs
- TextWriter.cs
- RightsController.cs
- TrackingServices.cs
- InstalledVoice.cs
- loginstatus.cs
- FormsAuthenticationModule.cs
- XmlUtil.cs
- AmbientLight.cs
- ItemChangedEventArgs.cs
- HtmlInputImage.cs
- CompiledQuery.cs
- AppSecurityManager.cs
- BufferBuilder.cs
- activationcontext.cs
- BufferModesCollection.cs
- ButtonChrome.cs
- QilPatternFactory.cs
- ProviderUtil.cs
- ResolveNextArgumentWorkItem.cs
- Logging.cs
- XpsFontSerializationService.cs
- COAUTHINFO.cs
- ValueChangedEventManager.cs
- SqlDataReaderSmi.cs
- InternalMappingException.cs
- AssemblyBuilder.cs
- SpecularMaterial.cs
- WizardPanel.cs
- WorkflowRuntimeBehavior.cs
- GrammarBuilder.cs
- ConstraintCollection.cs
- DataConnectionHelper.cs
- SafeProcessHandle.cs
- FilterElement.cs
- DataSourceXmlSerializer.cs
- StorageFunctionMapping.cs
- CommonObjectSecurity.cs
- ManagementPath.cs
- HttpConfigurationSystem.cs
- ObjectDataSource.cs
- UriTemplateClientFormatter.cs
- EntityDataSourceMemberPath.cs
- ChannelServices.cs
- UidPropertyAttribute.cs
- XmlQueryStaticData.cs
- DeclarativeCatalogPart.cs
- ArgumentOutOfRangeException.cs
- EncryptedData.cs
- ResourcesBuildProvider.cs
- Thickness.cs
- CodeTypeDeclarationCollection.cs
- TransformerInfoCollection.cs
- ExtenderControl.cs
- MasterPageBuildProvider.cs
- SecUtil.cs
- PointConverter.cs
- CopyOfAction.cs
- TransformConverter.cs
- WebPartConnectionsCloseVerb.cs
- xdrvalidator.cs
- ToolStripScrollButton.cs
- PixelFormat.cs
- SiteMapNodeItem.cs
- DesignerWithHeader.cs
- DictionaryChange.cs
- figurelengthconverter.cs
- LinkDesigner.cs
- ValidationEventArgs.cs
- PrimitiveSchema.cs
- SqlNamer.cs
- MSHTMLHostUtil.cs
- InvalidCardException.cs
- COM2Properties.cs
- UdpRetransmissionSettings.cs
- RequestCachePolicy.cs
- SerializationUtility.cs