Toggle menu
913
3.8K
30.2K
279.2K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Resource class

From Catglobe Wiki

Resource


Represents a resource.

Parent class

Inherits from Array

Methods

  • bool Delete() - Deletes this resource
  • string ToString() - The string representation of the object.
  • object this[] { get; }(int index "Index") - Backward-compatible indexer
  • Empty this[] { get; }(int index "Index", object value "Value to set") - Backward-compatible indexer

Properties

  • number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
  • number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
  • number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
  • string Name { get; } - Name of the resource
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ParentResourceId { get; } - Unique id of the parent resource
  • int ResourceId { get; } - Resource unique id
  • int ResourceType { get; } - Resource type constant
  • number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
  • int TemplateResourceId { get; } - Unique id of the resource template (0 if none)
  • TypeInformation TypeInformation { get; } - Get information about this class.

Static Methods

  • bool Resource_delete(int resource unique id "Resource unique id") - Deletes a resource
  • Resource Resource_getParentResource(int resource unique id "Resource unique id") - Gets the parent resource of a resource
  • Dictionary Resource_searchByChildResourceIdAndResourceType(array resource id "Array of child resource IDs to search parents for", int Resource type "Resource type to filter parent resources by") - Returns a dictionary mapping parent resource IDs to arrays of child resources, filtered by the given resource type
  • array Resource_searchByName(string searchName "Name pattern to search for", int resourceType "Resource type constant to filter by", int resourceTemplateResourceId "Resource template id (0 for any)", int nameSearchType "Name search type constant (contains, starts-with, etc.)") - Searches for resources matching a name pattern, filtered by type, template and search type
  • array Resource_searchByName(string searchName "Name pattern to search for", int resourceType "Resource type constant to filter by", int resourceTemplateResourceId "Resource template id (0 for any)", int nameSearchType "Name search type constant (contains, starts-with, etc.)", int? maxCount "Maximum number of results to return") - Searches for resources matching a name pattern, filtered by type, template and search type, with max count
  • array Resource_searchByName(string searchName "Name pattern to search for", int resourceType "Resource type constant to filter by", int resourceTemplateResourceId "Resource template id (0 for any)", int nameSearchType "Name search type constant (contains, starts-with, etc.)", int? maxCount "Maximum number of results to return", int? parentResourceId "Parent resource id to restrict search under (0 for all)") - Searches for resources matching a name pattern, filtered by type, template, search type and parent resource
  • array Resource_searchByName(string searchName "Name pattern to search for", int resourceType "Resource type constant to filter by", int resourceTemplateResourceId "Resource template id (0 for any)", int nameSearchType "Name search type constant (contains, starts-with, etc.)", int? maxCount "Maximum number of results to return", int? parentResourceId "Parent resource id to restrict search under (0 for all)", bool? includeSubChildren "Whether to include all descendants rather than direct children only") - Searches for resources matching a name pattern, filtered by type, template, search type, parent resource and sub-children