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

            return(mpdStateMonitor);
        }
示例#2
0
		/// <summary>
		///     Static factory to create a MpdStateMonitor
		/// </summary>
		/// <param name="hostname"></param>
		/// <param name="port"></param>
		/// <returns>Task which return MpdStateMonitor</returns>
		public static async Task<MpdStateMonitor> CreateAsync(string hostname, int port)
		{
			var mpdStateMonitor = new MpdStateMonitor();
			await mpdStateMonitor.InitAsync(hostname, port);
			return mpdStateMonitor;
		}