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
- Pool.cs
- FontClient.cs
- ToolStripArrowRenderEventArgs.cs
- WebReferencesBuildProvider.cs
- KeyedByTypeCollection.cs
- XmlDocument.cs
- TileModeValidation.cs
- OdbcConnectionHandle.cs
- RelatedPropertyManager.cs
- WaitHandleCannotBeOpenedException.cs
- Expression.cs
- DesignerFrame.cs
- SystemIPAddressInformation.cs
- _DisconnectOverlappedAsyncResult.cs
- XhtmlTextWriter.cs
- DependencyObjectType.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- XamlNamespaceHelper.cs
- IndexerNameAttribute.cs
- QueryRewriter.cs
- FreeIndexList.cs
- QueryExpr.cs
- RootBrowserWindowAutomationPeer.cs
- RegionInfo.cs
- ColumnResizeAdorner.cs
- UIAgentInitializationException.cs
- EmptyEnumerable.cs
- AsmxEndpointPickerExtension.cs
- InitializationEventAttribute.cs
- XmlResolver.cs
- HttpResponseHeader.cs
- XXXInfos.cs
- HttpCachePolicyElement.cs
- XmlAttributeCollection.cs
- CustomValidator.cs
- QueueNameHelper.cs
- MetadataItem_Static.cs
- OciEnlistContext.cs
- HttpServerUtilityWrapper.cs
- FixedBufferAttribute.cs
- WmlImageAdapter.cs
- ObjectAnimationBase.cs
- PatternMatcher.cs
- InstancePersistenceCommand.cs
- Environment.cs
- HostedNamedPipeTransportManager.cs
- DrawingGroupDrawingContext.cs
- cache.cs
- ComboBoxRenderer.cs
- FormsAuthenticationTicket.cs
- ToolStripDropDownMenu.cs
- OleCmdHelper.cs
- Point4D.cs
- ListBox.cs
- DayRenderEvent.cs
- BaseParser.cs
- Function.cs
- DataSourceNameHandler.cs
- DesignerVerbToolStripMenuItem.cs
- AddressHeaderCollectionElement.cs
- Assembly.cs
- IOThreadTimer.cs
- BindingList.cs
- ChildTable.cs
- RuleSettings.cs
- RedBlackList.cs
- input.cs
- NameSpaceExtractor.cs
- entityreference_tresulttype.cs
- SymbolPair.cs
- DetailsViewRowCollection.cs
- SponsorHelper.cs
- ReadOnlyDictionary.cs
- HtmlButton.cs
- XPathDocumentIterator.cs
- ContentOperations.cs
- SkewTransform.cs
- DefaultObjectMappingItemCollection.cs
- BaseCodeDomTreeGenerator.cs
- ProvidersHelper.cs
- ResourceAssociationSetEnd.cs
- DateTimeSerializationSection.cs
- DescendentsWalkerBase.cs
- MediaEntryAttribute.cs
- SortedSetDebugView.cs
- Vector3DValueSerializer.cs
- __ComObject.cs
- WebEvents.cs
- BrowserCapabilitiesFactoryBase.cs
- WindowsStartMenu.cs
- CollectionDataContract.cs
- ObjectItemCachedAssemblyLoader.cs
- ThousandthOfEmRealPoints.cs
- NoneExcludedImageIndexConverter.cs
- OleStrCAMarshaler.cs
- Metadata.cs
- SQLByteStorage.cs
- ListViewGroupItemCollection.cs
- _ConnectStream.cs
- WebAdminConfigurationHelper.cs