Share via


PollingListProvider.GetData Method

Retrieves business objects and stores them in the ICollection object that is returned.

Namespace: Microsoft.EssentialBusinessServer.Console.ObjectModel
Assembly: Microsoft.EssentialBusinessServer.Console.ObjectModel (in microsoft.essentialbusinessserver.console.objectmodel.dll)

Usage

Syntax

'Declaration
Protected MustOverride Function GetData As ICollection(Of TBusinessObject)
protected abstract ICollection<TBusinessObject> GetData ()
protected:
virtual ICollection<TBusinessObject>^ GetData () abstract
protected abstract ICollection<TBusinessObject> GetData ()
protected abstract function GetData () : ICollection<TBusinessObject>

Return Value

An instance of ICollection that contains the business objects that were retrieved.

Example

The following code example shows how to override the GetData method and add business objects to the list:

protected override ICollection<BusinessObject> GetData()
{
    List<BusinessObject> list = new List<BusinessObject>();

    BusinessObject businessObj = new BusinessObject();
    businessObj.AdminName = "administrator1";
    businessObj.ComputerName = "Computer1";
    businessObj.Location = "Building 1";
    businessObj.System = "Windows Vista";

    list.Add(businessObj);

    businessObj = new BusinessObject();
    businessObj.AdminName = "administrator2";
    businessObj.ComputerName = "Computer2";
    businessObj.Location = "Building 2";
    businessObj.System = "Windows Vista";

    list.Add(businessObj);

    return list;
}

Remarks

TBusinessObject represents a business object that encapsulates information and methods that relate to business data or business functionality. The information in the business object is exposed as properties.

The code example for this method shows business objects that are created from a class that uses properties to make information available. Business objects can also be created from other sources, such as databases or services.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2008 64-bit Edition, Windows Vista 64-bit Edition, Windows Essential Business Server 2008 Standard, Windows Essential Business Server 2008 Premium

Target Platforms

Windows Essential Business Server 2008 Standard, Windows Essential Business Server 2008 Premium

See Also

Reference

PollingListProvider Generic Class
PollingListProvider Members
Microsoft.EssentialBusinessServer.Console.ObjectModel Namespace