예제 #1
0
        /// <summary>
        /// Gets the current value of a specific profile property using its name.
        /// </summary>
        /// <param name="propertyName">Name of the setting. This can include subproperties (i.e. PdfSettings.Security.Enable)</param>
        /// <returns>The value of the property</returns>
        public string GetProfileSetting(string propertyName)
        {
            if (HasAccess(propertyName) && ValueReflector.HasProperty(_job.Profile, propertyName))
            {
                return(ValueReflector.GetPropertyValue(_job.Profile, propertyName));
            }

            throw new COMException("Invalid property name.");
        }
예제 #2
0
 /// <summary>
 /// Set a conversion profile property using two strings: One for the name (i.e. PdfSettings.Security.Enable) and one for the value
 /// </summary>
 /// <param name="name">Name of the setting. This can include subproperties (i.e. PdfSettings.Security.Enable)</param>
 /// <param name="value">A string that can be parsed to the type</param>
 public void SetProfileSetting(string name, string value)
 {
     if (HasAccess(name) && ValueReflector.HasProperty(_job.Profile, name))
     {
         ValueReflector.SetPropertyValue(_job.Profile, name, value);
     }
     else
     {
         throw new COMException("Invalid property name.");
     }
 }