コード例 #1
0
        public string GetProfileSetting(string name)
        {
            var valueReflector = new ValueReflector();

            if (HasAccess(name) && valueReflector.HasProperty(Job.Profile, name))
            {
                return(valueReflector.GetPropertyValue(Job.Profile, name));
            }

            throw new COMException($"The property '{name}' does not exist!");
        }
コード例 #2
0
        public void SetProfileSetting(string name, string value)
        {
            var valueReflector = new ValueReflector();

            if (HasAccess(name) && valueReflector.HasProperty(Job.Profile, name))
            {
                valueReflector.SetPropertyValue(Job.Profile, name, value);
            }
            else
            {
                throw new COMException($"The property '{name}' does not exist!");
            }
        }