-
-
Notifications
You must be signed in to change notification settings - Fork 28
Refactor Source Generator #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 37 commits
3b58ca1
e2b54a2
32fd4b6
56336d2
84101ad
ef8ba5a
8be3004
9b267b8
df7ede3
b81ae80
4252882
0520daf
51c3914
33e245b
a29d79b
8308929
751dc1e
d4d0c77
251524b
73c72c2
892e3a6
a77162d
3acbc9f
8ceed33
191694a
8352038
a914073
dd767fc
e1ab275
7cc999c
bc0f139
f86b183
d1c04c9
1e77eb4
125b51d
b4ecc8e
2dddcfb
ff24377
5be1496
ccaed4f
de22ea5
43fd654
cce78df
1d620b6
f2c0f8d
b5f7815
38b0d75
f74c818
9e31e9f
405b4f6
33a76a4
2ba24a3
d8e8e7e
08b8ae3
5e6aa1b
907d1cd
ab38070
64b1be6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| namespace TfsCmdlets { | ||
|
|
||
| [AttributeUsage(System.AttributeTargets.Class, Inherited = true, AllowMultiple = false)] | ||
| public sealed class CmdletControllerAttribute : ExportAttribute | ||
| { | ||
| public Type DataType { get; } | ||
|
|
||
| public string CustomCmdletName { get; set; } | ||
|
|
||
| public string[] CustomVerbs { get; set; } | ||
|
|
||
| public string[] CustomNouns { get; set; } | ||
|
|
||
| public Type CustomBaseClass { get; set; } | ||
|
|
||
| public Type Client { get; set; } | ||
|
|
||
|
|
||
| public CmdletControllerAttribute() : base(typeof(IController)) | ||
| { | ||
| } | ||
|
|
||
| public CmdletControllerAttribute(Type dataType) : base(typeof(IController)) | ||
| { | ||
| DataType = dataType; | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| namespace TfsCmdlets.Cmdlets.WorkItem.Tagging | ||
| { | ||
| internal abstract class ToggleWorkItemTagController: ControllerBase | ||
| public abstract class ToggleWorkItemTagController: ControllerBase | ||
| { | ||
| [Import] | ||
| private ITaggingHttpClient Client { get; set; } | ||
|
|
@@ -16,9 +16,12 @@ | |
| foreach (var tag in tags) | ||
| { | ||
| if (!PowerShell.ShouldProcess(tp, $"{(enabled? "Enable": "Disable")} work item tag '{tag.Name}'")) continue; | ||
|
|
||
| yield return Client.UpdateTagAsync(tp.Id, tag.Id, tag.Name, enabled) | ||
| .GetResult($"Error renaming work item tag '{tag.Name}'"); | ||
| #if UNIT_TEST_PROJECT | ||
| yield break; | ||
| #else | ||
| yield return Client.UpdateTagAsync(tp.Id, tag.Id, tag.Name, enabled) | ||
|
Check warning on line 22 in CSharp/TfsCmdlets.Shared/Cmdlets/WorkItem/Tagging/ToggleWorkItemTagController.cs
|
||
| .GetResult($"Error renaming work item tag '{tag.Name}'"); | ||
| #endif | ||
|
||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| namespace TfsCmdlets.HttpClients | ||
| namespace TfsCmdlets | ||
| { | ||
| internal class HttpClientAttribute : Attribute | ||
| public sealed class HttpClientAttribute : Attribute | ||
|
Comment on lines
+1
to
+3
|
||
| { | ||
| public HttpClientAttribute(Type type) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||
| namespace TfsCmdlets.HttpClients | ||||||
| { | ||||||
| [HttpClient(typeof(GenericHttpClient))] | ||||||
|
||||||
| [HttpClient(typeof(GenericHttpClient))] | |
| [TfsCmdlets.HttpClient(typeof(GenericHttpClient))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Verify file normalization rules set
working-tree-encoding=UTF-8, but.editorconfigsets Verify artifacts tocharset = utf-8-bom. These conflict and can cause persistent churn (files rewritten with/without BOM depending on tooling). Align the encoding policy: either set.editorconfigtoutf-8(no BOM) or change.gitattributestoworking-tree-encoding=UTF-8-BOM(and confirm your Git version supports it) so Verify snapshots have stable bytes.