@enjoys/context-engine 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/commands/adb.json +322 -0
- package/data/commands/alembic.json +301 -0
- package/data/commands/artisan.json +277 -0
- package/data/commands/atlas.json +426 -0
- package/data/commands/auth0.json +648 -0
- package/data/commands/bat.json +84 -0
- package/data/commands/btop.json +59 -0
- package/data/commands/bundle.json +321 -0
- package/data/commands/composer.json +507 -0
- package/data/commands/dart.json +216 -0
- package/data/commands/dbmate.json +257 -0
- package/data/commands/docker-compose.json +384 -0
- package/data/commands/drizzle-kit.json +217 -0
- package/data/commands/expo.json +65 -0
- package/data/commands/fastlane.json +243 -0
- package/data/commands/fd.json +86 -0
- package/data/commands/flutter.json +298 -0
- package/data/commands/flyway.json +261 -0
- package/data/commands/fzf.json +103 -0
- package/data/commands/gem.json +267 -0
- package/data/commands/htop.json +56 -0
- package/data/commands/jq.json +100 -0
- package/data/commands/k9s.json +62 -0
- package/data/commands/linux.json +3007 -0
- package/data/commands/liquibase.json +399 -0
- package/data/commands/manifest.json +619 -0
- package/data/commands/minikube.json +60 -0
- package/data/commands/ng.json +64 -0
- package/data/commands/nuxt.json +60 -0
- package/data/commands/nvim.json +91 -0
- package/data/commands/php.json +157 -0
- package/data/commands/pm2.json +259 -0
- package/data/commands/pod.json +175 -0
- package/data/commands/prisma.json +257 -0
- package/data/commands/rails.json +372 -0
- package/data/commands/rake.json +360 -0
- package/data/commands/react-native.json +57 -0
- package/data/commands/rg.json +103 -0
- package/data/commands/rspec.json +257 -0
- package/data/commands/ruby.json +108 -0
- package/data/commands/screen.json +101 -0
- package/data/commands/sequelize.json +342 -0
- package/data/commands/snyk.json +442 -0
- package/data/commands/sonar-scanner.json +219 -0
- package/data/commands/stripe.json +314 -0
- package/data/commands/symfony.json +449 -0
- package/data/commands/tmux.json +197 -0
- package/data/commands/top.json +61 -0
- package/data/commands/trivy.json +367 -0
- package/data/commands/twilio.json +382 -0
- package/data/commands/typeorm.json +262 -0
- package/data/commands/vim.json +85 -0
- package/data/commands/vue.json +60 -0
- package/data/commands/wp.json +857 -0
- package/data/commands/xcodebuild.json +141 -0
- package/data/commands/yq.json +57 -0
- package/data/completion/bash.json +1184 -0
- package/data/completion/c.json +1067 -0
- package/data/completion/cpp.json +824 -0
- package/data/completion/csharp.json +860 -0
- package/data/completion/dockerfile.json +536 -0
- package/data/completion/go.json +1346 -0
- package/data/completion/html.json +806 -0
- package/data/completion/java.json +1112 -0
- package/data/completion/javascript.json +914 -0
- package/data/completion/lua.json +968 -0
- package/data/completion/php.json +1535 -0
- package/data/completion/python.json +1427 -0
- package/data/completion/ruby.json +1531 -0
- package/data/completion/rust.json +698 -0
- package/data/completion/sql.json +887 -0
- package/data/completion/toml.json +428 -0
- package/data/completion/typescript.json +338 -0
- package/data/completion/yaml.json +563 -0
- package/data/defination/bash.json +565 -0
- package/data/defination/c.json +865 -0
- package/data/defination/cpp.json +348 -0
- package/data/defination/csharp.json +144 -0
- package/data/defination/dockerfile.json +113 -0
- package/data/defination/go.json +561 -0
- package/data/defination/html.json +559 -0
- package/data/defination/java.json +184 -0
- package/data/defination/javascript.json +265 -0
- package/data/defination/lua.json +181 -0
- package/data/defination/php.json +726 -0
- package/data/defination/python.json +717 -0
- package/data/defination/ruby.json +670 -0
- package/data/defination/rust.json +207 -0
- package/data/defination/sql.json +473 -0
- package/data/defination/toml.json +251 -0
- package/data/defination/typescript.json +29 -0
- package/data/defination/yaml.json +197 -0
- package/data/hover/bash.json +245 -0
- package/data/hover/c.json +265 -0
- package/data/hover/cpp.json +210 -0
- package/data/hover/csharp.json +290 -0
- package/data/hover/dockerfile.json +145 -0
- package/data/hover/go.json +580 -0
- package/data/hover/html.json +250 -0
- package/data/hover/java.json +395 -0
- package/data/hover/javascript.json +330 -0
- package/data/hover/lua.json +265 -0
- package/data/hover/php.json +300 -0
- package/data/hover/python.json +380 -0
- package/data/hover/ruby.json +265 -0
- package/data/hover/rust.json +275 -0
- package/data/hover/sql.json +230 -0
- package/data/hover/toml.json +145 -0
- package/data/hover/typescript.json +120 -0
- package/data/hover/yaml.json +165 -0
- package/data/manifest.json +242 -0
- package/package.json +1 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "cpp",
|
|
3
|
+
"hovers": {
|
|
4
|
+
"std::vector": {
|
|
5
|
+
"contents": [
|
|
6
|
+
{ "value": "```cpp\ntemplate<class T, class Allocator = std::allocator<T>>\nclass vector;\n```\nDynamic contiguous array. Automatic memory management with amortized O(1) `push_back`. O(1) random access. Most commonly used container in C++.\n\n**Header:** `<vector>`" }
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"std::map": {
|
|
10
|
+
"contents": [
|
|
11
|
+
{ "value": "```cpp\ntemplate<class Key, class T, class Compare = std::less<Key>,\n class Allocator = std::allocator<std::pair<const Key, T>>>\nclass map;\n```\nSorted associative container storing unique key-value pairs using a red-black tree. O(log n) lookup, insertion, and removal. Keys are ordered by `Compare`.\n\n**Header:** `<map>`" }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"std::unordered_map": {
|
|
15
|
+
"contents": [
|
|
16
|
+
{ "value": "```cpp\ntemplate<class Key, class T, class Hash = std::hash<Key>,\n class KeyEqual = std::equal_to<Key>,\n class Allocator = std::allocator<std::pair<const Key, T>>>\nclass unordered_map;\n```\nHash-based associative container with unique keys. Average O(1) lookup, insertion, and removal. Unordered iteration.\n\n**Header:** `<unordered_map>`" }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"std::set": {
|
|
20
|
+
"contents": [
|
|
21
|
+
{ "value": "```cpp\ntemplate<class Key, class Compare = std::less<Key>,\n class Allocator = std::allocator<Key>>\nclass set;\n```\nSorted container of unique elements using a red-black tree. O(log n) insertion, removal, and lookup.\n\n**Header:** `<set>`" }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"std::unordered_set": {
|
|
25
|
+
"contents": [
|
|
26
|
+
{ "value": "```cpp\ntemplate<class Key, class Hash = std::hash<Key>,\n class KeyEqual = std::equal_to<Key>,\n class Allocator = std::allocator<Key>>\nclass unordered_set;\n```\nHash-based container of unique elements. Average O(1) insertion, removal, and lookup.\n\n**Header:** `<unordered_set>`" }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"std::string": {
|
|
30
|
+
"contents": [
|
|
31
|
+
{ "value": "```cpp\nusing string = std::basic_string<char>;\n```\nDynamic character string with automatic memory management. Supports concatenation, comparison, searching, and SSO (Small String Optimization).\n\n**Header:** `<string>`" }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"std::string_view": {
|
|
35
|
+
"contents": [
|
|
36
|
+
{ "value": "```cpp\nusing string_view = std::basic_string_view<char>;\n```\nLightweight non-owning read-only reference to a character sequence. Zero-copy. Use instead of `const std::string&` for function parameters. **(C++17)**\n\n**Header:** `<string_view>`" }
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"std::array": {
|
|
40
|
+
"contents": [
|
|
41
|
+
{ "value": "```cpp\ntemplate<class T, std::size_t N>\nstruct array;\n```\nFixed-size aggregate array with STL interface. Stack-allocated with zero overhead over C-style arrays. Supports `at()` for bounds checking.\n\n**Header:** `<array>`" }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"std::deque": {
|
|
45
|
+
"contents": [
|
|
46
|
+
{ "value": "```cpp\ntemplate<class T, class Allocator = std::allocator<T>>\nclass deque;\n```\nDouble-ended queue with O(1) insertion and removal at both front and back. Does not guarantee contiguous storage.\n\n**Header:** `<deque>`" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"std::list": {
|
|
50
|
+
"contents": [
|
|
51
|
+
{ "value": "```cpp\ntemplate<class T, class Allocator = std::allocator<T>>\nclass list;\n```\nDoubly-linked list with O(1) insertion and removal at any position (given an iterator). No random access.\n\n**Header:** `<list>`" }
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"std::stack": {
|
|
55
|
+
"contents": [
|
|
56
|
+
{ "value": "```cpp\ntemplate<class T, class Container = std::deque<T>>\nclass stack;\n```\nContainer adapter providing LIFO (last-in, first-out) stack operations: `push`, `pop`, `top`.\n\n**Header:** `<stack>`" }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"std::queue": {
|
|
60
|
+
"contents": [
|
|
61
|
+
{ "value": "```cpp\ntemplate<class T, class Container = std::deque<T>>\nclass queue;\n```\nContainer adapter providing FIFO (first-in, first-out) queue operations: `push`, `pop`, `front`, `back`.\n\n**Header:** `<queue>`" }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"std::priority_queue": {
|
|
65
|
+
"contents": [
|
|
66
|
+
{ "value": "```cpp\ntemplate<class T, class Container = std::vector<T>,\n class Compare = std::less<typename Container::value_type>>\nclass priority_queue;\n```\nContainer adapter providing constant-time access to the largest (by default) element. Implemented as a max-heap.\n\n**Header:** `<queue>`" }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"std::pair": {
|
|
70
|
+
"contents": [
|
|
71
|
+
{ "value": "```cpp\ntemplate<class T1, class T2>\nstruct pair;\n```\nHolds two heterogeneous objects. Access via `.first` and `.second` or structured bindings `auto [a, b] = p;`.\n\n**Header:** `<utility>`" }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"std::tuple": {
|
|
75
|
+
"contents": [
|
|
76
|
+
{ "value": "```cpp\ntemplate<class... Types>\nclass tuple;\n```\nFixed-size heterogeneous collection. Access via `std::get<N>(t)` or structured bindings. Generalizes `std::pair`.\n\n**Header:** `<tuple>`" }
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"std::optional": {
|
|
80
|
+
"contents": [
|
|
81
|
+
{ "value": "```cpp\ntemplate<class T>\nclass optional;\n```\nManages an optional contained value — may or may not hold a value. Use `.value()`, `.value_or(default)`, or `*opt` to access. **(C++17)**\n\n**Header:** `<optional>`" }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"std::variant": {
|
|
85
|
+
"contents": [
|
|
86
|
+
{ "value": "```cpp\ntemplate<class... Types>\nclass variant;\n```\nType-safe discriminated union. Holds exactly one of the alternative types at any time. Access via `std::get<T>(v)` or `std::visit`. **(C++17)**\n\n**Header:** `<variant>`" }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"std::any": {
|
|
90
|
+
"contents": [
|
|
91
|
+
{ "value": "```cpp\nclass any;\n```\nType-safe container for single values of any copy-constructible type. Access via `std::any_cast<T>(a)`. **(C++17)**\n\n**Header:** `<any>`" }
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"std::unique_ptr": {
|
|
95
|
+
"contents": [
|
|
96
|
+
{ "value": "```cpp\ntemplate<class T, class Deleter = std::default_delete<T>>\nclass unique_ptr;\n```\nSmart pointer with exclusive ownership semantics. Non-copyable, movable. Automatically deletes the managed object when it goes out of scope. Use `std::make_unique<T>()` to create.\n\n**Header:** `<memory>`" }
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"std::shared_ptr": {
|
|
100
|
+
"contents": [
|
|
101
|
+
{ "value": "```cpp\ntemplate<class T>\nclass shared_ptr;\n```\nSmart pointer with shared (reference-counted) ownership. Object is destroyed when the last `shared_ptr` owning it is destroyed. Use `std::make_shared<T>()` to create.\n\n**Header:** `<memory>`" }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"std::weak_ptr": {
|
|
105
|
+
"contents": [
|
|
106
|
+
{ "value": "```cpp\ntemplate<class T>\nclass weak_ptr;\n```\nNon-owning smart pointer that references a `shared_ptr`-managed object without affecting the reference count. Use `.lock()` to obtain a `shared_ptr`. Breaks circular references.\n\n**Header:** `<memory>`" }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"std::function": {
|
|
110
|
+
"contents": [
|
|
111
|
+
{ "value": "```cpp\ntemplate<class R, class... Args>\nclass function<R(Args...)>;\n```\nGeneral-purpose polymorphic function wrapper. Stores any callable target: functions, lambdas, bind expressions, member function pointers. Type-erased.\n\n**Header:** `<functional>`" }
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"std::span": {
|
|
115
|
+
"contents": [
|
|
116
|
+
{ "value": "```cpp\ntemplate<class T, std::size_t Extent = std::dynamic_extent>\nclass span;\n```\nNon-owning view over a contiguous sequence of objects. Replaces `(T* ptr, size_t len)` pairs. Works with arrays, vectors, and C-arrays. **(C++20)**\n\n**Header:** `<span>`" }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"std::sort": {
|
|
120
|
+
"contents": [
|
|
121
|
+
{ "value": "```cpp\ntemplate<class RandomIt>\nvoid sort(RandomIt first, RandomIt last);\n\ntemplate<class RandomIt, class Compare>\nvoid sort(RandomIt first, RandomIt last, Compare comp);\n```\nSorts elements in [first, last) in ascending order using introsort. O(n log n) guaranteed.\n\n**Header:** `<algorithm>`" }
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"std::find": {
|
|
125
|
+
"contents": [
|
|
126
|
+
{ "value": "```cpp\ntemplate<class InputIt, class T>\nInputIt find(InputIt first, InputIt last, const T& value);\n```\nReturns an iterator to the first element equal to `value` in [first, last). Returns `last` if not found. O(n).\n\n**Header:** `<algorithm>`" }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"std::transform": {
|
|
130
|
+
"contents": [
|
|
131
|
+
{ "value": "```cpp\ntemplate<class InputIt, class OutputIt, class UnaryOp>\nOutputIt transform(InputIt first, InputIt last,\n OutputIt d_first, UnaryOp op);\n```\nApplies `op` to each element and writes the result to `d_first`. Functional-style map operation.\n\n**Header:** `<algorithm>`" }
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"std::accumulate": {
|
|
135
|
+
"contents": [
|
|
136
|
+
{ "value": "```cpp\ntemplate<class InputIt, class T>\nT accumulate(InputIt first, InputIt last, T init);\n\ntemplate<class InputIt, class T, class BinaryOp>\nT accumulate(InputIt first, InputIt last, T init, BinaryOp op);\n```\nComputes a left fold over [first, last) starting with `init`. Default operation is addition.\n\n**Header:** `<numeric>`" }
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"std::move": {
|
|
140
|
+
"contents": [
|
|
141
|
+
{ "value": "```cpp\ntemplate<class T>\nconstexpr std::remove_reference_t<T>&& move(T&& t) noexcept;\n```\nCasts to an rvalue reference, indicating the argument may be \"moved from.\" Enables efficient resource transfer via move constructors/assignment operators.\n\n**Header:** `<utility>`" }
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"std::forward": {
|
|
145
|
+
"contents": [
|
|
146
|
+
{ "value": "```cpp\ntemplate<class T>\nconstexpr T&& forward(std::remove_reference_t<T>& t) noexcept;\n```\nForwards lvalues as lvalues and rvalues as rvalues. Essential for perfect forwarding in template code.\n\n**Header:** `<utility>`" }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"std::make_unique": {
|
|
150
|
+
"contents": [
|
|
151
|
+
{ "value": "```cpp\ntemplate<class T, class... Args>\nunique_ptr<T> make_unique(Args&&... args); // (C++14)\n```\nCreates a `std::unique_ptr` managing a new object constructed with the given arguments. Exception-safe. Preferred over raw `new`.\n\n**Header:** `<memory>`" }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"std::make_shared": {
|
|
155
|
+
"contents": [
|
|
156
|
+
{ "value": "```cpp\ntemplate<class T, class... Args>\nshared_ptr<T> make_shared(Args&&... args);\n```\nCreates a `std::shared_ptr` with a single allocation for both the object and the control block. More efficient than `shared_ptr<T>(new T(...))`.\n\n**Header:** `<memory>`" }
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"std::cout": {
|
|
160
|
+
"contents": [
|
|
161
|
+
{ "value": "```cpp\nextern std::ostream cout;\n```\nThe standard output stream associated with the C stream `stdout`. Thread-safe for individual operations when synchronized with C I/O (default).\n\n**Header:** `<iostream>`" }
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"std::cin": {
|
|
165
|
+
"contents": [
|
|
166
|
+
{ "value": "```cpp\nextern std::istream cin;\n```\nThe standard input stream associated with the C stream `stdin`. Tied to `std::cout` by default for prompt flushing.\n\n**Header:** `<iostream>`" }
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"std::endl": {
|
|
170
|
+
"contents": [
|
|
171
|
+
{ "value": "```cpp\ntemplate<class CharT, class Traits>\nstd::basic_ostream<CharT, Traits>&\n endl(std::basic_ostream<CharT, Traits>& os);\n```\nInserts `'\\n'` and flushes the stream. Use `'\\n'` instead when flushing is not needed for better performance.\n\n**Header:** `<ostream>`" }
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"std::format": {
|
|
175
|
+
"contents": [
|
|
176
|
+
{ "value": "```cpp\ntemplate<class... Args>\nstd::string format(std::format_string<Args...> fmt, Args&&... args);\n```\nType-safe Python-style string formatting. Supports positional args, alignment, fill, precision, and type specifiers. **(C++20)**\n\n**Header:** `<format>`" }
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"std::ranges": {
|
|
180
|
+
"contents": [
|
|
181
|
+
{ "value": "```cpp\nnamespace std::ranges { ... }\n```\nThe Ranges library providing composable, lazy range adaptors and constrained algorithms. Includes `views::filter`, `views::transform`, `views::take`, `views::drop`, `views::reverse`, and more. **(C++20)**\n\n**Header:** `<ranges>`" }
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"constexpr": {
|
|
185
|
+
"contents": [
|
|
186
|
+
{ "value": "```cpp\nconstexpr int factorial(int n) {\n return (n <= 1) ? 1 : n * factorial(n - 1);\n}\n```\nSpecifies that a value or function can be evaluated at compile time. Extended in C++14 (relaxed rules), C++17 (`if constexpr`), and C++20 (`constexpr` virtual, dynamic allocation)." }
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"auto": {
|
|
190
|
+
"contents": [
|
|
191
|
+
{ "value": "```cpp\nauto x = 42; // int\nauto s = \"hello\"s; // std::string\nauto [k, v] = pair; // structured bindings (C++17)\nauto fn = [](auto x) { return x; }; // generic lambda (C++14)\n```\nAutomatic type deduction from the initializer expression. Also used for function return type deduction and generic lambdas." }
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"nullptr": {
|
|
195
|
+
"contents": [
|
|
196
|
+
{ "value": "```cpp\nconstexpr std::nullptr_t nullptr;\n```\nThe null pointer literal of type `std::nullptr_t`. Preferred over `NULL` or `0` for pointer initialization. Unambiguous in overload resolution." }
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"std::thread": {
|
|
200
|
+
"contents": [
|
|
201
|
+
{ "value": "```cpp\nclass thread;\n```\nRepresents a single thread of execution. Construct with a callable. Must be `join()`ed or `detach()`ed before destruction.\n\n**Header:** `<thread>`" }
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"std::mutex": {
|
|
205
|
+
"contents": [
|
|
206
|
+
{ "value": "```cpp\nclass mutex;\n```\nProvides basic mutual exclusion. Non-recursive. Use `std::lock_guard` or `std::unique_lock` for RAII-style locking.\n\n**Header:** `<mutex>`" }
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "csharp",
|
|
3
|
+
"hovers": {
|
|
4
|
+
"Console.WriteLine": {
|
|
5
|
+
"contents": [
|
|
6
|
+
{ "value": "```csharp\npublic static void WriteLine(string? value)\n```\nWrites the specified string value, followed by the current line terminator, to the standard output stream." }
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"Console.Write": {
|
|
10
|
+
"contents": [
|
|
11
|
+
{ "value": "```csharp\npublic static void Write(string? value)\n```\nWrites the specified string value to the standard output stream without a trailing line terminator." }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"Console.ReadLine": {
|
|
15
|
+
"contents": [
|
|
16
|
+
{ "value": "```csharp\npublic static string? ReadLine()\n```\nReads the next line of characters from the standard input stream. Returns null if no more lines are available." }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"Console.ReadKey": {
|
|
20
|
+
"contents": [
|
|
21
|
+
{ "value": "```csharp\npublic static ConsoleKeyInfo ReadKey(bool intercept = false)\n```\nObtains the next character or function key pressed by the user. Optionally suppresses display of the pressed key." }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"Debug.WriteLine": {
|
|
25
|
+
"contents": [
|
|
26
|
+
{ "value": "```csharp\npublic static void WriteLine(string? message)\n```\nWrites a message followed by a line terminator to the trace listeners in the Debug.Listeners collection." }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"string.Format": {
|
|
30
|
+
"contents": [
|
|
31
|
+
{ "value": "```csharp\npublic static string Format(string format, params object?[] args)\n```\nReplaces one or more format items in a string with the string representation of corresponding objects. Supports composite formatting with alignment and format specifiers." }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"string.Join": {
|
|
35
|
+
"contents": [
|
|
36
|
+
{ "value": "```csharp\npublic static string Join(string? separator, IEnumerable<string?> values)\n```\nConcatenates the members of a collection, using the specified separator between each member." }
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"string.IsNullOrEmpty": {
|
|
40
|
+
"contents": [
|
|
41
|
+
{ "value": "```csharp\npublic static bool IsNullOrEmpty(string? value)\n```\nIndicates whether the specified string is null or an empty string (\"\"). Equivalent to `value == null || value.Length == 0`." }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"string.IsNullOrWhiteSpace": {
|
|
45
|
+
"contents": [
|
|
46
|
+
{ "value": "```csharp\npublic static bool IsNullOrWhiteSpace(string? value)\n```\nIndicates whether a specified string is null, empty, or consists only of white-space characters." }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"string.Concat": {
|
|
50
|
+
"contents": [
|
|
51
|
+
{ "value": "```csharp\npublic static string Concat(params string?[] values)\n```\nConcatenates one or more instances of String, or the String representations of the values of one or more objects." }
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"string.Compare": {
|
|
55
|
+
"contents": [
|
|
56
|
+
{ "value": "```csharp\npublic static int Compare(string? strA, string? strB, StringComparison comparisonType)\n```\nCompares two specified String objects using the specified comparison rules, and returns an integer indicating their relative position in the sort order." }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"Substring": {
|
|
60
|
+
"contents": [
|
|
61
|
+
{ "value": "```csharp\npublic string Substring(int startIndex, int length)\n```\nRetrieves a substring from this instance starting at a specified character position with a specified length." }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"Contains": {
|
|
65
|
+
"contents": [
|
|
66
|
+
{ "value": "```csharp\npublic bool Contains(string value, StringComparison comparisonType)\n```\nReturns a value indicating whether a specified substring occurs within this string, using the specified comparison rules." }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"StartsWith": {
|
|
70
|
+
"contents": [
|
|
71
|
+
{ "value": "```csharp\npublic bool StartsWith(string value, StringComparison comparisonType)\n```\nDetermines whether the beginning of this string instance matches the specified string when compared using the specified comparison option." }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"EndsWith": {
|
|
75
|
+
"contents": [
|
|
76
|
+
{ "value": "```csharp\npublic bool EndsWith(string value, StringComparison comparisonType)\n```\nDetermines whether the end of this string instance matches the specified string when compared using the specified comparison option." }
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"IndexOf": {
|
|
80
|
+
"contents": [
|
|
81
|
+
{ "value": "```csharp\npublic int IndexOf(string value, StringComparison comparisonType)\n```\nReports the zero-based index of the first occurrence of the specified string within this instance. Returns -1 if not found." }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"Replace": {
|
|
85
|
+
"contents": [
|
|
86
|
+
{ "value": "```csharp\npublic string Replace(string oldValue, string? newValue)\n```\nReturns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string." }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"Split": {
|
|
90
|
+
"contents": [
|
|
91
|
+
{ "value": "```csharp\npublic string[] Split(char separator, StringSplitOptions options = None)\n```\nSplits a string into substrings based on a specified delimiting character and, optionally, options to trim and remove empty entries." }
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"Trim": {
|
|
95
|
+
"contents": [
|
|
96
|
+
{ "value": "```csharp\npublic string Trim()\n```\nRemoves all leading and trailing white-space characters from the current string." }
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"ToUpper": {
|
|
100
|
+
"contents": [
|
|
101
|
+
{ "value": "```csharp\npublic string ToUpper()\n```\nReturns a copy of this string converted to uppercase, using the casing rules of the current culture." }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"ToLower": {
|
|
105
|
+
"contents": [
|
|
106
|
+
{ "value": "```csharp\npublic string ToLower()\n```\nReturns a copy of this string converted to lowercase, using the casing rules of the current culture." }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"List": {
|
|
110
|
+
"contents": [
|
|
111
|
+
{ "value": "```csharp\npublic class List<T> : IList<T>, IReadOnlyList<T>\n```\nRepresents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists." }
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"Dictionary": {
|
|
115
|
+
"contents": [
|
|
116
|
+
{ "value": "```csharp\npublic class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>\n```\nRepresents a collection of keys and values. Provides O(1) average-time lookups by key." }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"HashSet": {
|
|
120
|
+
"contents": [
|
|
121
|
+
{ "value": "```csharp\npublic class HashSet<T> : ISet<T>, IReadOnlySet<T>\n```\nRepresents a set of values. Provides high-performance set operations such as union, intersection, and difference." }
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"Queue": {
|
|
125
|
+
"contents": [
|
|
126
|
+
{ "value": "```csharp\npublic class Queue<T> : IEnumerable<T>, IReadOnlyCollection<T>\n```\nRepresents a first-in, first-out (FIFO) collection of objects." }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"Stack": {
|
|
130
|
+
"contents": [
|
|
131
|
+
{ "value": "```csharp\npublic class Stack<T> : IEnumerable<T>, IReadOnlyCollection<T>\n```\nRepresents a variable size last-in, first-out (LIFO) collection of instances of the same specified type." }
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"Where": {
|
|
135
|
+
"contents": [
|
|
136
|
+
{ "value": "```csharp\npublic static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)\n```\nFilters a sequence of values based on a predicate. Returns elements for which the predicate returns true." }
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"Select": {
|
|
140
|
+
"contents": [
|
|
141
|
+
{ "value": "```csharp\npublic static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)\n```\nProjects each element of a sequence into a new form by applying a transform function." }
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"SelectMany": {
|
|
145
|
+
"contents": [
|
|
146
|
+
{ "value": "```csharp\npublic static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector)\n```\nProjects each element to an IEnumerable<T> and flattens the resulting sequences into one sequence." }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"OrderBy": {
|
|
150
|
+
"contents": [
|
|
151
|
+
{ "value": "```csharp\npublic static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)\n```\nSorts the elements of a sequence in ascending order according to a key." }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"GroupBy": {
|
|
155
|
+
"contents": [
|
|
156
|
+
{ "value": "```csharp\npublic static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)\n```\nGroups the elements of a sequence according to a specified key selector function." }
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"First": {
|
|
160
|
+
"contents": [
|
|
161
|
+
{ "value": "```csharp\npublic static TSource First<TSource>(this IEnumerable<TSource> source)\n```\nReturns the first element of a sequence. Throws InvalidOperationException if the sequence contains no elements." }
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"FirstOrDefault": {
|
|
165
|
+
"contents": [
|
|
166
|
+
{ "value": "```csharp\npublic static TSource? FirstOrDefault<TSource>(this IEnumerable<TSource> source)\n```\nReturns the first element of a sequence, or a default value if the sequence contains no elements." }
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"Any": {
|
|
170
|
+
"contents": [
|
|
171
|
+
{ "value": "```csharp\npublic static bool Any<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)\n```\nDetermines whether any element of a sequence satisfies a condition." }
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"All": {
|
|
175
|
+
"contents": [
|
|
176
|
+
{ "value": "```csharp\npublic static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)\n```\nDetermines whether all elements of a sequence satisfy a condition." }
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"Count": {
|
|
180
|
+
"contents": [
|
|
181
|
+
{ "value": "```csharp\npublic static int Count<TSource>(this IEnumerable<TSource> source)\n```\nReturns the number of elements in a sequence. An overload accepts a predicate to count only matching elements." }
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"Sum": {
|
|
185
|
+
"contents": [
|
|
186
|
+
{ "value": "```csharp\npublic static int Sum(this IEnumerable<int> source)\n```\nComputes the sum of a sequence of numeric values. Overloads exist for int, long, float, double, and decimal." }
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"Distinct": {
|
|
190
|
+
"contents": [
|
|
191
|
+
{ "value": "```csharp\npublic static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source)\n```\nReturns distinct elements from a sequence by using the default equality comparer to compare values." }
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"Task.Run": {
|
|
195
|
+
"contents": [
|
|
196
|
+
{ "value": "```csharp\npublic static Task Run(Action action)\npublic static Task<TResult> Run<TResult>(Func<TResult> function)\n```\nQueues the specified work to run on the ThreadPool and returns a Task or Task<TResult> handle for that work." }
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"Task.WhenAll": {
|
|
200
|
+
"contents": [
|
|
201
|
+
{ "value": "```csharp\npublic static Task WhenAll(IEnumerable<Task> tasks)\npublic static Task<TResult[]> WhenAll<TResult>(IEnumerable<Task<TResult>> tasks)\n```\nCreates a task that will complete when all of the supplied tasks have completed." }
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"Task.WhenAny": {
|
|
205
|
+
"contents": [
|
|
206
|
+
{ "value": "```csharp\npublic static Task<Task> WhenAny(IEnumerable<Task> tasks)\n```\nCreates a task that will complete when any of the supplied tasks have completed." }
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"Task.Delay": {
|
|
210
|
+
"contents": [
|
|
211
|
+
{ "value": "```csharp\npublic static Task Delay(int millisecondsDelay)\npublic static Task Delay(TimeSpan delay)\n```\nCreates a task that completes after a specified time interval." }
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"Task.FromResult": {
|
|
215
|
+
"contents": [
|
|
216
|
+
{ "value": "```csharp\npublic static Task<TResult> FromResult<TResult>(TResult result)\n```\nCreates a Task<TResult> that is completed successfully with the specified result." }
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"Math.Max": {
|
|
220
|
+
"contents": [
|
|
221
|
+
{ "value": "```csharp\npublic static int Max(int val1, int val2)\n```\nReturns the larger of two specified numbers. Overloads exist for all numeric types." }
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
"Math.Min": {
|
|
225
|
+
"contents": [
|
|
226
|
+
{ "value": "```csharp\npublic static int Min(int val1, int val2)\n```\nReturns the smaller of two specified numbers. Overloads exist for all numeric types." }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"Math.Abs": {
|
|
230
|
+
"contents": [
|
|
231
|
+
{ "value": "```csharp\npublic static int Abs(int value)\n```\nReturns the absolute value of a specified number. Overloads exist for all signed numeric types." }
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"Math.Sqrt": {
|
|
235
|
+
"contents": [
|
|
236
|
+
{ "value": "```csharp\npublic static double Sqrt(double d)\n```\nReturns the square root of a specified number. Returns NaN if d is negative." }
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
"Math.Pow": {
|
|
240
|
+
"contents": [
|
|
241
|
+
{ "value": "```csharp\npublic static double Pow(double x, double y)\n```\nReturns a specified number raised to the specified power." }
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"Math.Round": {
|
|
245
|
+
"contents": [
|
|
246
|
+
{ "value": "```csharp\npublic static double Round(double value, int digits)\n```\nRounds a double-precision floating-point value to a specified number of fractional digits using banker's rounding by default." }
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"int.Parse": {
|
|
250
|
+
"contents": [
|
|
251
|
+
{ "value": "```csharp\npublic static int Parse(string s)\n```\nConverts the string representation of a number to its 32-bit signed integer equivalent. Throws FormatException if the string is not valid." }
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
"int.TryParse": {
|
|
255
|
+
"contents": [
|
|
256
|
+
{ "value": "```csharp\npublic static bool TryParse(string? s, out int result)\n```\nConverts the string representation of a number to its 32-bit signed integer equivalent. Returns whether the conversion succeeded without throwing an exception." }
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"Guid.NewGuid": {
|
|
260
|
+
"contents": [
|
|
261
|
+
{ "value": "```csharp\npublic static Guid NewGuid()\n```\nInitializes a new instance of the Guid structure with a cryptographically random value (version 4 UUID)." }
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
"DateTime.Now": {
|
|
265
|
+
"contents": [
|
|
266
|
+
{ "value": "```csharp\npublic static DateTime Now { get; }\n```\nGets a DateTime object that is set to the current date and time on this computer, expressed as the local time." }
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
"DateTime.UtcNow": {
|
|
270
|
+
"contents": [
|
|
271
|
+
{ "value": "```csharp\npublic static DateTime UtcNow { get; }\n```\nGets a DateTime object that is set to the current date and time on this computer, expressed as Coordinated Universal Time (UTC)." }
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"Enumerable.Range": {
|
|
275
|
+
"contents": [
|
|
276
|
+
{ "value": "```csharp\npublic static IEnumerable<int> Range(int start, int count)\n```\nGenerates a sequence of integral numbers within a specified range, starting from start and containing count sequential integers." }
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
"Enumerable.Empty": {
|
|
280
|
+
"contents": [
|
|
281
|
+
{ "value": "```csharp\npublic static IEnumerable<TResult> Empty<TResult>()\n```\nReturns an empty IEnumerable<T> that has the specified type argument. The returned singleton is cached." }
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"Enumerable.Repeat": {
|
|
285
|
+
"contents": [
|
|
286
|
+
{ "value": "```csharp\npublic static IEnumerable<TResult> Repeat<TResult>(TResult element, int count)\n```\nGenerates a sequence that contains one repeated value a specified number of times." }
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|