public static AdminAuditLogCmdletParameter Parse(string propertyValue)
        {
            if (propertyValue == null)
            {
                throw new ArgumentNullException("propertyValue");
            }
            AdminAuditLogCmdletParameter adminAuditLogCmdletParameter = new AdminAuditLogCmdletParameter();
            int num = propertyValue.IndexOf('=');

            if (num > 0)
            {
                adminAuditLogCmdletParameter.Name  = propertyValue.Substring(0, num).Trim();
                adminAuditLogCmdletParameter.Value = propertyValue.Substring(num + 1).Trim();
                return(adminAuditLogCmdletParameter);
            }
            throw new ArgumentException(DataStrings.AdminAuditLogInvalidParameterOrModifiedProperty(propertyValue));
        }
Esempio n. 2
0
        public static AdminAuditLogModifiedProperty Parse(string propertyValue, bool newValue)
        {
            if (propertyValue == null)
            {
                throw new ArgumentNullException("propertyValue");
            }
            AdminAuditLogModifiedProperty adminAuditLogModifiedProperty = new AdminAuditLogModifiedProperty();
            int num = propertyValue.IndexOf('=');

            if (num > 0)
            {
                adminAuditLogModifiedProperty.Name = propertyValue.Substring(0, num).Trim();
                if (newValue)
                {
                    adminAuditLogModifiedProperty.NewValue = propertyValue.Substring(num + 1).Trim();
                }
                else
                {
                    adminAuditLogModifiedProperty.OldValue = propertyValue.Substring(num + 1).Trim();
                }
                return(adminAuditLogModifiedProperty);
            }
            throw new ArgumentException(DataStrings.AdminAuditLogInvalidParameterOrModifiedProperty(propertyValue));
        }