Classe InvalidDataSourceReference
Represents a state in which a data source reference is no longer valid.
Gerarchia di ereditarietà
System. . :: . .Object
ReportService2005. . :: . .DataSourceDefinitionOrReference
ReportService2005..::..InvalidDataSourceReference
Spazio dei nomi ReportService2005
Assembly: ReportService2005 (in ReportService2005.dll)
Sintassi
'Dichiarazione
<SerializableAttribute> _
Public Class InvalidDataSourceReference _
Inherits DataSourceDefinitionOrReference
'Utilizzo
Dim instance As InvalidDataSourceReference
[SerializableAttribute]
public class InvalidDataSourceReference : DataSourceDefinitionOrReference
[SerializableAttribute]
public ref class InvalidDataSourceReference : public DataSourceDefinitionOrReference
[<SerializableAttribute>]
type InvalidDataSourceReference =
class
inherit DataSourceDefinitionOrReference
end
public class InvalidDataSourceReference extends DataSourceDefinitionOrReference
Nel tipo InvalidDataSourceReference sono esposti i membri seguenti.
Costruttori
Nome | Descrizione | |
---|---|---|
InvalidDataSourceReference | Initializes a new instance of the InvalidDataSourceReference class. |
In alto
Metodi
Nome | Descrizione | |
---|---|---|
Equals | Ereditato da Object. | |
Finalize | Ereditato da Object. | |
GetHashCode | Ereditato da Object. | |
GetType | Ereditato da Object. | |
MemberwiseClone | Ereditato da Object. | |
ToString | Ereditato da Object. |
In alto
Osservazioni
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...
}
}
Protezione dei thread
I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.