public static IEnumerable<RawDoc> GetAnimationScriptsReferenceForType(string animationTypeName, string scriptsFolder) { var doc = new Documentation(); var commentParser = new CommentParser(); var jsLines = File.ReadAllLines(Path.Combine(scriptsFolder, "AnimationScripts.js")); var typeFullName = "AjaxControlToolkit." + animationTypeName; return commentParser.ParseFile(jsLines, typeFullName); }
static void FillClientMembers(Documentation doc, string typeFullName, string scriptsFolder) { var actAssembly = typeof(ToolkitResourceManager).Assembly; var type = actAssembly.GetType(typeFullName, true); if(type.IsSubclassOf(typeof(ExtenderControlBase)) || type.IsSubclassOf(typeof(ScriptControlBase)) || type == typeof(ComboBox)) { var clientScriptName = type .GetCustomAttributesData() .First(a => a.Constructor.DeclaringType == typeof(ClientScriptResourceAttribute)) .ConstructorArguments[1] .Value; var jsFileName = clientScriptName + ".js"; var jsLines = File.ReadAllLines(Path.Combine(scriptsFolder, jsFileName)); var commentParser = new CommentParser(); var clientMembers = commentParser.ParseFile(jsLines, typeFullName); doc.Add(clientMembers, ContentType.Text); } }