コード例 #1
0
        /// <summary>
        ///     Static factory to create a MpdClient
        /// </summary>
        /// <param name="hostname"></param>
        /// <param name="port"></param>
        /// <returns>Task which return MpdClient</returns>
        public new static async Task <MpdClient> CreateAsync(string hostname, int port)
        {
            var mpdClient = new MpdClient();
            await mpdClient.InitAsync(hostname, port);

            return(mpdClient);
        }
コード例 #2
0
ファイル: MpdClient.cs プロジェクト: dapplo/Dapplo.MPD
		/// <summary>
		///     Static factory to create a MpdClient
		/// </summary>
		/// <param name="hostname"></param>
		/// <param name="port"></param>
		/// <returns>Task which return MpdClient</returns>
		public new static async Task<MpdClient> CreateAsync(string hostname, int port)
		{
			var mpdClient = new MpdClient();
			await mpdClient.InitAsync(hostname, port);
			return mpdClient;
		}