示例#1
0
        /// <summary>
        /// Gets the ClassBuilderSpec for the named CommandClass from application memory.
        /// </summary>
        /// <returns>ClassBuilderSpec object or null</returns>
        /// <param name="CommandClassName">Command class name.</param>
        private ClassBuilderSpec GetSpecFromCommandClassName(string CommandClassName)
        {
            ClassBuilderSpecs specs = (ClassBuilderSpecs)HttpContext.Current.Application["ClassBuilderSpecs"];

            ClassBuilderSpec spec = specs.ClassBuilderSpecList.FirstOrDefault(s => s.CommandClassName == CommandClassName);

            return(spec);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SlackMUDRPG.Utility.ClassBuilder"/> class.
 /// </summary>
 /// <param name="CommandClassName">The name of the CommandClass the being built.</param>
 public ClassBuilder(string commandClassName, string userID)
 {
     this.Spec   = this.GetSpecFromCommandClassName(commandClassName);
     this.UserID = userID;
 }