示例#1
0
        /// <summary>
        /// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
        /// </summary>
        /// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
        /// <param name="system"><see cref="CoreSystem"/> that your external tool is used for</param>
        /// <param name="gameHash">The game hash, unique game ID (see in the game database)</param>
        public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system, string gameHash)
        {
            if (usage == BizHawkExternalToolUsage.EmulatorSpecific && system == CoreSystem.Null)
            {
                throw new InvalidOperationException("A system must be set");
            }
            if (usage == BizHawkExternalToolUsage.GameSpecific && gameHash.Trim() == string.Empty)
            {
                throw new InvalidOperationException("A game hash must be set");
            }

            _ToolUsage = usage;
            _System = system;
            _GameHash = gameHash;
        }
        /// <summary>
        /// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
        /// </summary>
        /// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
        /// <param name="system"><see cref="EmulatedSystem"/> that your external tool is used for</param>
        /// <param name="gameHash">The game hash, unique game ID (see in the game database)</param>
        public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, EmulatedSystem system, string gameHash)
        {
            if (usage == BizHawkExternalToolUsage.EmulatorSpecific && system == EmulatedSystem.Null)
            {
                throw new InvalidOperationException("A system must be set");
            }
            if (usage == BizHawkExternalToolUsage.GameSpecific && gameHash.Trim() == string.Empty)
            {
                throw new InvalidOperationException("A game hash must be set");
            }

            _ToolUsage = usage;
            _System    = system;
            _GameHash  = gameHash;
        }
示例#3
0
 public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system)
 {
 }
示例#4
0
 public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system, string gameHash)
 {
 }
示例#5
0
 /// <summary>
 /// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
 /// </summary>
 /// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
 /// <param name="system"><see cref="CoreSystem"/> that your external tool is used for</param>		
 public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system)
     : this(usage, system, string.Empty)
 {
 }
 /// <summary>
 /// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
 /// </summary>
 /// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
 /// <param name="system"><see cref="EmulatedSystem"/> that your external tool is used for</param>
 public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, EmulatedSystem system)
     : this(usage, system, string.Empty)
 {
 }
 /// <summary>
 /// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
 /// </summary>
 /// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
 /// <param name="system"><see cref="CoreSystem"/> that your external tool is used for</param>
 public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system)
     : this(usage, system, "")
 {
 }