Revisited - VB.NET Build Comment Web Pages 
Author Message
 Revisited - VB.NET Build Comment Web Pages

I guess I did not explain this very well.  Here is an
example of what I mean.  I write the following Function in
VB.NET:

Public Sub MyFunction(strMyString as String) as Boolean

     If Len(Trim(strMyString)) = 0 then
         return True
     End If

End Function

Now, if I add the following comments to this function:

' <summary> This function checks the incoming string to
' see if it contains any characters </summary>
'
' <param name="strMyString">Incoming string to check for
' characters</param>
' <return>When True, indicates the incomine string
' is empty</return>
' <remarks>This is an example of using XML code commenting
' to be recognized by the Code Comment Web Reporter
' </remarks>
Public Sub MyFunction(strMyString as String) as Boolean

     If Len(Trim(strMyString)) = 0 then
         return True
     End If

End Function

Then I select Tools - Build Comment Web Pages in Visual
Studio .NET.  I hoped that an HTML report would be
generated from the comments inserted in my code, in order
to generate documentation for my function for other
programmers to use who might maintain or use this
function.  It looks like you can do this in C#, but not
VB.NET .... Is that true?  Is there an Add In specifically
for VB.NET to gain this functionality?  

Quote:
>-----Original Message-----
>You mean something like this?

>        'this is entirely new syntax for wmi
>        'instead of having to dim a locator and services
object, we call the
>managementobjectsearcher
>        'totally cool

>        Dim mos As

System.Management.ManagementObjectSearcher
Quote:
>        Dim moc As

System.Management.ManagementObjectCollection
Quote:
>        Dim mo As System.Management.ManagementObject
>        Dim prop As System.Management.PropertyData

>        Dim FSO As Object
>        Dim txtstream As Object
>        Dim MyString As String

>        mos = New

