Beispiel #1
0
        public object GetProperty(EXilinxProjectProperties prop)
        {
            PropDesc pd = PropEnum.FindProp(prop);
            object   result;

            if (!Properties.TryGetValue(prop, out result))
            {
                result = pd.DefaultValue;
            }
            return(result);
        }
Beispiel #2
0
        public void PutProperty(EXilinxProjectProperties prop, object value)
        {
            if (value == null)
            {
                throw new ArgumentException("Value must be non-null");
            }

            PropDesc pd = PropEnum.FindProp(prop);

            if (!pd.Type.IsInstanceOfType(value))
            {
                throw new ArgumentException("Wrong argument type");
            }

            Properties[prop] = value;
        }