Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / System.Data.Entity / System / Data / Objects / ObjectResult.cs
blob0c11979211bde2b800e1d93783ac6967be7ddf6e
1 //---------------------------------------------------------------------
2 // <copyright file="ObjectResult.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // </copyright>
5 //
6 // @owner Microsoft
7 // @backupowner Microsoft
8 //---------------------------------------------------------------------
10 namespace System.Data.Objects
12 using System;
13 using System.Collections;
14 using System.ComponentModel;
16 /// <summary>
17 /// This class implements IEnumerable and IDisposable. Instance of this class
18 /// is returned from ObjectQuery.Execute method.
19 /// </summary>
20 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
21 public abstract class ObjectResult : IEnumerable, IDisposable, IListSource
23 internal ObjectResult()
27 IEnumerator IEnumerable.GetEnumerator()
29 return this.GetEnumeratorInternal();
32 // ----------------------
33 // IListSource Properties
34 // ----------------------
35 /// <summary>
36 /// IListSource.ContainsListCollection implementation. Always returns false.
37 /// </summary>
38 bool IListSource.ContainsListCollection
40 get
42 return false; // this means that the IList we return is the one which contains our actual data, it is not a collection
46 // ----------------------
47 // IListSource method
48 // ----------------------
49 /// <summary>
50 /// IListSource.GetList implementation
51 /// </summary>
52 /// <returns>
53 /// IList interface over the data to bind
54 /// </returns>
55 IList IListSource.GetList()
57 return this.GetIListSourceListInternal();
60 public abstract Type ElementType
62 get;
65 public abstract void Dispose();
67 /// <summary>
68 /// Get the next result set of a stored procedure.
69 /// </summary>
70 /// <returns>
71 /// An ObjectResult that enumerates the values of the next result set. null, if there are no more, or if the
72 /// the ObjectResult is not the result of a stored procedure call.
73 /// </returns>
74 public ObjectResult<TElement> GetNextResult<TElement>()
76 return this.GetNextResultInternal<TElement>();
79 internal abstract IEnumerator GetEnumeratorInternal();
80 internal abstract IList GetIListSourceListInternal();
81 internal abstract ObjectResult<TElement> GetNextResultInternal<TElement>();