Difference between revisions of "GroupBuilderRoot class"
Nguyenduyan (talk | contribs) (Created page with "{{CGscriptClass_Template |Name=GroupBuilderRoot |Description=Represents a group builder rules for a group. |Constructors= {{CGscriptConstructors_Template|Parameters= {{CGscrip...") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
− | |Name=GroupBuilderRoot | + | |Name=<nowiki>GroupBuilderRoot</nowiki> |
− | |Description=Represents a group builder rules for a group. | + | |Description=<nowiki>Represents a group builder rules for a group.</nowiki> |
− | |Constructors= | + | |InheritsFrom=object|Constructors= |
{{CGscriptConstructors_Template|Parameters= | {{CGscriptConstructors_Template|Parameters= | ||
− | {{CGscriptParameters_Template|Type=int|Name=ResourceId|Description=Resource Id of the Group}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>ResourceId</nowiki>|Description=<nowiki>Resource Id of the Group</nowiki>}} |
− | |Description=Load rules of group}} | + | |Description=<nowiki>Load rules of group</nowiki>}} |
|Methods= | |Methods= | ||
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=Save|Description=Save the rules}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the rules</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} |
|Properties= | |Properties= | ||
− | {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} | + | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=GroupBuilderRuleCollection|Name=RootRules|HasGetter=1|Description=The root rules}} | + | {{CGscriptProperties_Template|ReturnType=GroupBuilderRuleCollection|Name=<nowiki>RootRules</nowiki>|HasGetter=1|Description=<nowiki>The root rules</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} |
}} | }} | ||
+ | |||
+ | === <span style="color:#DF8621">'''Examples'''</span> === | ||
+ | <source lang="javascript"> | ||
+ | //add a new rule without variable | ||
+ | number groupRId = 15560405; | ||
+ | GroupBuilderRoot root = new GroupBuilderRoot (groupRId); | ||
+ | GroupBuilderRule rule = new GroupBuilderRule (root); | ||
+ | GroupBuilderRuleCollection ruleColection = root.RootRules; | ||
+ | ruleColection.Add(rule); | ||
+ | root.Save(); | ||
+ | </source> |
Latest revision as of 05:48, 2 July 2020
GroupBuilderRoot
Represents a group builder rules for a group.
Parent class
Inherits from object
Constructors
- (int ResourceId "Resource Id of the Group") - Load rules of group
Methods
- Empty Save() - Save the rules
- (From object) string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- GroupBuilderRuleCollection RootRules { get; } - The root rules
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Examples
//add a new rule without variable
number groupRId = 15560405;
GroupBuilderRoot root = new GroupBuilderRoot (groupRId);
GroupBuilderRule rule = new GroupBuilderRule (root);
GroupBuilderRuleCollection ruleColection = root.RootRules;
ruleColection.Add(rule);
root.Save();