HttpStaticObjectsCollectionBase 类

定义

作为提供 StaticObjects 属性的应用程序范围对象的集合的类的基类。Serves as the base class for classes that provide a collection of application-scoped objects for the StaticObjects property.

public ref class HttpStaticObjectsCollectionBase abstract : System::Collections::ICollection
public abstract class HttpStaticObjectsCollectionBase : System.Collections.ICollection
type HttpStaticObjectsCollectionBase = class
    interface ICollection
    interface IEnumerable
Public MustInherit Class HttpStaticObjectsCollectionBase
Implements ICollection
继承
HttpStaticObjectsCollectionBase
派生
实现

注解

类是一个抽象类, 它包含与HttpStaticObjectsCollection类相同的成员。 HttpStaticObjectsCollectionBaseThe HttpStaticObjectsCollectionBase class is an abstract class that contains the same members as the HttpStaticObjectsCollection class. 利用类, 您可以创建HttpStaticObjectsCollection类似于类的派生类, 但可以自定义该派生类并在 ASP.NET 管道之外工作。 HttpStaticObjectsCollectionBaseThe HttpStaticObjectsCollectionBase class lets you create derived classes that are like the HttpStaticObjectsCollection class, but that you can customize and that work outside the ASP.NET pipeline. 执行单元测试时, 通常使用派生类来实现具有自定义行为的成员, 该行为可满足你要测试的方案。When you perform unit testing, you typically use a derived class to implement members with customized behavior that fulfills the scenario you are testing.

HttpStaticObjectsCollectionWrapper 类是从 HttpStaticObjectsCollectionBase 类派生的。The HttpStaticObjectsCollectionWrapper class derives from the HttpStaticObjectsCollectionBase class. 类用作HttpStaticObjectsCollection类的包装。 HttpStaticObjectsCollectionWrapperThe HttpStaticObjectsCollectionWrapper class serves as a wrapper for the HttpStaticObjectsCollection class. 在运行时, 通常使用HttpStaticObjectsCollectionWrapper类的实例来调用HttpStaticObjectsCollection对象的成员。At run time, you typically use an instance of the HttpStaticObjectsCollectionWrapper class to call members of the HttpStaticObjectsCollection object.

构造函数

HttpStaticObjectsCollectionBase()

初始化该类供继承的类实例使用。Initializes the class for use by an inherited class instance. 此构造函数只能由继承的类调用。This constructor can only be called by an inherited class.

属性

Count

当在派生类中重写时,获取集合中对象的数目。When overridden in a derived class, gets the number of objects in the collection.

IsReadOnly

当在派生类中重写时,获取一个值,该值指示集合是否为只读。When overridden in a derived class, gets a value that indicates whether the collection is read-only.

IsSynchronized

当在派生类中重写时,获取一个值,该值指示集合是否是线程安全的。When overridden in a derived class, gets a value that indicates whether the collection is thread-safe.

Item[String]

当在派生类中重写时,获取集合中具有指定名称的对象。When overridden in a derived class, gets the object that has the specified name from the collection.

NeverAccessed

当在派生类中重写时,获取一个值,该值指示是否已访问集合。When overridden in a derived class, gets a value that indicates whether the collection has been accessed.

SyncRoot

当在派生类中重写时,获取一个对象,该对象可用于同步对集合的访问。When overridden in a derived class, gets an object that can be used to synchronize access to the collection.

方法

CopyTo(Array, Int32)

在派生类中重写时,从数组中指定的索引开始,将集合的元素复制到该数组。When overridden in a derived class, copies the elements of the collection to an array, starting at the specified index in the array.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

当在派生类中重写时,返回可用于循环访问集合的枚举数。When overridden in a derived class, returns an enumerator that can be used to iterate through the collection.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetObject(String)

当在派生类中重写时,返回集合中具有指定名称的对象。When overridden in a derived class, returns the object that has the specified name from the collection.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Serialize(BinaryWriter)

当在派生类中重写时,将集合的内容写入 BinaryWriter 对象中。When overridden in a derived class, writes the contents of the collection to a BinaryWriter object.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于