Пример #1
0
        /// <summary>
        ///     Sets the property value for the specified name (if it exists).
        /// </summary>
        /// <param name="source">The propset.</param>
        /// <param name="propertyName">Name of the property.</param>
        /// <param name="propertyValue">The property value.</param>
        /// <returns>
        ///     Returns a <see cref="bool" /> representing <c>true</c> if the property was updated; otherwise <c>false</c>.
        /// </returns>
        public static bool SetValue(this IMMWMSPropertySet source, string propertyName, object propertyValue)
        {
            if (source == null || !source.Exists(propertyName))
            {
                return(false);
            }

            source.SetProperty(propertyName, propertyValue);

            return(true);
        }