MailUriHelper 類別
提供 Helper 函式,以建立郵件統一資源識別元 (URI) 或從郵件 URI 存取資料。
命名空間: Microsoft.ServiceModel.Channels.Mail
組件: Microsoft.ServiceModel.Channels.Mail (在 Microsoft.ServiceModel.Channels.Mail.dll 中)
語法
'宣告
Public NotInheritable Class MailUriHelper
'用途
Dim instance As MailUriHelper
public sealed class MailUriHelper
public ref class MailUriHelper sealed
public final class MailUriHelper
備註
郵件 URI 包含通道名稱和電子郵件地址。郵件 URI 以下列格式為基礎:
net.mail://<channel-name>#<e-mail-address-1>;...;<e-mail-address-n>
![]() |
---|
此類別 (Class) 隨附於 .NET Compact Framework 3.5 版,但在執行階段則需要 .NET Compact Framework 3.5 或 .NET Framework 3.0 版 (含) 以後版本。 |
範例
下列範例示範如何使用 MailUriHelper 類別建立 Uri 物件。BuildChannelListener 和 CreateChannel 方法的呼叫中使用 URI 做為參數。
bpc = New BindingParameterCollection()
factory = binding.BuildChannelFactory(Of IOutputChannel)(bpc)
listener = binding.BuildChannelListener(Of IInputChannel)(MailUriHelper.CreateUri(ChannelName, ""))
factory.Open()
output = factory.CreateChannel(New EndpointAddress(MailUriHelper.Create(ChannelName, DestinationEmailAddress)))
bpc = new BindingParameterCollection();
factory = binding.BuildChannelFactory<IOutputChannel>(bpc);
listener = binding.BuildChannelListener<IInputChannel>(MailUriHelper.CreateUri(ChannelName, ""), bpc);
factory.Open();
output = factory.CreateChannel(new EndpointAddress(MailUriHelper.Create(ChannelName, DestinationEmailAddress)));
繼承階層架構
System.Object
Microsoft.ServiceModel.Channels.Mail.MailUriHelper
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。
平台
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Compact Framework
支援版本:3.5