System.Management.ManagementObjectSearcher("SELECT * FROM
Quote:
>Win32_BIOS")
>        moc = mos.Get()
>        For Each mo In moc
>            FSO = CreateObject

("Scripting.filesystemobject")
Quote:
>            txtstream = FSO.OpenTextFile

("Win32_BIOS.htm", 2, True, -2)
Quote:
>            txtstream.writeline("<HTML>")
>            txtstream.writeline("<HEAD>")
>            txtstream.writeline

("<TITLE>Win32_BIOS</TITLE>")
Quote:
>            txtstream.writeline("</HEAD>")
>            txtstream.writeline("<XML ID=""RS"">")
>            txtstream.writeline("<?xml version=""1.0""
>encoding=""iso-8859-1""?>")
>            txtstream.writeline("<Data>")
>            txtstream.writeline("<Win32_BIOS>")
>            For Each prop In mo.Properties
>                On Error Resume Next
>                If IsNothing(prop.Value) = True Then
>                    txtstream.writeline("<" + prop.Name
+ "></" + prop.Name
>+ ">")
>                Else
>                    txtstream.writeline("<" + prop.Name
+ ">" +
>Trim(prop.Value) + "</" + prop.Name + ">")
>                    Err.Clear()
>                End If
>            Next
>            txtstream.writeline("</Win32_BIOS>")
>            txtstream.writeline("</Data>")
>            txtstream.writeline("</XML>")
>            txtstream.writeline("<BODY

BGCOLOR=""Darkblue""
Quote:
>Text=""White"">")
>            txtstream.writeline("<Table Border=""1""

colspacing=""10"">")
Quote:
>            For Each prop In mo.Properties
>                txtstream.writeline("<TR>")
>                txtstream.writeline("<TH Align=Center
Nowrap=True
>STYLE=""Border:None;Background-color:Silver;Font-

Family:Tahoma;Font-Size:14;
Quote:
>Font-

Weight:bold;Color:Yellow;filter:ProgID:DXImageTransform.Mic
rosoft.Gradi
Quote:
>ent(gradientType=0, StartColorStr='Silver',

endColorstr='Black')"">" +
Quote:
>prop.Name + "</TH>")
>                txtstream.writeline("<TD Align=Center
Nowrap=True
>STYLE=""Border:none;Color:white;Font-Family:Tahoma;Font-

Size:12;Font-weight:

- Show quoted text -

Quote:
>Bold;width:100%;filter:ProgID:DXImageTransform.Microsoft.G
radient(gradientTy
>pe=0, StartColorStr='Red', endColorstr='Black')""><SPAN
datasrc=#RS
>datafld=" + Chr(34) + prop.Name + Chr(34)
+ "></SPAN></TD>")
>                txtstream.write("</TR>")
>            Next
>            txtstream.write("</TABLE>")
>            txtstream.write("</BODY>")
>            txtstream.write("</HTML>")
>            txtstream.close()
>            Exit For
>        Next
>        txtstream = Nothing
>        FSO = Nothing

>    End Sub


message

>> I've been trying to figure out how to comment my VB .NET
>> in such a way as to allow me to use the VS .NET feture
>> under the Tools - Build Comment Web Pages.  From all the
>> MSDN library help I've read, it looks like the only
>> laguages that support this is C#.  J# looks like it has
>> its own documentation generator that work with the
javadoc
>> stadards of documenting code.  Does VB .NET have this
>> capablility?  Will it in the future?  We have used a
tool
>> called VBDox to generate Web based documentation from
our
>> code documentation for VB 6.0 programs.  This is an
>> important feature that I wish VB .NET had

>.

.


Wed, 27 Apr 2005 00:49:59 GMT  
 Revisited - VB.NET Build Comment Web Pages
Hi Dave!

You are right, Visual Basic .NET doesn't support XML Comments in the IDE
currently, but we will in the future.  There is an add-in that you can use
today, check it out at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs...
ml/vbcs_XMLComments.asp

I hope this helps,
Chris
Microsoft VB Team

--
This posting is provided "AS IS" with no warranties, and confers no rights.

___

Quote:
> I guess I did not explain this very well.  Here is an
> example of what I mean.  I write the following Function in
> VB.NET:

> Public Sub MyFunction(strMyString as String) as Boolean

>      If Len(Trim(strMyString)) = 0 then
>          return True
>      End If

> End Function

> Now, if I add the following comments to this function:

> ' <summary> This function checks the incoming string to
> ' see if it contains any characters </summary>
> '
> ' <param name="strMyString">Incoming string to check for
> ' characters</param>
> ' <return>When True, indicates the incomine string
> ' is empty</return>
> ' <remarks>This is an example of using XML code commenting
> ' to be recognized by the Code Comment Web Reporter
> ' </remarks>
> Public Sub MyFunction(strMyString as String) as Boolean

>      If Len(Trim(strMyString)) = 0 then
>          return True
>      End If

> End Function

> Then I select Tools - Build Comment Web Pages in Visual
> Studio .NET.  I hoped that an HTML report would be
> generated from the comments inserted in my code, in order
> to generate documentation for my function for other
> programmers to use who might maintain or use this
> function.  It looks like you can do this in C#, but not
> VB.NET .... Is that true?  Is there an Add In specifically
> for VB.NET to gain this functionality?

> >-----Original Message-----
> >You mean something like this?

> >        'this is entirely new syntax for wmi
> >        'instead of having to dim a locator and services
> object, we call the
> >managementobjectsearcher
> >        'totally cool

> >        Dim mos As
> System.Management.ManagementObjectSearcher
> >        Dim moc As
> System.Management.ManagementObjectCollection
> >        Dim mo As System.Management.ManagementObject
> >        Dim prop As System.Management.PropertyData

> >        Dim FSO As Object
> >        Dim txtstream As Object
> >        Dim MyString As String

> >        mos = New
> System.Management.ManagementObjectSearcher("SELECT * FROM
> >Win32_BIOS")
> >        moc = mos.Get()
> >        For Each mo In moc
> >            FSO = CreateObject
> ("Scripting.filesystemobject")
> >            txtstream = FSO.OpenTextFile
> ("Win32_BIOS.htm", 2, True, -2)
> >            txtstream.writeline("<HTML>")
> >            txtstream.writeline("<HEAD>")
> >            txtstream.writeline
> ("<TITLE>Win32_BIOS</TITLE>")
> >            txtstream.writeline("</HEAD>")
> >            txtstream.writeline("<XML ID=""RS"">")
> >            txtstream.writeline("<?xml version=""1.0""
> >encoding=""iso-8859-1""?>")
> >            txtstream.writeline("<Data>")
> >            txtstream.writeline("<Win32_BIOS>")
> >            For Each prop In mo.Properties
> >                On Error Resume Next
> >                If IsNothing(prop.Value) = True Then
> >                    txtstream.writeline("<" + prop.Name
> + "></" + prop.Name
> >+ ">")
> >                Else
> >                    txtstream.writeline("<" + prop.Name
> + ">" +
> >Trim(prop.Value) + "</" + prop.Name + ">")
> >                    Err.Clear()
> >                End If
> >            Next
> >            txtstream.writeline("</Win32_BIOS>")
> >            txtstream.writeline("</Data>")
> >            txtstream.writeline("</XML>")
> >            txtstream.writeline("<BODY
> BGCOLOR=""Darkblue""
> >Text=""White"">")
> >            txtstream.writeline("<Table Border=""1""
> colspacing=""10"">")
> >            For Each prop In mo.Properties
> >                txtstream.writeline("<TR>")
> >                txtstream.writeline("<TH Align=Center
> Nowrap=True
> >STYLE=""Border:None;Background-color:Silver;Font-
> Family:Tahoma;Font-Size:14;
> >Font-
> Weight:bold;Color:Yellow;filter:ProgID:DXImageTransform.Mic
> rosoft.Gradi
> >ent(gradientType=0, StartColorStr='Silver',
> endColorstr='Black')"">" +
> >prop.Name + "</TH>")
> >                txtstream.writeline("<TD Align=Center
> Nowrap=True
> >STYLE=""Border:none;Color:white;Font-Family:Tahoma;Font-
> Size:12;Font-weight:
> >Bold;width:100%;filter:ProgID:DXImageTransform.Microsoft.G
> radient(gradientTy
> >pe=0, StartColorStr='Red', endColorstr='Black')""><SPAN
> datasrc=#RS
> >datafld=" + Chr(34) + prop.Name + Chr(34)
> + "></SPAN></TD>")
> >                txtstream.write("</TR>")
> >            Next
> >            txtstream.write("</TABLE>")
> >            txtstream.write("</BODY>")
> >            txtstream.write("</HTML>")
> >            txtstream.close()
> >            Exit For
> >        Next
> >        txtstream = Nothing
> >        FSO = Nothing

> >    End Sub


> message

> >> I've been trying to figure out how to comment my VB .NET
> >> in such a way as to allow me to use the VS .NET feture
> >> under the Tools - Build Comment Web Pages.  From all the
> >> MSDN library help I've read, it looks like the only
> >> laguages that support this is C#.  J# looks like it has
> >> its own documentation generator that work with the
> javadoc
> >> stadards of documenting code.  Does VB .NET have this
> >> capablility?  Will it in the future?  We have used a
> tool
> >> called VBDox to generate Web based documentation from
> our
> >> code documentation for VB 6.0 programs.  This is an
> >> important feature that I wish VB .NET had

> >.

> .



Wed, 27 Apr 2005 05:02:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can VB.NET Build Comment Web Pages

2. Build comment Web Pages ... in VB.NET

3. Build Comment Web Pages Feature under VB.NET

4. create a VB.NET Comment Web Page

5. Build Comment Web Pages

6. Build Web Page in Vb.net Application

7. Building WSH-usable .NET components from the redistributables, revisited

8. Web Pages Revisited

9. how i fill the description Field in the Web Comment Page

10. Parsing a web page with VB.net

11. Vb.net web page sql server access question

12. Client Side VB.Net Control for Web Page

 

 
Powered by phpBB® Forum Software