~ubuntu-branches/ubuntu/lucid/mono/lucid

« back to all changes in this revision

Viewing changes to mcs/tools/mdoc/Mono.Documentation/monodocer.cs

  • Committer: Bazaar Package Importer
  • Author(s): Mirco Bauer
  • Date: 2009-07-30 19:35:10 UTC
  • mto: (5.2.2 squeeze)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090730193510-cdttfvqokq2kmdvh
Tags: upstream-2.4.2.3+dfsg
ImportĀ upstreamĀ versionĀ 2.4.2.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        
48
48
        static string srcPath;
49
49
        static List<AssemblyDefinition> assemblies;
 
50
        static DefaultAssemblyResolver assemblyResolver = new DefaultAssemblyResolver();
50
51
        
51
52
        static bool nooverrides = true, delete = false, ignoremembers = false;
52
53
        static bool pretty = false;
109
110
                        { "i|import=", 
110
111
                                "Import documentation from {FILE}.",
111
112
                                v => opts.import = v },
 
113
                        { "L|lib=",
 
114
                                "Check for assembly references in {DIRECTORY}.",
 
115
                                v => assemblyResolver.AddSearchDirectory (v) },
112
116
                        { "o|out=",
113
117
                                "Root {DIRECTORY} to generate/update documentation.",
114
118
                                v => opts.path = v },
 
119
                        { "r=",
 
120
                                "Search for dependent assemblies in the directory containing {ASSEMBLY}.\n" +
 
121
                                "(Equivalent to '-L `dirname ASSEMBLY`'.)",
 
122
                                v => assemblyResolver.AddSearchDirectory (Path.GetDirectoryName (v)) },
115
123
                        { "since=",
116
124
                                "Manually specify the assembly {VERSION} that new members were added in.",
117
125
                                v => opts.since = v },
127
135
                if (opts.assembly.Count == 0)
128
136
                        base.Error ("No assemblies specified.");
129
137
 
 
138
                foreach (var dir in opts.assembly
 
139
                                .Where (a => a.Contains (Path.DirectorySeparatorChar))
 
140
                                .Select (a => Path.GetDirectoryName (a)))
 
141
                        assemblyResolver.AddSearchDirectory (dir);
 
142
 
130
143
                Run (opts);
131
144
                opts.name = ""; // remove warning about unused member
132
145
        }
231
244
                if (assembly == null)
232
245
                        throw new InvalidOperationException("Assembly " + name + " not found.");
233
246
 
234
 
                var r = assembly.Resolver as BaseAssemblyResolver;
235
 
                if (r != null && name.Contains (Path.DirectorySeparatorChar)) {
236
 
                        r.AddSearchDirectory (Path.GetDirectoryName (name));
237
 
                }
 
247
                assembly.Resolver = assemblyResolver;
238
248
                return assembly;
239
249
        }
240
250