mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
79 lines
1.9 KiB
C#
79 lines
1.9 KiB
C#
//------------------------------------------------------------------------------
|
|
// <copyright file="DummyDataSource.cs" company="Microsoft">
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// </copyright>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace System.Web.UI.WebControls {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
|
|
|
|
/// <devdoc>
|
|
/// </devdoc>
|
|
internal sealed class DummyDataSource : ICollection {
|
|
|
|
private int dataItemCount;
|
|
|
|
internal DummyDataSource(int dataItemCount) {
|
|
this.dataItemCount = dataItemCount;
|
|
}
|
|
|
|
public int Count {
|
|
get {
|
|
return dataItemCount;
|
|
}
|
|
}
|
|
|
|
public bool IsSynchronized {
|
|
get {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public Object SyncRoot {
|
|
get {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public void CopyTo(Array array, int index) {
|
|
for (IEnumerator e = this.GetEnumerator(); e.MoveNext();)
|
|
array.SetValue(e.Current, index++);
|
|
}
|
|
|
|
public IEnumerator GetEnumerator() {
|
|
return new DummyDataSourceEnumerator(dataItemCount);
|
|
}
|
|
|
|
|
|
private class DummyDataSourceEnumerator : IEnumerator {
|
|
|
|
private int count;
|
|
private int index;
|
|
|
|
public DummyDataSourceEnumerator(int count) {
|
|
this.count = count;
|
|
this.index = -1;
|
|
}
|
|
|
|
public object Current {
|
|
get {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public bool MoveNext() {
|
|
index++;
|
|
return index < count;
|
|
}
|
|
|
|
public void Reset() {
|
|
this.index = -1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|