/// <summary> /// Add a class to the service for the given class type annotated with the KRPCClass attribute. /// Returns the name of the class. /// </summary> public string AddClass(Type classType) { TypeUtils.ValidateKRPCClass(classType); var name = classType.Name; if (Classes.ContainsKey(name)) { throw new ServiceException("Service " + Name + " contains duplicate classes " + name); } Classes [name] = new ClassSignature(Name, name, classType.GetDocumentation()); return(name); }
/// <summary> /// Add a class to the service for the given class type annotated with the KRPCClass attribute. /// Returns the name of the class. /// </summary> public string AddClass(Type classType) { TypeUtils.ValidateKRPCClass (classType); var name = classType.Name; if (Classes.ContainsKey (name)) throw new ServiceException ("Service " + Name + " contains duplicate classes " + name); Classes [name] = new ClassSignature (Name, name, classType.GetDocumentation ()); return name; }
void CheckDocumentation (ClassSignature cls) { CheckDocumentation (cls.FullyQualifiedName, cls.Documentation); }