Skip to content

Commit b1b484a

Browse files
committed
nugets
1 parent 57bc843 commit b1b484a

9 files changed

+290
-219
lines changed

tests/ProxyInterfaceSourceGeneratorTests/AkkaTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
using AwesomeAssertions;
12
using CSharp.SourceGenerators.Extensions;
23
using CSharp.SourceGenerators.Extensions.Models;
34
using CultureAwareTesting.xUnit;
4-
using FluentAssertions;
55
using ProxyInterfaceSourceGenerator;
66
using ProxyInterfaceSourceGeneratorTests.Helpers;
77

tests/ProxyInterfaceSourceGeneratorTests/Destination/Microsoft.SharePoint.Client.WebProxy.g.cs

Lines changed: 196 additions & 123 deletions
Large diffs are not rendered by default.

tests/ProxyInterfaceSourceGeneratorTests/Destination/ProxyInterfaceSourceGeneratorTests.Source.IPerson.g.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ public partial interface IPerson
2020

2121
global::System.Collections.Generic.List<global::ProxyInterfaceSourceGeneratorTests.Source.IHuman> Humans { get; set; }
2222

23-
[System.ComponentModel.DataAnnotations.DisplayAttribute(Prompt = "MyStruct Indexer")]
2423
global::ProxyInterfaceSourceGeneratorTests.Source.MyStruct this[int i] { get; set; }
2524

2625
global::ProxyInterfaceSourceGeneratorTests.Source.MyStruct this[int i, string s] { get; set; }
2726

28-
[System.ComponentModel.DataAnnotations.DisplayAttribute(ResourceType = typeof(System.Threading.PeriodicTimer))]
2927
string Name { get; set; }
3028

3129
string? StringNullable { get; set; }
@@ -66,7 +64,6 @@ public partial interface IPerson
6664

6765
global::System.Threading.Tasks.Task<int> Method2Async();
6866

69-
[System.ComponentModel.DataAnnotations.DisplayAttribute(Name = "M3")]
7067
global::System.Threading.Tasks.Task<string?> Method3Async();
7168

7269
void CreateInvokeHttpClient(int i = 5, string? appId = null, global::System.Collections.Generic.IReadOnlyDictionary<string, string>? metadata = null, global::System.Threading.CancellationToken token = default(System.Threading.CancellationToken));

tests/ProxyInterfaceSourceGeneratorTests/Destination/ProxyInterfaceSourceGeneratorTests.Source.PersonProxy.g.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,10 @@ static PersonProxy()
5959

6060
public global::System.Collections.Generic.List<global::ProxyInterfaceSourceGeneratorTests.Source.IHuman> Humans { get => MapToInterface(_Instance.Humans); set => _Instance.Humans = MapToInstance(value); }
6161

62-
[System.ComponentModel.DataAnnotations.DisplayAttribute(Prompt = "MyStruct Indexer")]
6362
public global::ProxyInterfaceSourceGeneratorTests.Source.MyStruct this[int i] { get => _Instance[i]; set => _Instance[i] = value; }
6463

6564
public global::ProxyInterfaceSourceGeneratorTests.Source.MyStruct this[int i, string s] { get => _Instance[i, s]; set => _Instance[i, s] = value; }
6665

67-
[System.ComponentModel.DataAnnotations.DisplayAttribute(ResourceType = typeof(System.Threading.PeriodicTimer))]
6866
public string Name { get => _Instance.Name; set => _Instance.Name = value; }
6967

7068
public string? StringNullable { get => _Instance.StringNullable; set => _Instance.StringNullable = value!; }
@@ -186,7 +184,6 @@ public void In_Out_Ref1(in int a, out int b, ref int c)
186184
return result__57677169;
187185
}
188186

