@@ -10,40 +10,40 @@ namespace Ipfs.CoreApi
10
10
/// <summary>
11
11
/// Some miscellaneous methods.
12
12
/// </summary>
13
- /// <seealso href="https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md">Generic API spec</seealso>
13
+ /// <seealso href="https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md">Generic API spec</seealso>
14
14
public interface IGenericApi
15
15
{
16
- /// <summary>
17
- /// Information about an IPFS peer.
18
- /// </summary>
19
- /// <param name="peer">
20
- /// The id of the IPFS peer. If not specified (e.g. null), then the local
21
- /// peer is used.
22
- /// </param>
23
- /// <param name="cancel">
24
- /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
25
- /// </param>
26
- /// <returns>
27
- /// A task that represents the asynchronous operation. The task's value is
28
- /// the <see cref="Peer"/> information.
29
- /// </returns>
30
- Task < Peer > IdAsync ( MultiHash peer = null , CancellationToken cancel = default ( CancellationToken ) ) ;
31
-
32
- /// <summary>
33
- /// Get the version information.
34
- /// </summary>
35
- /// <returns>
36
- /// A task that represents the asynchronous operation. The task's value is
37
- /// a <see cref="Dictionary{TKey, TValue}"/> of values.
38
- /// </returns>
16
+ /// <summary>
17
+ /// Information about an IPFS peer.
18
+ /// </summary>
19
+ /// <param name="peer">
20
+ /// The id of the IPFS peer. If not specified (e.g. null), then the local
21
+ /// peer is used.
22
+ /// </param>
23
+ /// <param name="cancel">
24
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
25
+ /// </param>
26
+ /// <returns>
27
+ /// A task that represents the asynchronous operation. The task's value is
28
+ /// the <see cref="Peer"/> information.
29
+ /// </returns>
30
+ Task < Peer > IdAsync ( MultiHash peer = null , CancellationToken cancel = default ( CancellationToken ) ) ;
31
+
32
+ /// <summary>
33
+ /// Get the version information.
34
+ /// </summary>
35
+ /// <returns>
36
+ /// A task that represents the asynchronous operation. The task's value is
37
+ /// a <see cref="Dictionary{TKey, TValue}"/> of values.
38
+ /// </returns>
39
39
Task < Dictionary < string , string > > VersionAsync ( CancellationToken cancel = default ( CancellationToken ) ) ;
40
40
41
41
/// <summary>
42
42
/// Stop the IPFS peer.
43
43
/// </summary>
44
- /// <returns>
45
- /// A task that represents the asynchronous operation.
46
- /// </returns>
44
+ /// <returns>
45
+ /// A task that represents the asynchronous operation.
46
+ /// </returns>
47
47
Task ShutdownAsync ( ) ;
48
48
49
49
/// <summary>
@@ -55,17 +55,17 @@ public interface IGenericApi
55
55
/// <param name="recursive">
56
56
/// Resolve until the result is an IPFS name. Defaults to <b>true</b>.
57
57
/// </param>
58
- /// <param name="cancel">
59
- /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
60
- /// </param>
61
- /// <returns>
62
- /// A task that represents the asynchronous operation. The task's value is
63
- /// the resolved path as a <see cref="string"/>.
64
- /// </returns>
65
- /// <remarks>
66
- /// The <paramref name="name"/> can be <see cref="Cid"/> + [path], "/ipfs/..." or
67
- /// "/ipns/...".
68
- /// </remarks>
58
+ /// <param name="cancel">
59
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
60
+ /// </param>
61
+ /// <returns>
62
+ /// A task that represents the asynchronous operation. The task's value is
63
+ /// the resolved path as a <see cref="string"/>.
64
+ /// </returns>
65
+ /// <remarks>
66
+ /// The <paramref name="name"/> can be <see cref="Cid"/> + [path], "/ipfs/..." or
67
+ /// "/ipns/...".
68
+ /// </remarks>
69
69
Task < string > ResolveAsync (
70
70
string name ,
71
71
bool recursive = true ,
@@ -81,13 +81,13 @@ Task<string> ResolveAsync(
81
81
/// <param name="count">
82
82
/// The number of echo requests to send. Defaults to 10.
83
83
/// </param>
84
- /// <param name="cancel">
85
- /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
86
- /// </param>
87
- /// <returns>
88
- /// A task that represents the asynchronous operation. The task's value is
89
- /// the sequence of <see cref="PingResult"/>.
90
- /// </returns>
84
+ /// <param name="cancel">
85
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
86
+ /// </param>
87
+ /// <returns>
88
+ /// A task that represents the asynchronous operation. The task's value is
89
+ /// the sequence of <see cref="PingResult"/>.
90
+ /// </returns>
91
91
Task < IEnumerable < PingResult > > PingAsync (
92
92
MultiHash peer ,
93
93
int count = 10 ,
@@ -103,20 +103,19 @@ Task<IEnumerable<PingResult>> PingAsync(
103
103
/// <param name="count">
104
104
/// The number of echo requests to send. Defaults to 10.
105
105
/// </param>
106
- /// <param name="cancel">
107
- /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
108
- /// </param>
109
- /// <returns>
110
- /// A task that represents the asynchronous operation. The task's value is
111
- /// the sequence of <see cref="PingResult"/>.
112
- /// </returns>
106
+ /// <param name="cancel">
107
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
108
+ /// </param>
109
+ /// <returns>
110
+ /// A task that represents the asynchronous operation. The task's value is
111
+ /// the sequence of <see cref="PingResult"/>.
112
+ /// </returns>
113
113
Task < IEnumerable < PingResult > > PingAsync (
114
114
MultiAddress address ,
115
115
int count = 10 ,
116
116
CancellationToken cancel = default ( CancellationToken )
117
117
) ;
118
118
119
- #if ASYNCSTREAM
120
119
/// <summary>
121
120
/// Send echo requests to a peer.
122
121
/// </summary>
@@ -126,12 +125,12 @@ Task<IEnumerable<PingResult>> PingAsync(
126
125
/// <param name="count">
127
126
/// The number of echo requests to send. Defaults to 10.
128
127
/// </param>
129
- /// <param name="cancel">
130
- /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
131
- /// </param>
132
- /// <returns>
133
- /// An asynchronous stream of <see cref="PingResult"/>.
134
- /// </returns>
128
+ /// <param name="cancel">
129
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
130
+ /// </param>
131
+ /// <returns>
132
+ /// An asynchronous stream of <see cref="PingResult"/>.
133
+ /// </returns>
135
134
IAsyncEnumerable < PingResult > Ping (
136
135
MultiHash peer ,
137
136
int count = 10 ,
@@ -147,17 +146,16 @@ IAsyncEnumerable<PingResult> Ping(
147
146
/// <param name="count">
148
147
/// The number of echo requests to send. Defaults to 10.
149
148
/// </param>
150
- /// <param name="cancel">
151
- /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
152
- /// </param>
153
- /// <returns>
154
- /// An asynchronous stream of <see cref="PingResult"/>.
155
- /// </returns>
149
+ /// <param name="cancel">
150
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
151
+ /// </param>
152
+ /// <returns>
153
+ /// An asynchronous stream of <see cref="PingResult"/>.
154
+ /// </returns>
156
155
IAsyncEnumerable < PingResult > Ping (
157
156
MultiAddress address ,
158
157
int count = 10 ,
159
158
CancellationToken cancel = default
160
159
) ;
161
- #endif
162
160
}
163
161
}
0 commit comments