* HomeController.cs: Gets infos about all used assemblies
* AssemblyInfo.aspx: Makes a little clearer what's displayed in there
This commit is contained in:
parent
495f859243
commit
7558e11bd6
2 changed files with 26 additions and 3 deletions
|
|
@ -11,6 +11,10 @@ using Yavsc;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Resources;
|
using System.Resources;
|
||||||
using Yavsc.Model;
|
using Yavsc.Model;
|
||||||
|
using Npgsql.Web;
|
||||||
|
using ITContentProvider;
|
||||||
|
using WorkFlowProvider;
|
||||||
|
using Npgsql.Web.Blog;
|
||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -52,9 +56,25 @@ namespace Yavsc.Controllers
|
||||||
/// <returns>The info.</returns>
|
/// <returns>The info.</returns>
|
||||||
public ActionResult AssemblyInfo()
|
public ActionResult AssemblyInfo()
|
||||||
{
|
{
|
||||||
AssemblyName[] model = GetType ().Assembly.GetReferencedAssemblies ();
|
Assembly[] aslist = {
|
||||||
|
GetType ().Assembly,
|
||||||
|
typeof(ITCPNpgsqlProvider).Assembly,
|
||||||
|
typeof(NpgsqlMembershipProvider).Assembly,
|
||||||
|
typeof(NpgsqlContentProvider).Assembly,
|
||||||
|
typeof(NpgsqlBlogProvider).Assembly
|
||||||
|
};
|
||||||
|
|
||||||
return View (model);
|
List <AssemblyName> asnlist = new List<AssemblyName> ();
|
||||||
|
foreach (Assembly asse in aslist) {
|
||||||
|
foreach (AssemblyName an in asse.GetReferencedAssemblies ()) {
|
||||||
|
if (asnlist.All(x=> string.Compare(x.Name,an.Name)!=0))
|
||||||
|
asnlist.Add (an);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
asnlist.Sort (delegate(AssemblyName x, AssemblyName y) {
|
||||||
|
return string.Compare (x.Name, y.Name);
|
||||||
|
});
|
||||||
|
return View (asnlist.ToArray()) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string owneremail = null;
|
private static string owneremail = null;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
<%@ Page Title="Yavsc - indexe" Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<System.Reflection.AssemblyName>>" MasterPageFile="~/Models/App.master"%>
|
<%@ Page Title="Yavsc - indexe" Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<System.Reflection.AssemblyName>>" MasterPageFile="~/Models/App.master"%>
|
||||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
<p><%= GetType().Assembly.FullName %></p>
|
|
||||||
<p>
|
<p>
|
||||||
|
Running assembly :
|
||||||
|
<%= GetType().Assembly.FullName %></p>
|
||||||
|
<p>
|
||||||
|
Assemblies referenced by the controllers :
|
||||||
<ul>
|
<ul>
|
||||||
<% foreach (System.Reflection.AssemblyName item in Model) { %>
|
<% foreach (System.Reflection.AssemblyName item in Model) { %>
|
||||||
<li><%= item.FullName %></li>
|
<li><%= item.FullName %></li>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue