Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / QueryOperationResponseOfT.cs / 1305376 / QueryOperationResponseOfT.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Response to a batched query.
//
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
#region Namespaces.
using System.Collections.Generic;
using System.Linq;
#endregion Namespaces.
///
/// Response to a batched query.
///
/// The type to construct for the request results
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710", Justification = "required for this feature")]
public sealed class QueryOperationResponse : QueryOperationResponse, IEnumerable
{
#region Constructors.
///
/// constructor
///
/// HTTP headers
/// original query
/// retrieved objects
internal QueryOperationResponse(Dictionary headers, DataServiceRequest query, MaterializeAtom results)
: base(headers, query, results)
{
}
#endregion Constructors.
#region Public properties.
///
/// The server Result Set Count value from a query, if the query has requested the value
///
///
/// The return value can be either a zero or positive value equals to number of entities in the set on the server
///
///
/// Is thrown when count was not part of the original request, i.e., if the count tag is not found in the response stream.
///
public override long TotalCount
{
get
{
if (this.Results != null && !this.Results.IsEmptyResults)
{
return this.Results.CountValue();
}
else
{
throw new InvalidOperationException(Strings.MaterializeFromAtom_CountNotPresent);
}
}
}
#endregion Public properties.
#region Public methods.
///
/// Gets the continuation for the top level data stream associated with this response object
///
/// A continuation that points to the next page for the current data stream in the response.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "required for this feature")]
public new DataServiceQueryContinuation GetContinuation()
{
return (DataServiceQueryContinuation)base.GetContinuation();
}
/// Results from a query
/// enumerator of objects in query
public new IEnumerator GetEnumerator()
{
return this.Results.Cast().GetEnumerator();
}
#endregion Public methods.
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Response to a batched query.
//
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
#region Namespaces.
using System.Collections.Generic;
using System.Linq;
#endregion Namespaces.
///
/// Response to a batched query.
///
/// The type to construct for the request results
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710", Justification = "required for this feature")]
public sealed class QueryOperationResponse : QueryOperationResponse, IEnumerable
{
#region Constructors.
///
/// constructor
///
/// HTTP headers
/// original query
/// retrieved objects
internal QueryOperationResponse(Dictionary headers, DataServiceRequest query, MaterializeAtom results)
: base(headers, query, results)
{
}
#endregion Constructors.
#region Public properties.
///
/// The server Result Set Count value from a query, if the query has requested the value
///
///
/// The return value can be either a zero or positive value equals to number of entities in the set on the server
///
///
/// Is thrown when count was not part of the original request, i.e., if the count tag is not found in the response stream.
///
public override long TotalCount
{
get
{
if (this.Results != null && !this.Results.IsEmptyResults)
{
return this.Results.CountValue();
}
else
{
throw new InvalidOperationException(Strings.MaterializeFromAtom_CountNotPresent);
}
}
}
#endregion Public properties.
#region Public methods.
///
/// Gets the continuation for the top level data stream associated with this response object
///
/// A continuation that points to the next page for the current data stream in the response.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "required for this feature")]
public new DataServiceQueryContinuation GetContinuation()
{
return (DataServiceQueryContinuation)base.GetContinuation();
}
/// Results from a query
/// enumerator of objects in query
public new IEnumerator GetEnumerator()
{
return this.Results.Cast().GetEnumerator();
}
#endregion Public methods.
}
}
// 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
- WebServiceReceive.cs
- DesignerActionItem.cs
- WebPartMovingEventArgs.cs
- QilScopedVisitor.cs
- ReadOnlyDataSource.cs
- ReadOnlyTernaryTree.cs
- SystemIcmpV6Statistics.cs
- DescendentsWalker.cs
- X509CertificateStore.cs
- CreateUserWizardStep.cs
- CriticalFinalizerObject.cs
- BaseProcessor.cs
- Win32PrintDialog.cs
- UserNameSecurityTokenProvider.cs
- SqlDependencyListener.cs
- ScrollEvent.cs
- EventItfInfo.cs
- GroupDescription.cs
- StrokeSerializer.cs
- ColumnWidthChangingEvent.cs
- Rfc2898DeriveBytes.cs
- SessionStateItemCollection.cs
- Scheduler.cs
- DataControlImageButton.cs
- HttpConfigurationSystem.cs
- AnnotationResourceChangedEventArgs.cs
- FileUtil.cs
- CharAnimationBase.cs
- MessageQueuePermissionAttribute.cs
- TextWriterTraceListener.cs
- EntityContainerEmitter.cs
- NativeMethods.cs
- DependencyPropertyHelper.cs
- DefaultHttpHandler.cs
- XmlDocument.cs
- RSAProtectedConfigurationProvider.cs
- DifferencingCollection.cs
- DataTableClearEvent.cs
- TextPenaltyModule.cs
- LoginUtil.cs
- DataGridTable.cs
- SocketInformation.cs
- MulticastOption.cs
- rsa.cs
- ScriptingJsonSerializationSection.cs
- BoolExpressionVisitors.cs
- ListViewItemEventArgs.cs
- XmlWellformedWriterHelpers.cs
- CodeTypeParameterCollection.cs
- PrtTicket_Public_Simple.cs
- IgnoreFileBuildProvider.cs
- ErrorFormatterPage.cs
- DataSysAttribute.cs
- HelpFileFileNameEditor.cs
- CommandID.cs
- AttributeTable.cs
- PathFigure.cs
- CommunicationException.cs
- Int32Rect.cs
- RenderContext.cs
- SqlNotificationRequest.cs
- LabelEditEvent.cs
- XamlStream.cs
- AsmxEndpointPickerExtension.cs
- DocComment.cs
- HttpListenerResponse.cs
- CommentEmitter.cs
- InfoCardCryptoHelper.cs
- AddDataControlFieldDialog.cs
- XmlSerializer.cs
- WebReferenceCollection.cs
- Transform3DGroup.cs
- TimeManager.cs
- AspNetCompatibilityRequirementsAttribute.cs
- thaishape.cs
- DataGridViewColumnConverter.cs
- DataKeyCollection.cs
- StreamBodyWriter.cs
- HTMLTagNameToTypeMapper.cs
- StylusPointDescription.cs
- AutoResizedEvent.cs
- GACMembershipCondition.cs
- SqlNotificationRequest.cs
- DragEvent.cs
- MemberRestriction.cs
- keycontainerpermission.cs
- XmlSchemaObject.cs
- EntityDataSourceValidationException.cs
- FixedDSBuilder.cs
- SamlAudienceRestrictionCondition.cs
- ButtonBase.cs
- PathSegmentCollection.cs
- PropertyGroupDescription.cs
- XmlSchemaComplexContentExtension.cs
- Win32SafeHandles.cs
- DesignerValidatorAdapter.cs
- FollowerQueueCreator.cs
- HttpDictionary.cs
- XmlBindingWorker.cs
- UniqueID.cs