예제 #1
0
        /// <summary>
        /// Loads the XML definition from fileName and sets creates the control.
        /// </summary>
        /// <param name="fileName">
        /// The filename of the XML definition file to load.
        /// </param>
        public object CreateObjectFromFileDefinition(string fileName)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(fileName);

            XmlElement el = doc.DocumentElement;

            if (doc.DocumentElement.Attributes["version"] != null)
            {
                el = (XmlElement)doc.DocumentElement.ChildNodes[0];
            }

            customizationObject = objectCreator.CreateObject(XmlConvert.DecodeName(el.Name), el);

            SetUpObject(customizationObject, el);
            return(customizationObject);
        }
예제 #2
0
 public object GetInstance(IObjectCreator objectCreator)
 {
     return(objectCreator.CreateObject(this));
 }
 public object CreateInstance(Type type)
 {
     return(_objectCreator.CreateObject(type, _container));
 }