blob: 1e43b45cc68d106e34640abf42839c3051deacd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//
// mono-find-requires.cs - Prints out referenced assembles
//
// Author: Duncan Mak (duncan@ximian.com)
//
// 2004 Copyright Novell Inc.
//
using System;
using System.Reflection;
namespace Mono {
class FindRequires {
static void Main (string [] args)
{
if (args.Length == 0) {
string s = Console.ReadLine ();
while (s != null) {
PrintRequires (s);
s = Console.ReadLine ();
}
} else {
foreach (string s in args)
PrintRequires (s);
}
}
static void PrintRequires (string s)
{
try {
Assembly a = Assembly.LoadFrom (s);
foreach (AssemblyName an in a.GetReferencedAssemblies ())
Console.WriteLine ("mono({0}) >= {1}", an.Name, an.Version);
} catch {}
}
}
}
|