Beispiel #1
0
        /// <summary>
        /// Load the given parameter
        /// </summary>
        private void LoadParameter(DocMethod method, XElement param, string @namespace)
        {
            var name = param.GetElementValue("declname");
            var type = LoadType(param.Element("type"), @namespace);

            var p = new DocParameter(name)
            {
                ParameterType = type
            };

            method.Parameters.Add(p);
        }
Beispiel #2
0
        /// <summary>
        /// Load the given method
        /// </summary>
        private void LoadMethod(DocClass @class, XElement memberdef)
        {
            var name = memberdef.GetElementValue("name");

            var xmlMethod = new DocMethod(name)
            {
                Description = GetDescription(memberdef)
            };

            @class.Methods.Add(xmlMethod);

            // Load parameter
            var ns = @class.Namespace;

            foreach (var p in memberdef.Elements("param"))
            {
                LoadParameter(xmlMethod, p, ns);
            }
        }