当前位置: 首页>>代码示例>>C#>>正文


C# Client.ToString方法代码示例

本文整理汇总了C#中Client.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Client.ToString方法的具体用法?C# Client.ToString怎么用?C# Client.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Client的用法示例。


在下文中一共展示了Client.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestClientRestarting

        public void TestClientRestarting()
        {
            Client client = new Client();
            client.Start();
            client.Stop();
            client.ToString();  // shouldn't throw an exception
            client.Start();
            client.Stop();

            client.Dispose();
            client.ToString();
        }
开发者ID:briandealwis,项目名称:gt,代码行数:12,代码来源:Lifecycle.cs

示例2: UnPack

        public void UnPack(Client client, Packet packet, IEventDispatcher eventDispatcher)
        {
            string ip = client.ToString().Split(':')[0];
            ushort port = packet.Reader.ReadUInt16();

            eventDispatcher.ThrowNewEvent(EventID, new MasterServerDatas {IP = ip, Port = port});
        }
开发者ID:paveyry,项目名称:MetaStruggle,代码行数:7,代码来源:MasterRemoveServer.cs

示例3: ReturnFormattedNameWithNoPreferredNameAsToString

        public void ReturnFormattedNameWithNoPreferredNameAsToString()
        {
            var client = new Client()
            {
                FullName = new FullName("Steven", "Smith"),
                Salutation = "Mr."
            };

            var expectedResult = "Mr. Steven Smith";

            Assert.AreEqual(expectedResult, client.ToString());
        }
开发者ID:Malkiat-Singh,项目名称:ddd-vet-sample,代码行数:12,代码来源:ClientShould.cs

示例4: UnPack

 public void UnPack(Client client, Packet packet, IEventDispatcher eventDispatcher)
 {
     eventDispatcher.ThrowNewEvent(EventID,
                                   new MasterServerDatas
                                       {
                                           IP = client.ToString().Split(':')[0],
                                           Port = packet.Reader.ReadUInt16(),
                                           Map = packet.Reader.ReadString(),
                                           MaxPlayer = packet.Reader.ReadByte(),
                                           ConnectedPlayer = packet.Reader.ReadByte()
                                       });
 }
开发者ID:paveyry,项目名称:MetaStruggle,代码行数:12,代码来源:MasterAddServer.cs

示例5: okButton_Click

        private void okButton_Click(object sender, RoutedEventArgs e) {
            string fName = firstNameTextBox.Text.ToString();
            string lName = lastNameTextBox.Text.ToString();
            
            Client newClient = new Client(fName, lName);

            DataManager.AddClient(newClient);
            main.listView1.ItemsSource = DataManager.NameList;
            main.listView1.SelectedItem = newClient.ToString();

            main.UpdateClientInfo();

            this.Close();
        }
开发者ID:32graham,项目名称:Glowfish,代码行数:14,代码来源:AddClientDialog.xaml.cs

示例6: Main

    public static void Main(string[] args)
    {
        GLib.GType.Init ();
        GLib.Thread.Init ();

        Client client = new Client (new string[] {null});
        client.Uevent += HandleClientUevent;

        Console.WriteLine ("Created client {0}", client.ToString());

        foreach (string sub in client.Subsystems) {
        //			if (string.IsNullOrEmpty (sub))
        //			   continue;

            Console.WriteLine ("Looking at subsystem: {0}", sub);
            foreach (Device device in client.QueryBySubsystem (sub)) {
                Console.WriteLine ("Looking at:\n\t {0} ({1})\n\t{2}", string.IsNullOrEmpty (device.Name) ? "nameless device" : device.Name,
                    device.Number, device.DeviceFile);
            }
        }
        GLib.MainLoop loop = new GLib.MainLoop ();
        loop.Run ();
    }
开发者ID:mono,项目名称:gudev-sharp,代码行数:23,代码来源:TestGUDev.cs

示例7: Command

        public Command(Client.CommandName commandName, params string[] options): this(commandName.ToString(), options)
        {

        }
开发者ID:HatipMevis,项目名称:TS3QueryLib.Net,代码行数:4,代码来源:Command.cs

示例8: ClientStart

 void ClientStart(IPEndPoint _ipMyPoint,IPEndPoint _ipTargetPoint)
 {
     NetwInterfaceEx = new Client();
         MessageServiceClass.MessageProcessing ("Client was created"+NetwInterfaceEx.ToString()+"with target"+_ipTargetPoint.Address.AddressFamily);
         NetwInterfaceEx.StartMain(_ipMyPoint, _ipTargetPoint);
 }
开发者ID:R---K,项目名称:SQ,代码行数:6,代码来源:NetworkManagerScript.cs


注:本文中的Client.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。