189-
[System.ComponentModel.DataAnnotations.DisplayAttribute(Name = "M3")]
190187
public global::System.Threading.Tasks.Task<string?> Method3Async()
191188
{
192189
var result__57684656 = _Instance.Method3Async();

tests/ProxyInterfaceSourceGeneratorTests/Destination/ProxyInterfaceSourceGeneratorTests.Source.PnP.IWeb.g.cs

Lines changed: 78 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ public partial interface IWeb
169169
[Microsoft.SharePoint.Client.RemoteAttribute]
170170
global::Microsoft.SharePoint.Client.FolderCollection Folders { get; }
171171

172+
[Microsoft.SharePoint.Client.RemoteAttribute]
173+
int FooterColorIndexInDarkMode { get; set; }
174+
175+
[Microsoft.SharePoint.Client.RemoteAttribute]
176+
int FooterColorIndexInLightMode { get; set; }
177+
172178
[Microsoft.SharePoint.Client.RemoteAttribute]
173179
global::Microsoft.SharePoint.Client.FooterVariantThemeType FooterEmphasis { get; set; }
174180

@@ -181,6 +187,12 @@ public partial interface IWeb
181187
[Microsoft.SharePoint.Client.RemoteAttribute]
182188
bool HasWebTemplateExtension { get; set; }
183189

190+
[Microsoft.SharePoint.Client.RemoteAttribute]
191+
int HeaderColorIndexInDarkMode { get; set; }
192+
193+
[Microsoft.SharePoint.Client.RemoteAttribute]
194+
int HeaderColorIndexInLightMode { get; set; }
195+
184196
[Microsoft.SharePoint.Client.RemoteAttribute]
185197
global::Microsoft.SharePoint.Client.SPVariantThemeType HeaderEmphasis { get; set; }
186198

@@ -281,7 +293,7 @@ public partial interface IWeb
281293
bool PreviewFeaturesEnabled { get; }
282294

283295
[Microsoft.SharePoint.Client.RemoteAttribute]
284-
string PrimaryColor { get; }
296+
string PrimaryColor { get; set; }
285297

286298
[Microsoft.SharePoint.Client.RemoteAttribute]
287299
global::Microsoft.SharePoint.Client.PushNotificationSubscriberCollection PushNotificationSubscribers { get; }
@@ -298,6 +310,9 @@ public partial interface IWeb
298310
[Microsoft.SharePoint.Client.RemoteAttribute]
299311
global::Microsoft.SharePoint.Client.RegionalSettings RegionalSettings { get; }
300312

313+
[Microsoft.SharePoint.Client.RemoteAttribute]
314+
string RelatedHubSiteIds { get; }
315+
301316
[Microsoft.SharePoint.Client.RemoteAttribute]
302317
string RequestAccessEmail { get; set; }
303318

@@ -361,6 +376,9 @@ public partial interface IWeb
361376
[Microsoft.SharePoint.Client.RemoteAttribute]
362377
bool TenantTagPolicyEnabled { get; }
363378

379+
[Microsoft.SharePoint.Client.RemoteAttribute]
380+
string ThemeApplicationActionHistory { get; }
381+
364382
[Microsoft.SharePoint.Client.RemoteAttribute]
365383
string ThemedCssFolderUrl { get; set; }
366384

@@ -434,24 +452,6 @@ public partial interface IWeb
434452
[Microsoft.SharePoint.Client.RemoteAttribute]
435453
void CreateDefaultAssociatedGroups(string userLogin, string userLogin2, string groupNameSeed);
436454

437-
[Microsoft.SharePoint.Client.RemoteAttribute]
438-
global::Microsoft.SharePoint.Client.ClientResult<string> CreateOrganizationSharingLink(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string url, bool isEditLink);
439-
440-
[Microsoft.SharePoint.Client.RemoteAttribute]
441-
void DestroyOrganizationSharingLink(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string url, bool isEditLink, bool removeAssociatedSharingLinkGroup);
442-
443-
[Microsoft.SharePoint.Client.RemoteAttribute]
444-
global::Microsoft.SharePoint.Client.ClientResult<global::Microsoft.SharePoint.Client.SharingLinkKind> GetSharingLinkKind(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string fileUrl);
445-
446-
[Microsoft.SharePoint.Client.RemoteAttribute]
447-
global::Microsoft.SharePoint.Client.ClientResult<global::Microsoft.SharePoint.Client.SharingLinkData> GetSharingLinkData(string linkUrl);
448-
449-
[Microsoft.SharePoint.Client.RemoteAttribute]
450-
global::Microsoft.SharePoint.Client.ClientResult<string> MapToIcon(string fileName, string progId, global::Microsoft.SharePoint.Client.Utilities.IconSize size);
451-
452-
[Microsoft.SharePoint.Client.RemoteAttribute]
453-
global::Microsoft.SharePoint.Client.ClientResult<string> GetWebUrlFromPageUrl(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string pageFullUrl);
454-
455455
[Microsoft.SharePoint.Client.RemoteAttribute]
456456
global::Microsoft.SharePoint.Client.PushNotificationSubscriber RegisterPushNotificationSubscriber(global::System.Guid deviceAppInstanceId, string serviceToken);
457457

@@ -470,6 +470,9 @@ public partial interface IWeb
470470
[Microsoft.SharePoint.Client.RemoteAttribute]
471471
global::Microsoft.SharePoint.Client.PushNotificationSubscriber GetPushNotificationSubscriber(global::System.Guid deviceAppInstanceId);
472472

473+
[Microsoft.SharePoint.Client.RemoteAttribute]
474+
global::Microsoft.SharePoint.Client.SPLargeOperation GetListOperation(global::System.Guid listId, global::System.Guid operationId);
475+
473476
[Microsoft.SharePoint.Client.RemoteAttribute]
474477
global::Microsoft.SharePoint.Client.User GetSiteUserIncludingDeletedByPuid(string puid);
475478

@@ -512,6 +515,24 @@ public partial interface IWeb
512515
[Microsoft.SharePoint.Client.RemoteAttribute]
513516
void DeleteAnonymousLinkForObject(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string url, bool isEditLink, bool removeAssociatedSharingLinkGroup);
514517

518+
[Microsoft.SharePoint.Client.RemoteAttribute]
519+
global::Microsoft.SharePoint.Client.ClientResult<string> CreateOrganizationSharingLink(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string url, bool isEditLink);
520+
521+
[Microsoft.SharePoint.Client.RemoteAttribute]
522+
void DestroyOrganizationSharingLink(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string url, bool isEditLink, bool removeAssociatedSharingLinkGroup);
523+
524+
[Microsoft.SharePoint.Client.RemoteAttribute]
525+
global::Microsoft.SharePoint.Client.ClientResult<global::Microsoft.SharePoint.Client.SharingLinkKind> GetSharingLinkKind(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string fileUrl);
526+
527+
[Microsoft.SharePoint.Client.RemoteAttribute]
528+
global::Microsoft.SharePoint.Client.ClientResult<global::Microsoft.SharePoint.Client.SharingLinkData> GetSharingLinkData(string linkUrl);
529+
530+
[Microsoft.SharePoint.Client.RemoteAttribute]
531+
global::Microsoft.SharePoint.Client.ClientResult<string> MapToIcon(string fileName, string progId, global::Microsoft.SharePoint.Client.Utilities.IconSize size);
532+
533+
[Microsoft.SharePoint.Client.RemoteAttribute]
534+
global::Microsoft.SharePoint.Client.ClientResult<string> GetWebUrlFromPageUrl(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string pageFullUrl);
535+
515536
[Microsoft.SharePoint.Client.RemoteAttribute]
516537
global::Microsoft.SharePoint.Client.ListCollection GetLists(global::Microsoft.SharePoint.Client.GetListsParameters getListsParams);
517538

@@ -533,6 +554,9 @@ public partial interface IWeb
533554
[Microsoft.SharePoint.Client.RemoteAttribute]
534555
global::Microsoft.SharePoint.Client.List GetList(string strUrl);
535556

557+
[Microsoft.SharePoint.Client.RemoteAttribute]
558+
global::Microsoft.SharePoint.Client.List GetListByTitle(string title);
559+
536560
[Microsoft.SharePoint.Client.RemoteAttribute]
537561
global::Microsoft.SharePoint.Client.List GetListUsingPath(global::Microsoft.SharePoint.Client.ResourcePath path);
538562

@@ -561,64 +585,79 @@ public partial interface IWeb
561585
global::Microsoft.SharePoint.Client.ClientResult<global::System.IO.Stream> GetSPAppContextAsStream();
562586

563587
[Microsoft.SharePoint.Client.RemoteAttribute]
564-
void Update();
588+
global::Microsoft.SharePoint.Client.List DefaultDocumentLibrary();
565589

566590
[Microsoft.SharePoint.Client.RemoteAttribute]
567-
global::Microsoft.SharePoint.Client.View GetViewFromUrl(string listUrl);
591+
global::Microsoft.SharePoint.Client.File GetFileById(global::System.Guid uniqueId);
568592

569593
[Microsoft.SharePoint.Client.RemoteAttribute]
570-
global::Microsoft.SharePoint.Client.View GetViewFromPath(global::Microsoft.SharePoint.Client.ResourcePath listPath);
594+
global::Microsoft.SharePoint.Client.Folder GetFolderById(global::System.Guid uniqueId);
571595

572596
[Microsoft.SharePoint.Client.RemoteAttribute]
573-
global::Microsoft.SharePoint.Client.File GetFileByServerRelativeUrl(string serverRelativeUrl);
597+
global::Microsoft.SharePoint.Client.File GetFileByLinkingUrl(string linkingUrl);
574598

575599
[Microsoft.SharePoint.Client.RemoteAttribute]
576-
global::Microsoft.SharePoint.Client.File GetFileByServerRelativePath(global::Microsoft.SharePoint.Client.ResourcePath serverRelativePath);
600+
global::Microsoft.SharePoint.Client.File GetFileByGuestUrl(string guestUrl);
577601

578602
[Microsoft.SharePoint.Client.RemoteAttribute]
579-
global::System.Collections.Generic.IList<global::Microsoft.SharePoint.Client.DocumentLibraryInformation> GetDocumentLibraries(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string webFullUrl);
603+
global::Microsoft.SharePoint.Client.File GetFileByGuestUrlEnsureAccess(string guestUrl, bool ensureAccess);
580604

581605
[Microsoft.SharePoint.Client.RemoteAttribute]
582-
global::System.Collections.Generic.IList<global::Microsoft.SharePoint.Client.DocumentLibraryInformation> GetDocumentAndMediaLibraries(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string webFullUrl, bool includePageLibraries);
606+
global::Microsoft.SharePoint.Client.File GetFileByWOPIFrameUrl(string wopiFrameUrl);
583607

584608
[Microsoft.SharePoint.Client.RemoteAttribute]
585-
global::Microsoft.SharePoint.Client.ClientResult<global::Microsoft.SharePoint.Client.DocumentLibraryInformation> DefaultDocumentLibraryUrl(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string webUrl);
609+
global::Microsoft.SharePoint.Client.File GetFileByStreamFrameUrl(string streamFrameUrl);
586610

587611
[Microsoft.SharePoint.Client.RemoteAttribute]
588-
global::Microsoft.SharePoint.Client.List DefaultDocumentLibrary();
612+
global::Microsoft.SharePoint.Client.File GetFileByUrl(string fileUrl);
589613

590614
[Microsoft.SharePoint.Client.RemoteAttribute]
591-
global::Microsoft.SharePoint.Client.File GetFileById(global::System.Guid uniqueId);
615+
global::Microsoft.SharePoint.Client.Folder GetFolderByServerRelativeUrl(string serverRelativeUrl);
592616

593617
[Microsoft.SharePoint.Client.RemoteAttribute]
594-
global::Microsoft.SharePoint.Client.Folder GetFolderById(global::System.Guid uniqueId);
618+
global::Microsoft.SharePoint.Client.Folder GetFolderByServerRelativePath(global::Microsoft.SharePoint.Client.ResourcePath serverRelativePath);
595619

596620
[Microsoft.SharePoint.Client.RemoteAttribute]
597-
global::Microsoft.SharePoint.Client.File GetFileByLinkingUrl(string linkingUrl);
621+
global::Microsoft.SharePoint.Client.ClientResult<string> CreateSitePage(string pageMetaData);
598622

599623
[Microsoft.SharePoint.Client.RemoteAttribute]
600-
global::Microsoft.SharePoint.Client.File GetFileByGuestUrl(string guestUrl);
624+
global::Microsoft.SharePoint.Client.ClientResult<string> GetSitePageCopyToStatus(global::System.Guid workItemId);
601625

602626
[Microsoft.SharePoint.Client.RemoteAttribute]
603-
global::Microsoft.SharePoint.Client.File GetFileByGuestUrlEnsureAccess(string guestUrl, bool ensureAccess);
627+
global::Microsoft.SharePoint.Client.ClientResult<string> GetSitePageMoveStatus(global::System.Guid workItemId);
604628

605629
[Microsoft.SharePoint.Client.RemoteAttribute]
606-
global::Microsoft.SharePoint.Client.File GetFileByWOPIFrameUrl(string wopiFrameUrl);
630+
void ApplyWebTemplate(string webTemplate);
607631

608632
[Microsoft.SharePoint.Client.RemoteAttribute]
609-
global::Microsoft.SharePoint.Client.File GetFileByUrl(string fileUrl);
633+
void DeleteObject();
610634

611635
[Microsoft.SharePoint.Client.RemoteAttribute]
612-
global::Microsoft.SharePoint.Client.Folder GetFolderByServerRelativeUrl(string serverRelativeUrl);
636+
void Recycle();
613637

614638
[Microsoft.SharePoint.Client.RemoteAttribute]
615-
global::Microsoft.SharePoint.Client.Folder GetFolderByServerRelativePath(global::Microsoft.SharePoint.Client.ResourcePath serverRelativePath);
639+
void Update();
616640

617641
[Microsoft.SharePoint.Client.RemoteAttribute]
618-
void ApplyWebTemplate(string webTemplate);
642+
global::Microsoft.SharePoint.Client.View GetViewFromUrl(string listUrl);
619643

620644
[Microsoft.SharePoint.Client.RemoteAttribute]
621-
void DeleteObject();
645+
global::Microsoft.SharePoint.Client.View GetViewFromPath(global::Microsoft.SharePoint.Client.ResourcePath listPath);
646+
647+
[Microsoft.SharePoint.Client.RemoteAttribute]
648+
global::Microsoft.SharePoint.Client.File GetFileByServerRelativeUrl(string serverRelativeUrl);
649+
650+
[Microsoft.SharePoint.Client.RemoteAttribute]
651+
global::Microsoft.SharePoint.Client.File GetFileByServerRelativePath(global::Microsoft.SharePoint.Client.ResourcePath serverRelativePath);
652+
653+
[Microsoft.SharePoint.Client.RemoteAttribute]
654+
global::System.Collections.Generic.IList<global::Microsoft.SharePoint.Client.DocumentLibraryInformation> GetDocumentLibraries(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string webFullUrl);
655+
656+
[Microsoft.SharePoint.Client.RemoteAttribute]
657+
global::System.Collections.Generic.IList<global::Microsoft.SharePoint.Client.DocumentLibraryInformation> GetDocumentAndMediaLibraries(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string webFullUrl, bool includePageLibraries);
658+
659+
[Microsoft.SharePoint.Client.RemoteAttribute]
660+
global::Microsoft.SharePoint.Client.ClientResult<global::Microsoft.SharePoint.Client.DocumentLibraryInformation> DefaultDocumentLibraryUrl(global::ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientRuntimeContext context, string webUrl);
622661

623662
[Microsoft.SharePoint.Client.RemoteAttribute]
624663
global::Microsoft.SharePoint.Client.ClientResult<global::System.IO.Stream> PageContextInfo(bool includeODBSettings, bool emitNavigationInfo);

tests/ProxyInterfaceSourceGeneratorTests/InheritedInterfaceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
using AwesomeAssertions;
12
using CSharp.SourceGenerators.Extensions;
23
using CSharp.SourceGenerators.Extensions.Models;
3-
using FluentAssertions;
44
using Microsoft.CodeAnalysis.CSharp.Syntax;
55
using ProxyInterfaceSourceGenerator;
66
using ProxyInterfaceSourceGeneratorTests.Helpers;

tests/ProxyInterfaceSourceGeneratorTests/PnPTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
using AwesomeAssertions;
12
using CSharp.SourceGenerators.Extensions;
23
using CSharp.SourceGenerators.Extensions.Models;
3-
using FluentAssertions;
44
using ProxyInterfaceSourceGenerator;
55
using ProxyInterfaceSourceGeneratorTests.Helpers;
66

tests/ProxyInterfaceSourceGeneratorTests/ProxyInterfaceSourceGeneratorTest.cs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Runtime.CompilerServices;
2+
using AwesomeAssertions;
23
using CSharp.SourceGenerators.Extensions;
34
using CSharp.SourceGenerators.Extensions.Models;
4-
using FluentAssertions;
55
using Microsoft.CodeAnalysis.CSharp;
66
using Microsoft.CodeAnalysis.CSharp.Syntax;
77
using ProxyInterfaceSourceGenerator;
@@ -382,40 +382,6 @@ public void GenerateFiles_When_NoSetterOrGetter_Should_GenerateCorrectFiles()
382382
if (Write) File.WriteAllText(destinationFilename, builder.Text);
383383
builder.Text.Should().Be(File.ReadAllText(destinationFilename));
384384
}
385-
386-
// Load the file content
387-
string code = File.ReadAllText(Path.Combine(_basePath, $"Destination/ProxyInterfaceSourceGeneratorTests.Source.NoSetterOrGetterProxy.g.cs"));
388-
389-
// Parse syntax tree
390-
var tree = CSharpSyntaxTree.ParseText(code);
391-
var root = tree.GetRoot();
392-
393-
// Find all method declarations
394-
var methodDeclarations = root.DescendantNodes()
395-
.OfType<MethodDeclarationSyntax>()
396-
.ToArray();
397-
398-
// Find all method invocations
399-
var methodInvocations = root.DescendantNodes()
400-
.OfType<InvocationExpressionSyntax>()
401-
.Select(inv => inv.Expression.ToString())
402-
.ToArray();
403-
404-
// Analyze
405-
Console.WriteLine("Unused private static methods:");
406-
foreach (var method in methodDeclarations)
407-
{
408-
bool isPrivateStatic = method.Modifiers.Any(m => m.Kind() == SyntaxKind.PrivateKeyword) && method.Modifiers.Any(m => m.Kind() == SyntaxKind.StaticKeyword);
409-
410-
if (isPrivateStatic && !methodInvocations.Any(call => call.Contains(method.Identifier.Text)))
411-
{
412-
Console.WriteLine($"- {method.Identifier.Text}");
413-
414-
code = code.Replace(method.ToFullString(), string.Empty);
415-
}
416-
}
417-
418-
int x = 0;
419385
}
420386

421387
[Fact]

0 commit comments

Comments
 (0)