C#: MailBee.SmtpMail.Smtp.QuickSend("jdoe@domain.com", "bill@domain.com", "Subject", "Message Body"); |
VB.NET: MailBee.SmtpMail.Smtp.QuickSend("jdoe@domain.com", "bill@domain.com", "Subject", "Message Body") |
C#: mailer.DnsServers.Add("127.0.0.1"); |
VB.NET: mailer.DnsServers.Add("127.0.0.1") |
C#: mailer.DnsServers.Autodetect(); |
VB.NET: mailer.DnsServers.Autodetect() |
![]() | Code-First服务器对Remoting SDK 9最重要的加强是增加了新的Code First服务器。忽略在Service Builder中手动定义服务接口,并保持RODL和代码同步。 只需在代码中定义你的服务,Remoting SDK就完成了。同时支持.NET和Delphi服务器。
| |
![]() | 所有新的CodeGen使用开源CodeGen4框架可以完全修改和简化Remoting SDK客户端存根的代码生成。实际上Remoting SDK-specific codegen logic也是开源的,如有必要,你可以很容易地调整它来满足的需要。 这是Mac和Windows 的rodl2code命令行工具并集成到Fire,Visual Studio,Delphi和Service Builder的补充。
| |
![]() | Mac新的Service Importer app我们还为Mac创建了一个全新的应用程序,用于连接到远程服务,导入其RODLs并使用CodeGen4为所有语言生成必要的代码存根。开发人员在不使用IDE与专用的Remoting SDK集成的情况下仍然可以轻松连接。
| |
![]() | 在Swift中创建构建服务器Mac和iOS开发人员现在可以在他们的Mac(使用我们免费的Swift编译器和IDE、Fire)上的Swift中创建服务器应用程序,并将它们部署到Linux、Windows和Mac OS X服务器中。 阅读有关Fire的更多信息或浏览Remoting SDK 文档。 当然,你也可以在Fire、for Cocoa、Java / Android和.NET中创建客户端应用程序。
| |
![]() | 完全支持SwiftRemoting SDK 9使用Xcode或Elements添加了在Swift中编写客户端的功能。支持Swift CodeGen并优化和注释了该库。 | |
![]() | 连接服务器的新工作流程连接服务器的新工作流程 在所有三个IDE中,使用新的“连接到服务器”菜单选项可以简化将任何客户端应用程序项目连接到服务器的过程。只需将IDE指向你的服务器的URL,你的项目将自动变成一个Remoting SDK客户端,并创建所有必要的引用和代码存根。 新的.remoteRODL文件让你的客户端项目与服务器保持同步,并且一个新的ServerAccess类存根将帮助你开始调用你的服务器。
| |
![]() | 改进SSL&TSL安全通信比以往更重要,Remoting SDK可以让你的服务器通过HTTPS和TLS进行安全通信变得非常容易。无论你使用的是自动生成、自签名还是已购买的证书,现在都可以设置两个属性来实现安全连接。
| |
![]() | 减少样板代码我们已经从根本上抽出了很多需要的板卡代码来使一个服务器完全运行起来。 使用RO9,你现在可以使用一行虚拟代码启动一个服务器 - 包括支持运行组合模式(GUI、命令行和后台服务)、设置SSL等。
| |
![]() | 创建watchOS应用程序Remoting SDK 9增加了从Apple Watch apps连接到你的服务器的功能,让你的用户可以直接在手腕上访问网络驱动的信息。
| |
![]() | 创建tvOS应用程序同样,你现在可以在你的tvOS apps中使用Remoting SDK客户端功能,将你的数据和服务器内容呈现到大屏幕上。 watchOS和tvOS客户端库都使用与现有的iOS和OS X库相同的代码库,因此在所有四个Apple平台上共享客户端代码非常容易。
|
C#: Pop3 pop = new Pop3(); |
VB.NET: Dim pop As Pop3 = New Pop3() |
C#: pop.Connect("mail.domain.com"); |
VB.NET: pop.Connect("mail.domain.com") |
C#: pop.Connect("127.0.0.1"); |
VB.NET: pop.Connect("127.0.0.1") |
C#: pop.Login("login", "password"); |
VB.NET: pop.Login("login", "password") |
C#: MailMessage msg = pop.DownloadEntireMessage(pop.InboxMessageCount); |
VB.NET: Dim msg As MailMessage = pop.DownloadEntireMessage(pop.InboxMessageCount) |
C#: pop.Disconnect(); |
VB.NET: pop.Disconnect() |
C#: using System; using MailBee; using MailBee.Pop3Mail; using MailBee.Mime; namespace EmailApp { class Class1 { [STAThread] static bool IsNewMessage(string UID) { return true; } static void Main(string[] args) { Pop3 pop = new Pop3(); try { pop.Connect("mail.domain.com"); pop.Login("login", "password"); Console.WriteLine("Successfully logged in."); } catch(MailBeePop3LoginNegativeResponseException) { Console.WriteLine("POP3 server replied with a negative response at login."); } string[] arrIDs = pop.GetMessageUids(); int n = pop.InboxMessageCount; if (IsNewMessage(arrIDs[n])) { MailMessage msg = pop.DownloadEntireMessage(n); if (msg.BodyHtmlText != "") Console.WriteLine(msg.BodyHtmlText); else if (msg.BodyPlainText != "") Console.WriteLine(msg.BodyPlainText); else Console.WriteLine("The body of this message is empty."); } try { pop.Disconnect(); Console.WriteLine("Disconnected successfully."); } catch { Console.WriteLine("Disconnection failed."); } } } } |
VB.NET: Imports System Imports MailBee Imports MailBee.Pop3Mail Imports MailBee.Mime Namespace EmailApp Class Class1 _ Shared Function IsNewMessage(ByVal UID As String) As Boolean Return True End Function Shared Sub Main(ByVal args() As String) Dim pop As Pop3 = New Pop3() Try pop.Connect("mail.domain.com") pop.Login("login", "password") Console.WriteLine("Successfully logged in.") Catch Console.WriteLine("POP3 server replied with a negative response at login.") End Try Dim arrIDs() As String = pop.GetMessageUids() Dim n As Integer = pop.InboxMessageCount If IsNewMessage(arrIDs(n)) Then Dim msg As MailMessage = pop.DownloadEntireMessage(n) If msg.BodyHtmlText <> "" Then Console.WriteLine(msg.BodyHtmlText) Else If msg.BodyPlainText <> "" Then Console.WriteLine(msg.BodyPlainText) Else Console.WriteLine("The body of this message is empty.") End If End If End If Try pop.Disconnect() Console.WriteLine("Disconnected successfully.") Catch Console.WriteLine("Disconnection failed.") End Try End Sub End Class End Namespace |