Example #1
0
        /// <summary>
        ///     Gets a singletone instance of the <see cref="SSDPServer"/>.
        /// </summary>
        /// <param name="logManager">
        ///     The <see cref="ILogManager"/> to use for logging the debug information.
        /// </param>
        /// <returns>
        ///     A singletone instance of the <see cref="SSDPServer"/>.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="logManager"/> is <c>null</c>.
        /// </exception>
        public static SSDPServer GetInstance(ILogManager logManager = null)
        {
            lock (instanceSyncObject)
            {
                if (instance == null)
                {
                    instance = new SSDPServer(logManager);
                    instance.StartAync();
                }
            }

            return(instance);
        }
Example #2
0
		/// <summary>
		///     Gets a singletone instance of the <see cref="SSDPServer"/>.
		/// </summary>
		/// <param name="logManager">
		///     The <see cref="ILogManager"/> to use for logging the debug information.
		/// </param>
		/// <returns>
		///     A singletone instance of the <see cref="SSDPServer"/>.
		/// </returns>
		/// <exception cref="ArgumentNullException">
		///     <paramref name="logManager"/> is <c>null</c>.
		/// </exception>
		public static SSDPServer GetInstance(ILogManager logManager = null)
		{
			lock (instanceSyncObject)
			{
				if (instance == null)
				{
					instance = new SSDPServer(logManager);
					instance.StartAync();
				}
			}

			return instance;
		}