示例#1
0
        public static XElement FindDocumentation(IDictionary <string, XElement> ndoc, ConstructorInfoWrapper info)
        {
            var type       = info.DeclaringType;
            var parameters = new StringBuilder();

            foreach (var param in info.GetParameters())
            {
                if (parameters.Length > 0)
                {
                    parameters.Append(",");
                }
                parameters.Append(param.ParameterType.FullName);
            }

            var formattedParmaters = parameters.Length > 0
                ? string.Format("({0})", parameters)
                : parameters.ToString();

            var signature = string.Format("M:{0}.#ctor{1}", type.FullName, formattedParmaters);

            XElement element;

            if (!ndoc.TryGetValue(signature, out element))
            {
                return(null);
            }

            return(element);
        }
        public static XElement FindDocumentation(IDictionary<string, XElement> ndoc, ConstructorInfoWrapper info)
        {
            var type = info.DeclaringType;
            var parameters = new StringBuilder();
            foreach (var param in info.GetParameters())
            {
                if (parameters.Length > 0)
                    parameters.Append(",");
                parameters.Append(param.ParameterType.FullName);
            }

            var formattedParmaters = parameters.Length > 0 
                ? string.Format("({0})", parameters) 
                : parameters.ToString();

            var signature = string.Format("M:{0}.#ctor{1}", type.FullName, formattedParmaters);

            XElement element;
            if (!ndoc.TryGetValue(signature, out element))
                return null;

            return element;
        }
示例#3
0
 public static string GenerateFilename(ConstructorInfoWrapper info)
 {
     return(Fixup(string.Format("M_{0}_{1}_{2}", info.DeclaringType.Name, info.Name, GenerateParametersTail(info.GetParameters())), info.DeclaringType) + ".html");
 }
 public static string GenerateFilename(ConstructorInfoWrapper info)
 {
     return Fixup(string.Format("M_{0}_{1}_{2}_{3}", info.DeclaringType.Namespace, info.DeclaringType.Name, info.Name, GenerateParametersTail(info.GetParameters()))) + ".html";
 }