예제 #1
0
        }                                                      // TODO: Get rid of hiding the given object

        /// <summary>
        /// Protected constructor with parameters
        /// </summary>
        /// <param name="parameters">Property parameters</param>
        protected Property(PropertyParams parameters)
        {
            ID = parameters.ID;
            if (parameters.Data != null && parameters.Data is object[])
            {
                TEMPPropertyData = parameters.Data;
            }
        }
예제 #2
0
        /// <summary>
        /// Returns the specific creator of the property using the data contained in the passed parameters
        /// </summary>
        /// <param name="parameters">Property parameters</param>
        /// <returns>A specific instance of the property creator</returns>
        public static PropertyCreator GetPropertyCreatorByParams(PropertyParams parameters)
        {
            PropertyCreator creator = null;
            var             type    = parameters.TypeName;

            // TODO: Hide the implementation of selecting a specific creator, so that the registration of a specific type occurs somewhere in a separate place
            if (type == "PSHELL")
            {
                creator = new PSHELLCreator(parameters);
            }
            else
            {
                throw new ArgumentOutOfRangeException("Unknown type of property");
            }

            // TODO: Insert new type of properties

            return(creator);
        }
예제 #3
0
 /// <summary>
 /// Protected base constructor for implementing abstract parameter passing when creating a specific property class.
 /// </summary>
 /// <param name="parameters">Property parameters</param>
 protected PropertyCreator(PropertyParams parameters)
 {
 }