Beispiel #1
0
 public override void                SetAttributeValues(ModelItemAttribute attr)
 {
     base.SetAttributeValues(attr);
     if (attr is ModelAttribute)
     {
         ModelAttribute mattr = attr as ModelAttribute;
         _maxinstances = mattr.MaxInstances;
         _inherit      = mattr.Inherit;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Virtual method to set the item state depending on the custom attribute definition.
 /// </summary>
 public virtual void                 SetAttributeValues(ModelItemAttribute attr)
 {
     if (attr != null)
     {
         _weight      = attr.Weight;
         _flags       = attr.Flags;
         _exception   = attr.Exception;
         _exceptionid = attr.ExceptionId;
         _name        = attr.Name;
         _category    = attr.Category;
         _labels      = attr.Labels;
     }
 }
Beispiel #3
0
        string _exceptionid = null;                             //Invalid Value - throws exception <id>

        /// <summary>
        /// Constructor to create an item.
        /// </summary>
        /// <param name="attr">Custom attribute specified on the item.</param>
        public ModelItem(Model model, ModelItemAttribute attr)
        {
            _model = model;
            this.SetAttributeValues(attr);
        }
Beispiel #4
0
		/// <summary>
		/// Virtual method to set the item state depending on the custom attribute definition.
		/// </summary>
		public virtual void		    SetAttributeValues(ModelItemAttribute attr)
		{
			if(attr != null)			
			{	
				_weight		= attr.Weight;
				_flags		= attr.Flags;
				_exception	= attr.Exception;
				_exceptionid= attr.ExceptionId;
				_name		= attr.Name;
				_category	= attr.Category;
				_labels		= attr.Labels;
			}
		}
Beispiel #5
0
		string			_exceptionid	= null;	//Invalid Value - throws exception <id>

		/// <summary>
		/// Constructor to create an item.
		/// </summary>
		/// <param name="attr">Custom attribute specified on the item.</param>
		public ModelItem(Model model, ModelItemAttribute attr)
		{
			_model = model;
			this.SetAttributeValues(attr);
		}