- ProfileService.UpdateProfileAsync: replaces profile by name and persists the change - IBrandingService: add ImportLogoFromBytesAsync to interface contract - BrandingService.ImportLogoFromBytesAsync: validates magic bytes, compresses if > 512KB, returns LogoData - BrandingService.ImportLogoAsync: refactored to delegate to ImportLogoFromBytesAsync - ProfileServiceTests: 2 new tests (UpdateProfileAsync happy path + KeyNotFoundException) - BrandingServiceTests: 2 new tests (ImportLogoFromBytesAsync valid PNG + invalid bytes) - Tests.csproj: suppress NU1701 for pre-existing LiveCharts2/OpenTK transitive warnings
13 lines
338 B
C#
13 lines
338 B
C#
using SharepointToolbox.Core.Models;
|
|
|
|
namespace SharepointToolbox.Services;
|
|
|
|
public interface IBrandingService
|
|
{
|
|
Task<LogoData> ImportLogoAsync(string filePath);
|
|
Task<LogoData> ImportLogoFromBytesAsync(byte[] bytes);
|
|
Task SaveMspLogoAsync(LogoData logo);
|
|
Task ClearMspLogoAsync();
|
|
Task<LogoData?> GetMspLogoAsync();
|
|
}
|