Пример #1
0
 /// <summary>
 /// Initializes a new instance of the RobotWithLicenseDto class.
 /// </summary>
 /// <param name="name">A custom name for the robot.</param>
 /// <param name="username">The machine username. If the user is under a
 /// domain, you are required to also specify it in a DOMAIN\username
 /// format.
 /// &lt;para /&gt;Note: You must use short domain names, such as
 /// desktop\administrator and NOT desktop.local/administrator.</param>
 /// <param name="type">The Robot type. Possible values include:
 /// 'NonProduction', 'Attended', 'Unattended', 'Studio', 'Development',
 /// 'StudioX'</param>
 /// <param name="hostingType">The Robot hosting type (Standard /
 /// Floating). Possible values include: 'Standard', 'Floating'</param>
 /// <param name="provisionType">The Robot provision type. Possible
 /// values include: 'Manual', 'Automatic'</param>
 /// <param name="license">The attached license</param>
 /// <param name="licenseKey">The key is automatically generated from
 /// the server for the Robot machine.
 /// &lt;para /&gt;For the robot to work, the same key must exist on
 /// both the robot and Orchestrator.
 /// &lt;para /&gt;All robots on a machine must have the same license
 /// key in order to register correctly.</param>
 /// <param name="machineName">The name of the machine a Robot is hosted
 /// on.</param>
 /// <param name="machineId">The Id of the machine a Robot is hosted
 /// on</param>
 /// <param name="externalName">Contains the value of the key in the
 /// external store used to store the password.</param>
 /// <param name="description">Used to add additional information about
 /// a robot in order to better identify it.</param>
 /// <param name="version">The Robot's Version.</param>
 /// <param name="password">The Windows password associated with the
 /// machine username.</param>
 /// <param name="credentialStoreId">The Credential Store used to store
 /// the password.</param>
 /// <param name="userId">The associated user's Id.</param>
 /// <param name="credentialType">The robot credentials type (Default/
 /// SmartCard). Possible values include: 'Default', 'SmartCard'</param>
 /// <param name="environments">The collection of environments the robot
 /// is part of.</param>
 /// <param name="robotEnvironments">The comma separated textual
 /// representation of environment names the robot is part of.</param>
 /// <param name="executionSettings">A collection of key value pairs
 /// containing execution settings for this robot.</param>
 /// <param name="isExternalLicensed">Flag to indicate if the robot uses
 /// an external license</param>
 public RobotWithLicenseDto(string name, string username, RobotWithLicenseDtoType type, RobotWithLicenseDtoHostingType hostingType, RobotWithLicenseDtoProvisionType provisionType, RobotLicenseDto license = default(RobotLicenseDto), string licenseKey = default(string), string machineName = default(string), long?machineId = default(long?), string externalName = default(string), string description = default(string), string version = default(string), string password = default(string), long?credentialStoreId = default(long?), long?userId = default(long?), RobotWithLicenseDtoCredentialType?credentialType = default(RobotWithLicenseDtoCredentialType?), IList <EnvironmentDto> environments = default(IList <EnvironmentDto>), string robotEnvironments = default(string), IDictionary <string, object> executionSettings = default(IDictionary <string, object>), bool?isExternalLicensed = default(bool?), long?id = default(long?))
 {
     License            = license;
     LicenseKey         = licenseKey;
     MachineName        = machineName;
     MachineId          = machineId;
     Name               = name;
     Username           = username;
     ExternalName       = externalName;
     Description        = description;
     Version            = version;
     Type               = type;
     HostingType        = hostingType;
     ProvisionType      = provisionType;
     Password           = password;
     CredentialStoreId  = credentialStoreId;
     UserId             = userId;
     CredentialType     = credentialType;
     Environments       = environments;
     RobotEnvironments  = robotEnvironments;
     ExecutionSettings  = executionSettings;
     IsExternalLicensed = isExternalLicensed;
     Id = id;
     CustomInit();
 }
        internal static string ToSerializedValue(this RobotWithLicenseDtoProvisionType value)
        {
            switch (value)
            {
            case RobotWithLicenseDtoProvisionType.Manual:
                return("Manual");

            case RobotWithLicenseDtoProvisionType.Automatic:
                return("Automatic");
            }
            return(null);
        }