InvalidDataSourceReference 类
Represents a state in which a data source reference is no longer valid.
继承层次结构
System.Object
ReportService2005.DataSourceDefinitionOrReference
ReportService2005.InvalidDataSourceReference
命名空间: ReportService2005
程序集: ReportService2005(在 ReportService2005.dll 中)
语法
声明
Public Class InvalidDataSourceReference _
Inherits DataSourceDefinitionOrReference
用法
Dim instance As InvalidDataSourceReference
public class InvalidDataSourceReference : DataSourceDefinitionOrReference
public ref class InvalidDataSourceReference : public DataSourceDefinitionOrReference
type InvalidDataSourceReference =
class
inherit DataSourceDefinitionOrReference
end
public class InvalidDataSourceReference extends DataSourceDefinitionOrReference
InvalidDataSourceReference 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
![]() |
InvalidDataSourceReference | Initializes a new instance of the InvalidDataSourceReference class. |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
Equals | (从 Object 继承。) |
![]() |
Finalize | (从 Object 继承。) |
![]() |
GetHashCode | (从 Object 继承。) |
![]() |
GetType | (从 Object 继承。) |
![]() |
MemberwiseClone | (从 Object 继承。) |
![]() |
ToString | (从 Object 继承。) |
页首
注释
An InvalidDataSourceReference object is used with the Item property as output by GetItemDataSources method.
In most cases, an InvalidDataSourceReference object is returned when a shared data source has been deleted.
To evaluate whether a data source reference is valid, use the is keyword in C# (TypeOf/Is in Visual Basic) to determine the type of object returned by the Item property of the DataSource class, as shown in the following C# code:
DataSource[] dataSource;
dataSource = service.GetReportDataSources( "/MyReport" );
foreach ( DataSource ds in dataSource )
{
if ( ds.Item is InvalidDataSourceReference )
{
// Code to handle a corrupt or missing data source reference goes here...
}
}
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。