LoadOperation 泛型類別
表示非同步載入作業。
命名空間: System.ServiceModel.DomainServices.Client
組件: System.ServiceModel.DomainServices.Client (於 system.servicemodel.domainservices.client.dll)
使用方式
'用途
Dim instance As LoadOperation(Of TEntity)
語法
'宣告
Public NotInheritable Class LoadOperation(Of TEntity As Entity)
Inherits LoadOperation
public sealed class LoadOperation<TEntity> : LoadOperation where TEntity : Entity
generic<typename TEntity> where TEntity : Entity
public ref class LoadOperation sealed : public LoadOperation
GenericParameters
- TEntity
正在載入的實體類型。
範例
下列範例示範用來以查詢資料填入 DataGrid 的 LoadOperation 物件。
Imports System.ServiceModel.DomainServices.Client
Imports RIAServicesExample.Web
Partial Public Class MainPage
Inherits UserControl
Private _customerContext As New CustomerDomainContext
Public Sub New()
InitializeComponent()
Dim loadOp = Me._customerContext.Load(Me._customerContext.GetCustomersQuery())
CustomerGrid.ItemsSource = loadOp.Entities
End Sub
End Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using RIAServicesExample.Web;
using System.ServiceModel.DomainServices.Client;
namespace RIAServicesExample
{
public partial class MainPage : UserControl
{
private CustomerDomainContext _customerContext = new CustomerDomainContext();
public MainPage()
{
InitializeComponent();
LoadOperation<Customer> loadOp = this._customerContext.Load(this._customerContext.GetCustomersQuery());
CustomerGrid.ItemsSource = loadOp.Entities;
}
}
}
繼承階層
System.Object
System.ServiceModel.DomainServices.Client.OperationBase
System.ServiceModel.DomainServices.Client.LoadOperation
System.ServiceModel.DomainServices.Client.LoadOperation
執行緒安全性
任何這個類型的公用靜態 (在 Visual Basic 中為 共用) 成員都具備執行緒安全。 不保證任何執行個體成員安全執行緒。
平台
開發平台
Windows XP Home Edition, Windows XP Professional, Windows Server 2003 、Windows Server 2008 和 Windows 2000
目標平台
Change History
另請參閱
參考
LoadOperation 成員
System.ServiceModel.DomainServices.Client 命名空間