Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- RootAction.cs
- XmlQualifiedName.cs
- Int64KeyFrameCollection.cs
- PageThemeCodeDomTreeGenerator.cs
- HeaderCollection.cs
- SocketAddress.cs
- ColorConvertedBitmapExtension.cs
- HostExecutionContextManager.cs
- SettingsBase.cs
- Type.cs
- BitStream.cs
- OleDbMetaDataFactory.cs
- ObjectSecurity.cs
- StatusBarPanelClickEvent.cs
- RepeatBehavior.cs
- ByteStreamMessageEncoderFactory.cs
- TreeNodeCollection.cs
- Attributes.cs
- NumericUpDownAcceleration.cs
- DataSourceXmlClassAttribute.cs
- Int16AnimationUsingKeyFrames.cs
- SqlConnectionHelper.cs
- XmlSchemaException.cs
- Cursor.cs
- SQLCharsStorage.cs
- HttpListenerRequest.cs
- InputReportEventArgs.cs
- OrderByQueryOptionExpression.cs
- _OverlappedAsyncResult.cs
- _AutoWebProxyScriptWrapper.cs
- MenuItem.cs
- XmlEncodedRawTextWriter.cs
- Funcletizer.cs
- StateItem.cs
- RSACryptoServiceProvider.cs
- LineServicesRun.cs
- CommentEmitter.cs
- PersonalizationEntry.cs
- SearchForVirtualItemEventArgs.cs
- AuthorizationPolicyTypeElementCollection.cs
- AttributeSetAction.cs
- SQLInt32Storage.cs
- XmlSchemaSimpleTypeUnion.cs
- RawStylusActions.cs
- DynamicValueConverter.cs
- ReadOnlyDictionary.cs
- WebPartCatalogAddVerb.cs
- ImageConverter.cs
- _SecureChannel.cs
- TableLayoutPanelCellPosition.cs
- _ChunkParse.cs
- DesignerCommandSet.cs
- ProfileSettingsCollection.cs
- CollectionViewGroup.cs
- FullTextBreakpoint.cs
- BlockUIContainer.cs
- WebOperationContext.cs
- SynchronizationValidator.cs
- UserNamePasswordClientCredential.cs
- HttpStreamMessageEncoderFactory.cs
- Tuple.cs
- TypedTableBase.cs
- Bind.cs
- WebPartDisplayModeCollection.cs
- HtmlElementErrorEventArgs.cs
- PersonalizationEntry.cs
- Transform3D.cs
- TemplateKey.cs
- ListItemCollection.cs
- CodeMethodReturnStatement.cs
- FullTrustAssemblyCollection.cs
- TransactionState.cs
- SiteMapHierarchicalDataSourceView.cs
- MenuBindingsEditor.cs
- CommonDialog.cs
- DesigntimeLicenseContext.cs
- PeerNodeTraceRecord.cs
- SmtpReplyReaderFactory.cs
- ExistsInCollection.cs
- DirtyTextRange.cs
- AuthenticationException.cs
- ParenthesizePropertyNameAttribute.cs
- PrintDialog.cs
- SQLMembershipProvider.cs
- TemplatedMailWebEventProvider.cs
- XmlSchemaAll.cs
- PathGeometry.cs
- DataGridToolTip.cs
- PopupRootAutomationPeer.cs
- RelationshipEndCollection.cs
- IPCCacheManager.cs
- DataGridCommandEventArgs.cs
- ComboBox.cs
- MergePropertyDescriptor.cs
- CollectionConverter.cs
- StandardCommands.cs
- PixelShader.cs
- KeyMatchBuilder.cs
- FloatUtil.cs
- NameScope.cs