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

Quarantine class: Difference between revisions

From Catglobe Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
(No difference)

Latest revision as of 05:14, 2 July 2020

Quarantine



A quarantine prohibiting bulkmails and bulksms from being sent to user.

Parent class

Inherits from object

Constructors

  • (int ResourceId "Resource Id of the Quarantine") - Instanciate an existing instance using the resource id of a Quarantine
  • (string name "Resource name", int parentResourceId "Parent resource.") - Instanciate a new instance

Methods

  • Empty Save() - Save the ResourceTemplate resource
  • (From object) string ToString() - The string representation of the object.

Properties

  • int Duration { get; set; } - Number of seconds the quarantine is enforced in seconds
  • string Name { get; set; } - Name of the Quarantine resource
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ResourceId { get; } - The Id of the Quarantine
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.


Examples

//Get data from a quarantine exist in quarantine resource list
Quarantine Q = new Quarantine(15525566);
print(Q.Duration); //2400
print(Q.Name); //NewQuarantine3
print(Q.ObjectTypeName); //Quarantine
print(Q.ResourceId); //15525566

//Edit data from a quarantine exist in quarantine resource list
Quarantine Q = new Quarantine(15525401);
Q.Duration=1000;
Q.Name="NewName";
Q.Save();

//Create a new quarantine
//Ex 1:
  Quarantine Q = new Quarantine("LastName1",15502953);
  Q.Duration=200;
  Q.Save();
//Ex 2:
  Quarantine Q = new Quarantine("",15502953);
  Q.Duration=300;
  Q.Name = "LastName2";
  Q.Save();
//Ex 3:
  Quarantine Q = new Quarantine("FirstName3",15502953);
  Q.Duration=500;
  Q.Name = "LastName3";
  Q.Save();