示例#1
0
        private Variable CreateVariableFromVariableModel(AutomationManagement.Models.EncryptedVariable variable,
                                                         string automationAccountName)
        {
            Requires.Argument("variable", variable).NotNull();

            return(new Variable(variable, automationAccountName));
        }
示例#2
0
        // <summary>
        /// Initializes a new instance of the <see cref="Variable"/> class.
        /// </summary>
        /// <param name="variable">
        /// The variable.
        /// </param>
        /// <exception cref="System.ArgumentException">
        /// </exception>
        public Variable(AutomationManagement.Models.EncryptedVariable variable, string automationAccountName)
        {
            Requires.Argument("variable", variable).NotNull();

            this.Name                  = variable.Name;
            this.CreationTime          = variable.Properties.CreationTime.ToLocalTime();
            this.LastModifiedTime      = variable.Properties.LastModifiedTime.ToLocalTime();
            this.Value                 = null;
            this.Description           = variable.Properties.Description;
            this.Encrypted             = true;
            this.AutomationAccountName = automationAccountName;
        }