|
|
@ -41,6 +41,15 @@ namespace VBNetBinding |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static VBNetAmbience instance; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static VBNetAmbience Instance { |
|
|
|
|
|
|
|
get { |
|
|
|
|
|
|
|
if (instance == null) instance = new VBNetAmbience(); |
|
|
|
|
|
|
|
return instance; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
string GetModifier(IDecoration decoration) |
|
|
|
string GetModifier(IDecoration decoration) |
|
|
|
{ |
|
|
|
{ |
|
|
|
StringBuilder builder = new StringBuilder(); |
|
|
|
StringBuilder builder = new StringBuilder(); |
|
|
@ -117,37 +126,39 @@ namespace VBNetBinding |
|
|
|
builder.Append("</i>"); |
|
|
|
builder.Append("</i>"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (c.ClassType) { |
|
|
|
if (ShowModifiers) { |
|
|
|
case ClassType.Delegate: |
|
|
|
switch (c.ClassType) { |
|
|
|
builder.Append("Delegate "); |
|
|
|
case ClassType.Delegate: |
|
|
|
if (ShowReturnType) { |
|
|
|
builder.Append("Delegate "); |
|
|
|
foreach (IMethod m in c.Methods) { |
|
|
|
if (ShowReturnType) { |
|
|
|
if (m.Name != "Invoke") { |
|
|
|
foreach (IMethod m in c.Methods) { |
|
|
|
continue; |
|
|
|
if (m.Name != "Invoke") { |
|
|
|
} |
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
if (m.ReturnType == null || m.ReturnType.FullyQualifiedName == "System.Void") { |
|
|
|
|
|
|
|
builder.Append("Sub"); |
|
|
|
if (m.ReturnType == null || m.ReturnType.FullyQualifiedName == "System.Void") { |
|
|
|
} else { |
|
|
|
builder.Append("Sub"); |
|
|
|
builder.Append("Function"); |
|
|
|
} else { |
|
|
|
|
|
|
|
builder.Append("Function"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ClassType.Class: |
|
|
|
case ClassType.Class: |
|
|
|
builder.Append("Class"); |
|
|
|
builder.Append("Class"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ClassType.Struct: |
|
|
|
case ClassType.Struct: |
|
|
|
builder.Append("Structure"); |
|
|
|
builder.Append("Structure"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ClassType.Interface: |
|
|
|
case ClassType.Interface: |
|
|
|
builder.Append("Interface"); |
|
|
|
builder.Append("Interface"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ClassType.Enum: |
|
|
|
case ClassType.Enum: |
|
|
|
builder.Append("Enum"); |
|
|
|
builder.Append("Enum"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
builder.Append(' '); |
|
|
|
} |
|
|
|
} |
|
|
|
builder.Append(' '); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (IncludeHTMLMarkup) { |
|
|
|
if (IncludeHTMLMarkup) { |
|
|
|
builder.Append("<b>"); |
|
|
|
builder.Append("<b>"); |
|
|
@ -481,31 +492,35 @@ namespace VBNetBinding |
|
|
|
} |
|
|
|
} |
|
|
|
StringBuilder builder = new StringBuilder(); |
|
|
|
StringBuilder builder = new StringBuilder(); |
|
|
|
|
|
|
|
|
|
|
|
bool linkSet = false; |
|
|
|
string fullName = returnType.FullyQualifiedName; |
|
|
|
// TODO: #Assembly dependance:
|
|
|
|
if (fullName != null && typeConversionTable[fullName] != null) { |
|
|
|
|
|
|
|
builder.Append(typeConversionTable[fullName].ToString()); |
|
|
|
// if (UseLinkArrayList) {
|
|
|
|
|
|
|
|
// SharpAssemblyReturnType ret = returnType as SharpAssemblyReturnType;
|
|
|
|
|
|
|
|
// if (ret != null) {
|
|
|
|
|
|
|
|
// if (ret.UnderlyingClass != null) {
|
|
|
|
|
|
|
|
// builder.Append("<a href='as://" + linkArrayList.Add(ret.UnderlyingClass) + "'>");
|
|
|
|
|
|
|
|
// linkSet = true;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (returnType.FullyQualifiedName != null && typeConversionTable[returnType.FullyQualifiedName] != null) { |
|
|
|
|
|
|
|
builder.Append(typeConversionTable[returnType.FullyQualifiedName].ToString()); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
builder.Append(UseFullyQualifiedNames ? returnType.FullyQualifiedName : returnType.Name); |
|
|
|
if (UseFullyQualifiedNames) { |
|
|
|
|
|
|
|
builder.Append(fullName); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
builder.Append(returnType.Name); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (linkSet) { |
|
|
|
UnpackNestedType(builder, returnType); |
|
|
|
builder.Append("</a>"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (returnType is SpecificReturnType) { |
|
|
|
return builder.ToString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UnpackNestedType(StringBuilder builder, IReturnType returnType) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ArrayReturnType art = returnType as ArrayReturnType; |
|
|
|
|
|
|
|
if (art != null) { |
|
|
|
|
|
|
|
builder.Append('('); |
|
|
|
|
|
|
|
for (int i = 1; i < art.ArrayDimensions; ++i) { |
|
|
|
|
|
|
|
builder.Append(','); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
builder.Append(')'); |
|
|
|
|
|
|
|
UnpackNestedType(builder, art.ElementType); |
|
|
|
|
|
|
|
} else if (returnType is SpecificReturnType) { |
|
|
|
SpecificReturnType rt = (SpecificReturnType)returnType; |
|
|
|
SpecificReturnType rt = (SpecificReturnType)returnType; |
|
|
|
|
|
|
|
UnpackNestedType(builder, rt.BaseType); |
|
|
|
builder.Append("(Of"); |
|
|
|
builder.Append("(Of"); |
|
|
|
for (int i = 0; i < rt.TypeParameters.Count; ++i) { |
|
|
|
for (int i = 0; i < rt.TypeParameters.Count; ++i) { |
|
|
|
if (i > 0) builder.Append(", "); |
|
|
|
if (i > 0) builder.Append(", "); |
|
|
@ -513,8 +528,6 @@ namespace VBNetBinding |
|
|
|
} |
|
|
|
} |
|
|
|
builder.Append(')'); |
|
|
|
builder.Append(')'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return builder.ToString(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override string Convert(IParameter param) |
|
|
|
public override string Convert(IParameter param) |
|
|
|