Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mcs/tools/mdoc/Mono.Documentation/assembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public override void Run (IEnumerable<string> args)
{
var formats = new Dictionary<string, List<string>> ();
string prefix = "tree";
string cur_format = "ecma";
var formatOptions = CreateFormatOptions (this, formats);
var options = new OptionSet () {
formatOptions [0],
Expand Down
18 changes: 12 additions & 6 deletions mcs/tools/mdoc/Mono.Documentation/monodocer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class MDocUpdater : MDocCommand
public override void Run (IEnumerable<string> args)
{
show_exceptions = DebugOutput;
string import = null;
var types = new List<string> ();
var p = new OptionSet () {
{ "delete",
Expand Down Expand Up @@ -1423,7 +1422,7 @@ IEnumerable<string> GetCustomAttributes (IList<CustomAttribute> attributes, stri
string a2 = String.Join(", ", fields.ToArray ());
if (a2 != "") a2 = "(" + a2 + ")";

string name = attribute.Constructor.DeclaringType.FullName;
string name = attribute.GetDeclaringType();
if (name.EndsWith("Attribute")) name = name.Substring(0, name.Length-"Attribute".Length);
yield return prefix + name + a2;
}
Expand Down Expand Up @@ -2259,6 +2258,11 @@ public static string GetXPathForMember (MemberReference member)
}

static class CecilExtensions {
public static string GetDeclaringType(this CustomAttribute attribute)
{
return attribute.Constructor.DeclaringType.FullName;
}

public static IEnumerable<MemberReference> GetMembers (this TypeDefinition type)
{
foreach (var c in type.Methods.Where (m => m.IsConstructor))
Expand Down Expand Up @@ -2865,7 +2869,7 @@ public override IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefin
.Concat (base.GetDocumentationTypes (assembly, forTypes, seen));
}

IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes, HashSet<string> seen)
new IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes, HashSet<string> seen)
{
int typeDepth = -1;
while (ecmadocs.Read ()) {
Expand Down Expand Up @@ -3508,6 +3512,10 @@ protected virtual string GetConstructorDeclaration (MethodDefinition constructor

protected virtual string GetMethodDeclaration (MethodDefinition method)
{
if (method.HasCustomAttributes && method.CustomAttributes.Cast<CustomAttribute>().Any(
ca => ca.GetDeclaringType() == "System.Diagnostics.Contracts.ContractInvariantMethodAttribute"))
return null;

// Special signature for destructors.
if (method.Name == "Finalize" && method.Parameters.Count == 0)
return GetFinalizerName (method);
Expand Down Expand Up @@ -3648,7 +3656,6 @@ protected override StringBuilder AppendTypeName (StringBuilder buf, string typen

protected override StringBuilder AppendTypeName (StringBuilder buf, TypeReference type)
{
var gp = type as GenericParameter;
if (type is GenericParameter)
return AppendGenericParameterConstraints (buf, (GenericParameter) type).Append (type.Name);

Expand Down Expand Up @@ -3990,7 +3997,6 @@ protected override string GetPropertyDeclaration (PropertyDefinition property)
if ((set_visible == null) && (get_visible == null))
return null;

string visibility;
StringBuilder buf = new StringBuilder ()
.Append (".property ");
if (!(gm ?? sm).IsStatic)
Expand Down Expand Up @@ -4356,7 +4362,7 @@ string GetTypeName (ICustomAttributeProvider provider, Func<TypeReference> selec
string type = GetName (selector ());
if (type == "object" && provider.HasCustomAttributes &&
provider.CustomAttributes.Cast<CustomAttribute>()
.Any (ca => ca.Constructor.DeclaringType.FullName == "System.Runtime.CompilerServices.DynamicAttribute"))
.Any (ca => ca.GetDeclaringType() == "System.Runtime.CompilerServices.DynamicAttribute"))
return "dynamic";
return type;
}
Expand Down
2 changes: 0 additions & 2 deletions mcs/tools/mdoc/Mono.Documentation/msitomsx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public MsidocToMsxdocConverter ()

public override void Run (IEnumerable<string> args)
{
string current_library = "";

var types = new List<string> ();
string outdir = null;

Expand Down
1 change: 0 additions & 1 deletion mcs/tools/mdoc/Mono.Documentation/webdoc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ void GenerateCache (Options opts, string basePath, string format, string outDir)
docRoot.AddSourceFile (source);
}
hs.RootTree = docRoot;
string helpSourceName = Path.GetFileName (basePath);
foreach (Node node in tree.TraverseDepthFirst<Node, Node> (t => t, t => t.Nodes.Cast<Node> ())) {
var url = node.URL;
Message (TraceLevel.Info, "\tProcessing URL: {0}", url);
Expand Down