Ejemplo n.º 1
0
        private PSResultLevel Convert(ResultLevel value)
        {
            switch (value)
            {
            case ResultLevel.Error:
                return(PSResultLevel.Error);

            case ResultLevel.Info:
                return(PSResultLevel.Info);

            case ResultLevel.Warning:
                return(PSResultLevel.Warning);

            default:
                throw new ArgumentException($"{value.GetType().Name} value {value} is unsupported");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts the specified value.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns>PSResultLevel.</returns>
        /// <exception cref="ArgumentException"></exception>
        private PSResultLevel Convert(ResultLevel value)
        {
            switch (value)
            {
            case ResultLevel.Error:
                return(PSResultLevel.Error);

            case ResultLevel.Info:
                return(PSResultLevel.Info);

            case ResultLevel.Warning:
                return(PSResultLevel.Warning);

            default:
                throw new ArgumentException(string.Format(StorageSyncResources.UnsupportedErrorFormat, value.GetType().Name, value));
            }
        }