XML documentation for interface methods and record properties

XML documentation seems to work in most cases, but not always. I wanted to make Intellisense fully accessible for parts that are designed to interact with C #. So, here is a small (and perhaps a little far-fetched) example:

///<summary>Well, it a summary</summary>
type Summary = {
    ///<summary>Gets a short name</summary>
    Name : string;

    ///<summary>Gets whether the action was successful or not</summary>
    IsSuccessful : bool;
}

///<summary>Represents path filtering action</summary>
type IPathFilter =
    ///<summary>Runs the filtering through the list of <paramref name="paths"/></summary>
    ///<param name="paths">A sequence of paths to check</param>
    ///<returns>A sequence of <see cref="Summary"/></returns>
    abstract member Run : seq<string> -> seq<Summary>

///<summary>A default filter</summary>
type PathFilter =

    ///<summary>Runs the filtering through the list of <paramref name="paths"/></summary>
    ///<param name="paths">A sequence of paths to check</param>
    ///<returns>A sequence of <see cref="Summary"/></returns>
    member this.Run paths=
        paths |> Seq.map (fun s -> FileInfo(s)) |> Seq.map (fun f -> { Name = f.Name; IsSuccessful = f.Exists; })

    interface IPathFilter with
        ///<summary>Runs the filtering through the list of <paramref name="paths"/></summary>
        ///<param name="paths">A sequence of paths to check</param>
        ///<returns>A sequence of <see cref="Summary"/></returns>
        member this.Run paths = 
            this.Run paths

The class and interface exist only for C # interop, the facade for all the magic things that happen inside the F # library, so I don’t need to expose F # to specific C # materials. It would be nice to have complete documents on the C # side, which brings me to my two questions:

  • Is there a way for record properties to be documented and visible in Intellisense? If I hang over the type, everything works, but the properties do not seem to be picked up: Record 'class' documentationenter image description here

  • ? , F # . , , , ; :

    Interface method doc

    : Class method doc

-, , ?:)


[EDIT]

, , , F # ( VS2012 Professional):

FSharp record doc

, #:

FSharp record doc in CSharp

: (

+2
2

, summary, , params returns. :

///Well, it a summary
type Summary

:

///<summary>Well, it a summary</summary>
type Summary

1) VS2012:

enter image description here

2) , :

type IPathFilter =
    abstract member Run : paths:seq<string> -> seq<Summary>
+2

, Patryk Δ†wiek . , : F # , .

, Summary :

...
<member name="F:Test.Summary.IsSuccessful">
   <summary>Gets whether the action was successful or not</summary>
</member>
<member name="F:Test.Summary.Name">
   <summary>Gets a short name</summary>
</member>
<member name="T:Test.Summary">
   <summary>Well, it a summary</summary>
</member>
...

F: . P:, Visual Studio #. , ​​ , , , - .

, , F #: -, F # Visual Studio . F #, , .

: ​​ F # 3.1.2. . .

+1

Source: https://habr.com/ru/post/1531219/


All Articles