Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GenericLaunchConfiguration"/> class
 /// with the specified launch type and arguments.
 /// </summary>
 /// <param name="launchType">The launch type.</param>
 /// <param name="arguments">An object modeling the JSON representation of the launch arguments.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="launchType"/> is <see langword="null"/>.</exception>
 public GenericLaunchConfiguration(LaunchType launchType, object arguments)
     : base(launchType, JToken.FromObject(arguments))
 {
     if (launchType == null)
     {
         throw new ArgumentNullException("launchType");
     }
 }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LaunchConfiguration{TArguments}"/> class
        /// with the specified launch type and arguments.
        /// </summary>
        /// <param name="launchType">The server launch type.</param>
        /// <param name="arguments">The arguments for launching a server.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="launchType"/> is <see langword="null"/>.</exception>
        protected LaunchConfiguration(LaunchType launchType, TArguments arguments)
        {
            if (launchType == null)
            {
                throw new ArgumentNullException("launchType");
            }

            _launchType = launchType;
            _arguments  = arguments;
        }
Example #3
0
 /// <inheritdoc/>
 protected override LaunchType FromName(string name)
 {
     return(LaunchType.FromName(name));
 }