update directory name and access visibility

This commit is contained in:
Kalarumeth
2022-09-29 08:33:32 +02:00
parent 3ab3afe25e
commit f258a284d6
86 changed files with 253 additions and 361 deletions
+144
View File
@@ -0,0 +1,144 @@
using console_spo_utils.Services;
namespace console_spo_utils.Constants;
internal static class Fields
{
internal static string[] SiteFields
{
get
{
return new[]
{
"ID Progetto",
"Cliente",
"Causale"
};
}
}
internal static string[] SubSiteProject
{
get
{
return new string[]
{
"Item",
"Codice Articolo",
"Descrizione Articolo",
"Matricola Macchina"
};
}
}
internal static string[] SubProject
{
get
{
return new string[]
{
"Type",
"Name",
"Description",
"Item",
"Codice Articolo",
"Descrizione Articolo",
"Matricola Macchina",
"Modified",
"Editor",
"Version"
};
}
}
internal static string[] QuotationView
{
get
{
return new string[]
{
"Type",
"Name",
"ID Offerta",
"Fornitore",
"Causale",
"Autore"
};
}
}
internal static Dictionary<string, string> SyntheticProjList
{
get
{
return new Dictionary<string, string>()
{
{ SynthticProjTitle[0], "<Eq><FieldRef Name = 'PAL_DlvReason' />"+"<Value Type = 'Choice'>01 VENDITA MACCHINE / IMPIANTI</Value></Eq>" },
{ SynthticProjTitle[1], "<Eq><FieldRef Name = 'PAL_DlvReason' /><Value Type = 'Choice'>02 VENDITA RICAMBI</Value></Eq>" },
{ SynthticProjTitle[2], "<And><Neq><FieldRef Name = 'PAL_DlvReason' /><Value Type = 'Choice'>01 VENDITA MACCHINE / IMPIANTI</Value></Neq>"+
"<Neq><FieldRef Name = 'PAL_DlvReason' /><Value Type = 'Choice'>02 VENDITA RICAMBI</Value></Neq></And>"}
};
}
}
internal static string[] SynthticProjTitle
{
get
{
return new[]
{
"Sintetica-caus01",
"Sintetica-caus02",
"Sintetica-causXX"
};
}
}
internal static Dictionary<string, string[]> ProjectCustomFields
{
get
{
return new Dictionary<string, string[]>()
{
{ "PAL_ID_Project", new string[] { "URL", "ID Progetto", "PAL Field", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_DlvReason", new string[] { "Choice", "Causale", "PAL Field", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", "TRUE", "<CHOICES><CHOICE>01 VENDITA MACCHINE / IMPIANTI</CHOICE><CHOICE>02 VENDITA RICAMBI</CHOICE><CHOICE>04 VENDITA SERVIZI FUORI COMMESSA</CHOICE><CHOICE>08 VENDITA RIPARAZIONI</CHOICE><CHOICE>09 ENGINEERING</CHOICE><CHOICE>11 VENDITA E LAVORAZ.CONTO TERZI</CHOICE><CHOICE>55 PREVENDITE</CHOICE><CHOICE>NC NON CONFORMITÁ</CHOICE></CHOICES>" } },
{ "PAL_Customer", new string[] { "Text", "Cliente", "PAL Field", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_Item", new string[] { "Text", "Item", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_ItemCode", new string[] { "Text", "Codice Articolo", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_ItemDescription", new string[] { "Text", "Descrizione Articolo", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_SerialNumber", new string[] { "Text", "Matricola Macchina", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } }
};
}
}
internal static Dictionary<string, string[]> QuotationCustomFields
{
get
{
return new Dictionary<string, string[]>()
{
{ "PAL_Quotation_Reason", new string[] { "Choice", "Causale", "PAL Field", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", "TRUE", "<CHOICES><CHOICE>01 VENDITA MACCHINE / IMPIANTI</CHOICE><CHOICE>02 VENDITA RICAMBI</CHOICE><CHOICE>04 VENDITA SERVIZI FUORI COMMESSA</CHOICE><CHOICE>08 VENDITA RIPARAZIONI</CHOICE><CHOICE>09 ENGINEERING</CHOICE><CHOICE>11 VENDITA E LAVORAZ.CONTO TERZI</CHOICE><CHOICE>55 PREVENDITE</CHOICE><CHOICE>NC NON CONFORMITÁ</CHOICE></CHOICES>" } },
{ "PAL_ID_Quotation", new string[] { "Text", "ID Offerta", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_Quotation_Name", new string[] { "Text", "Fornitore", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_Authors", new string[] { "Text", "Autore", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } }
};
}
}
internal static Dictionary<string, string[]> NonComplianceCustomFields
{
get
{
return new Dictionary<string, string[]>()
{
{ "PAL_NC_Source", new string[] {"Choice", "Sorgente", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", "<CHOICES><CHOICE>Interno</CHOICE><CHOICE>Cliente</CHOICE><CHOICE>Fornitore</CHOICE></CHOICES>" } },
{ "PAL_NC_Reference", new string[] { "Text", "Rifermento", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_NC_Nominative", new string[] { "Text", "Nominativo", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_NC_DateOfDetection", new string[] { "Text", "Data Rilevazione", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_NC_Project", new string[] { "Text", "Commessa", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_NC_ItemCode", new string[] { "Text", "Parte", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
{ "PAL_NC_PortalUrl", new string[] {"URL", "Portal", "PAL Field", "FALSE", "FALSE", "TRUE", "TRUE", "TRUE", "TRUE", string.Empty } },
};
}
}
}
+80
View File
@@ -0,0 +1,80 @@
using System.Collections;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Constants;
internal static class Folders
{
internal static Dictionary<string, string> GetProjectFolders(string projName)
{
var folderName = new Dictionary<string, string>
{
{ "01_Costificazioni", $"Commerciale {projName}" },
{ "02_Conferma_Ordine", $"Commerciale {projName}" },
{ "03_Amministrazione", $"Commerciale {projName}" },
{ "05_Documenti_di_Spedizione", $"Documenti {projName}" },
{ "07_Service", $"Documenti {projName}" },
{ "08_Specifiche_Tecniche_E_Meeting", $"Documenti {projName}" },
{ "10_Fornitori", $"Documenti {projName}" },
{ "11_Documenti_Tecnici", $"Documenti {projName}" }
};
return folderName;
}
internal static Dictionary<string, string> GetProjectQuickMenu(string projName, string subSiteUrl)
{
var itemQuickMenu = new Dictionary<string, string>
{
{ $"Commerciale {projName}", $"{subSiteUrl}/Commerciale%20{projName}" },
{ $"Documenti {projName}", $"{subSiteUrl}/Documenti%20{projName}" },
{ $"Media {projName}", $"{subSiteUrl}/Media%20{projName}" },
{ $"SottoCommesse {projName}", $"{subSiteUrl}/SottoCommesse%20{projName}" }
};
return itemQuickMenu;
}
internal static Dictionary<string, ListTemplateType> GetProjectDocLib(string ssProjectTitle)
{
var docLibNames = new Dictionary<string, ListTemplateType>
{
{ $"Documenti {ssProjectTitle}", ListTemplateType.DocumentLibrary },
{ $"Media {ssProjectTitle}", ListTemplateType.PictureLibrary },
{ $"SottoCommesse {ssProjectTitle}", ListTemplateType.DocumentLibrary },
{ $"Commerciale {ssProjectTitle}", ListTemplateType.DocumentLibrary },
};
return docLibNames;
}
internal static IEnumerable SubProjectDocSet
{
get
{
return new string[]
{
"09_Documenti_Tecnici",
"12_Disegni_Costruttivi",
"13_Manuali",
"15_Documentazione_Elettrica",
"16_Liste_Ricambi"
};
}
}
internal static IEnumerable OfferDocSet
{
get
{
string rev = "Rev. 1"; //TODO: Definire revisione
return new string[]
{
rev,
$"{rev}/01_Costificazione",
$"{rev}/02_Offerta",
$"{rev}/03_Meeting",
$"{rev}/04_Corrispondenza",
$"{rev}/08_Specifiche_Tecniche",
$"{rev}/10_Fornitori",
$"{rev}/11_Documenti_Tecnici",
$"{rev}/14_Foto"
};
}
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace console_spo_utils.Enums
{
internal enum PalFieldType
{
Project,
Quotation,
NonCompliance
}
}
@@ -0,0 +1,47 @@
using console_spo_utils.Interfaces.Repositories;
using Microsoft.SharePoint.Client;
using static System.Net.WebRequestMethods;
namespace console_spo_utils.Fakes.Repositories;
public class FakeNonComplianceSettingsRepository : INonComplianceRepository
{
public string DefaultNonComplianceSource()
{
return "Interno";
}
public string DefaultNonComplianceReference()
{
return "Italsort";
}
public string DefaultNonComplianceNominative()
{
return "Mario Issor";
}
public string DefaultNonComplianceDateOfDetection()
{
return "28-09-2022";
}
public string DefaultNonComplianceProject()
{
return "CT0001-001";
}
public string DefaultNonComplianceItemCode()
{
return "M24x3";
}
public FieldUrlValue DefaultNonCompliancePortalUrl()
{
return new FieldUrlValue
{
Description = "Vai a Portal",
Url = "https://portal.pal.local/"
};
}
}
@@ -0,0 +1,16 @@
using console_spo_utils.Interfaces.Repositories;
namespace console_spo_utils.Fakes.Repositories;
public class FakeProjectSettingsRepository:IProjectSettingsRepository
{
public string DefaultDlvReason(string projName)
{
return "02 VENDITA RICAMBI";
}
public string DefaultCostumer(string projName)
{
return "PAL";
}
}
@@ -0,0 +1,25 @@
using console_spo_utils.Interfaces.Repositories;
namespace console_spo_utils.Fakes.Repositories;
public class FakeQuotationSettingRepository:IQuotationRepository
{
public string DefaultIdQuotation(string quotationName)
{
return quotationName;
}
public string DefaultQuotationName(string quotationName)
{
return "Marchiol";
}
public string DefaultQuotationReason(string quotationName)
{
return "02 VENDITA RICAMBI";
}
public string DefaultAuthors(string quotationName)
{
return "User";
}
}
@@ -0,0 +1,42 @@
using console_spo_utils.Interfaces.Repositories;
namespace console_spo_utils.Fakes.Repositories;
public class FakeSubProjectRepository:ISubProjectRepository
{
public List<string> GetFromProject(string projName)
{
return new List<string>()
{
$"{projName}-001",
$"{projName}-002",
$"{projName}-003",
$"{projName}-004",
};
}
public string DefaultDescription(string projName)
{
return "AutomationTest c.s.";
}
public string DefaultItem(string projName)
{
return "Coclea";
}
public string DefaultItemCode(string projName)
{
return "C84M70";
}
public string DefaultItemDescription(string projName)
{
return "7m con le piastrelle";
}
public string DefaultSerialNumber(string projName)
{
return "S/N 000000988948e";
}
}
@@ -0,0 +1,15 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Repositories;
public interface INonComplianceRepository
{
public string DefaultNonComplianceSource();
public string DefaultNonComplianceReference();
public string DefaultNonComplianceNominative();
public string DefaultNonComplianceDateOfDetection();
public string DefaultNonComplianceProject();
public string DefaultNonComplianceItemCode();
public FieldUrlValue DefaultNonCompliancePortalUrl();
}
@@ -0,0 +1,7 @@
namespace console_spo_utils.Interfaces.Repositories;
public interface IProjectSettingsRepository
{
public string DefaultDlvReason(string projName);
public string DefaultCostumer(string projName);
}
@@ -0,0 +1,11 @@
namespace console_spo_utils.Interfaces.Repositories;
public interface IQuotationRepository
{
public string DefaultIdQuotation(string quotationName);
public string DefaultQuotationName(string quotationName);
public string DefaultQuotationReason(string quotationName);
public string DefaultAuthors(string quotationName);
}
@@ -0,0 +1,11 @@
namespace console_spo_utils.Interfaces.Repositories;
public interface ISubProjectRepository
{
public List<string> GetFromProject(string projName);
public string DefaultDescription(string projName);
public string DefaultItem(string projName);
public string DefaultItemCode(string projName);
public string DefaultItemDescription(string projName);
public string DefaultSerialNumber(string projName);
}
@@ -0,0 +1,6 @@
namespace console_spo_utils.Interfaces.Services;
internal interface INonComplianceBuildService
{
public void CreateIfNotExists(string nonComplianceName);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface INonComplianceDocLibraryService
{
public void Create(string libName, ClientContext ctx);
}
@@ -0,0 +1,9 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface INonComplianceDocSetService
{
public void Create(string nonComplianceName, string docLibraryName, string tenantName, ClientContext ctx);
}
@@ -0,0 +1,11 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IOneNoteService
{
public bool CreateFolderInsideProject(string projName, ClientContext ctx);
public bool CreateFolderInsideQuotation(string quotationName, ClientContext ctx);
public bool CreateFolderInsideNonCompliance(string quotationName, ClientContext ctx);
public void EnableFeature(ClientContext ctx);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IProjectDocLibraryService
{
void Create(string projName, ClientContext subSiteContext);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IProjectQuickMenuService
{
void CreateForProject(string projNames, ClientContext subSiteContext);
}
@@ -0,0 +1,8 @@
namespace console_spo_utils.Interfaces.Services;
internal interface IProjectService
{
public void BuildWebParts();
}
@@ -0,0 +1,10 @@
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IProjectYearService
{
public void CreateList(string listTitle, ClientContext ctx);
}
@@ -0,0 +1,6 @@
namespace console_spo_utils.Interfaces.Services;
internal interface IQuotationBuildService
{
void CreateIfNotExists(string quotationName);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IQuotationDocLibraryService
{
public void Create(string libName, ClientContext ctx);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IQuotationDocSetService
{
public void Create(string quotationName, string docLibraryName, string tenantName, ClientContext ctx);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface IRightsService
{
void DomainGroupRights(ClientContext ctx, string tenantName, string docLibName = "");
}
@@ -0,0 +1,10 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface ISharePointAuthenticationManager
{
ClientContext GetContext(Uri web);
Task<string> EnsureAccessTokenAsync(Uri resourceUri, string userPrincipalName, string userPassword);
void Dispose();
}
@@ -0,0 +1,14 @@
using console_spo_utils.Enums;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface ISharePointCustomOperation
{
bool SiteExist(ClientContext ctx);
bool ListExist(ClientContext ctx, string listTitle);
bool FolderExistsInsideList(ClientContext context, string listTitle, string folderName);
bool SiteFeaturesExist(ClientContext ctx, string featureName);
void PalCustomField(ClientContext ctx, PalFieldType et);
public bool ListContentTypeExist(ClientContext ctx, string listTitle, string contentTypeName);
}
@@ -0,0 +1,8 @@
namespace console_spo_utils.Interfaces.Services;
public interface ISharePointStructureBuilder
{
public bool BuildProject(string projName);
public bool BuildQuotation(string quotationName);
public bool BuildNonCompliance(string nonComplianceName);
}
@@ -0,0 +1,23 @@
using System.Security;
namespace console_spo_utils.Interfaces.Services;
internal interface ISiteOptions
{
public string TokenEndpoint { get; }
public string DefaultAadAppId { get; }
public Uri GetProjectYearSite();
public string GetProjYearTenant();
public string GetUser();
public SecureString GetPassword();
public string GetProjListTitle();
public Uri GetSubProjSite(string projName);
string GetQuotationTenant();
Uri GetQuotationSite();
string GetSubProjList(string projName);
public string GetQuotationLibrary();
public Uri GetProjectSite();
public string GetNonComplianceTenant();
public string GetNonComplianceLibrary();
public Uri GetNonComplianceSite();
}
@@ -0,0 +1,9 @@
namespace console_spo_utils.Interfaces.Services;
internal interface ISiteService
{
public bool CreateProjectSiteIfNotExists();
public bool CreateSubSiteIfNotExists(string projName);
public bool CreateQuotationSiteIfNotExists(string quotationName);
public bool CreateNonComplianceSiteIfNotExists(string nonComplianceName);
}
@@ -0,0 +1,8 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface ISubProjectBuilderService
{
bool SubProjectDocSet(string projName, List<string> subProjTitle);
}
@@ -0,0 +1,9 @@
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Interfaces.Services;
internal interface ISubSiteService
{
bool Create(string projName, ClientContext siteContext);
void AddColumnsToListView(string projName, ClientContext subSiteContext);
}
@@ -0,0 +1,11 @@
using console_spo_utils.Enums;
using System.Security;
namespace console_spo_utils.Interfaces.Services;
internal interface ITenantService
{
public void CreateForProject();
public void CreateForQuotation();
public void CreateForNonCompliance();
}
@@ -0,0 +1,9 @@
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.WebParts;
namespace console_spo_utils.Interfaces.Services;
internal interface IWebpartService
{
public void AddWebPart(Web web, LimitedWebPartManager mgr, string xmlSchema, string listName, string zoneName,int zoneId);
}
+11
View File
@@ -0,0 +1,11 @@
namespace console_spo_utils.Model
{
internal class ParentProj
{
public string ProjId { get; set; }
public string Description { get; set; }
public string Customer { get; set; }
public string DeliveryReason { get; set; }
public List<SubProj> SubProjects { get; set; }
}
}
+15
View File
@@ -0,0 +1,15 @@
namespace console_spo_utils.Model
{
internal class SubProj
{
public string ProjId { get; set; }
public string Description { get; set; }
public string Customer { get; set; }
public string DeliveryReason { get; set; }
public string Position { get; set; }
public string ItemCode { get; set; }
public string ItemDescription { get; set; }
public string SerialNumber { get; set; }
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace console_spo_utils.Model
{
internal class TokenWaitInfo
{
internal RegisteredWaitHandle Handle = null;
}
}
+60
View File
@@ -0,0 +1,60 @@
using console_spo_utils.Fakes.Repositories;
using console_spo_utils.Interfaces.Repositories;
using console_spo_utils.Interfaces.Services;
using console_spo_utils.Services;
using console_spo_utils.Workers;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace console_spo_utils
{
public static class Program
{
public static async Task Main(string[] args)
{
var host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddSharePointExtensions();
services.AddTransient<IProjectSettingsRepository, FakeProjectSettingsRepository>();
services.AddTransient<ISubProjectRepository, FakeSubProjectRepository>();
services.AddTransient<IQuotationRepository, FakeQuotationSettingRepository>();
services.AddTransient<INonComplianceRepository, FakeNonComplianceSettingsRepository>();
services.AddHostedService<MainWorker>();
})
.Build();
await host.RunAsync();
}
public static IServiceCollection AddSharePointExtensions(this IServiceCollection services)
{
services.AddTransient<IOneNoteService, OneNoteService>();
services.AddTransient<IProjectDocLibraryService, ProjectDocLibraryService>();
services.AddTransient<IProjectQuickMenuService, ProjectQuickMenuService>();
services.AddTransient<ISharePointStructureBuilder, SharePointStructureBuilderService>();
services.AddTransient<IProjectYearService, ProjectYearService>();
services.AddTransient<ISiteService, SiteService>();
services.AddSingleton<ISharePointAuthenticationManager, SharePointAuthenticationManager>();
services.AddSingleton<ISharePointCustomOperation, SharePointCustomOperation>();
services.AddSingleton<ISiteOptions, SiteOptions>();
services.AddTransient<IRightsService, RightsService>();
services.AddTransient<ISubSiteService, SubSiteService>();
services.AddTransient<ITenantService, TenantService>();
services.AddTransient<ISubProjectBuilderService, SubProjectBuilderService>();
services.AddTransient<IQuotationBuildService, QuotationBuildService>();
services.AddTransient<IQuotationDocLibraryService, QuotationDocLibraryService>();
services.AddTransient<IQuotationDocSetService, QuotationDocSetService>();
services.AddTransient<INonComplianceBuildService, NonComplianceBuildService>();
services.AddTransient<INonComplianceDocLibraryService, NonComplianceDocLibraryService>();
services.AddTransient<INonComplianceDocSetService, NonComplianceDocSetService>();
services.AddTransient<IWebpartService, WebpartService>();
services.AddTransient<IProjectService, ProjectService>();
return services;
}
}
}
@@ -0,0 +1,204 @@
using console_spo_utils.Model;
using Microsoft.SharePoint.Client;
using System.Collections.Concurrent;
using System.Text;
using System.Text.Json;
using System.Web;
using Microsoft.Extensions.Logging;
using console_spo_utils.Interfaces.Services;
namespace console_spo_utils.Services
{
internal sealed class SharePointAuthenticationManager : IDisposable, ISharePointAuthenticationManager
{
private readonly ILogger<SharePointAuthenticationManager> logger;
private readonly ISiteOptions siteOptions;
public SharePointAuthenticationManager(
ILogger<SharePointAuthenticationManager> logger,
ISiteOptions siteOptions)
{
this.logger = logger;
this.siteOptions = siteOptions;
}
private static readonly HttpClient HttpClient = new();
private static readonly SemaphoreSlim SemaphoreSlimTokens = new(1);
private AutoResetEvent tokenResetEvent = null;
private readonly ConcurrentDictionary<string, string> tokenCache = new();
private bool disposedValue;
#region CSOM
public ClientContext GetContext(Uri web)
{
var context = new ClientContext(web);
context.ExecutingWebRequest += (sender, e) =>
{
var accessToken = EnsureAccessTokenAsync(new Uri($"{web.Scheme}://{web.DnsSafeHost}"),
siteOptions.GetUser(),
new System.Net.NetworkCredential(string.Empty, siteOptions.GetPassword()).Password)
.GetAwaiter()
.GetResult();
e.WebRequestExecutor.RequestHeaders["Authorization"] = "Bearer " + accessToken;
};
return context;
}
public async Task<string> EnsureAccessTokenAsync(Uri resourceUri, string userPrincipalName, string userPassword)
{
var accessTokenFromCache = TokenFromCache(resourceUri, tokenCache);
if (accessTokenFromCache == null)
{
await SemaphoreSlimTokens.WaitAsync();
try
{
// No async methods are allowed in a lock section
var accessToken = await AcquireTokenAsync(resourceUri, userPrincipalName, userPassword);
logger.LogInformation($"Successfully requested new access token resource {resourceUri.DnsSafeHost} for user {userPrincipalName}");
AddTokenToCache(resourceUri, tokenCache, accessToken);
// Register a thread to invalidate the access token once's it's expired
tokenResetEvent = new AutoResetEvent(false);
var wi = new TokenWaitInfo();
wi.Handle = ThreadPool.RegisterWaitForSingleObject(
tokenResetEvent,
(state, timedOut) =>
{
if (!timedOut)
{
var internalWaitToken = (TokenWaitInfo)state;
if (internalWaitToken?.Handle is not null)
{
internalWaitToken.Handle.Unregister(null);
}
}
else
{
try
{
// Take a lock to ensure no other threads are updating the SharePoint Access token at this time
SemaphoreSlimTokens.Wait();
RemoveTokenFromCache(resourceUri, tokenCache);
logger.LogInformation($"Cached token for resource {resourceUri.DnsSafeHost} and user {userPrincipalName} expired");
}
catch (Exception ex)
{
logger.LogInformation($"Something went wrong during cache token invalidation: {ex.Message}");
RemoveTokenFromCache(resourceUri, tokenCache);
}
finally
{
SemaphoreSlimTokens.Release();
}
}
},
wi,
(uint)CalculateThreadSleep(accessToken).TotalMilliseconds,
true
);
return accessToken;
}
finally
{
SemaphoreSlimTokens.Release();
}
}
else
{
logger.LogInformation("OK - Execution Query");
return accessTokenFromCache;
}
}
private async Task<string> AcquireTokenAsync(Uri resourceUri, string username, string password)
{
var resource = $"{resourceUri.Scheme}://{resourceUri.DnsSafeHost}";
var clientId = siteOptions.DefaultAadAppId;
var body = $"resource={resource}&client_id={clientId}&grant_type=password&username={HttpUtility.UrlEncode(username)}&password={HttpUtility.UrlEncode(password)}";
using var stringContent = new StringContent(body, Encoding.UTF8, "application/x-www-form-urlencoded");
var result = await HttpClient.PostAsync(siteOptions.TokenEndpoint, stringContent).ContinueWith((response) =>
{
return response.Result.Content.ReadAsStringAsync().Result;
}).ConfigureAwait(false);
var tokenResult = JsonSerializer.Deserialize<JsonElement>(result);
var token = tokenResult.GetProperty("access_token").GetString();
return token;
}
private static string TokenFromCache(Uri web, ConcurrentDictionary<string, string> tokenCache)
{
if (tokenCache.TryGetValue(web.DnsSafeHost, out var accessToken))
{
return accessToken;
}
return null;
}
private static void AddTokenToCache(Uri web, ConcurrentDictionary<string, string> tokenCache, string newAccessToken)
{
if (tokenCache.TryGetValue(web.DnsSafeHost, out var currentAccessToken))
{
tokenCache.TryUpdate(web.DnsSafeHost, newAccessToken, currentAccessToken);
}
else
{
tokenCache.TryAdd(web.DnsSafeHost, newAccessToken);
}
}
private static void RemoveTokenFromCache(Uri web, ConcurrentDictionary<string, string> tokenCache)
{
tokenCache.TryRemove(web.DnsSafeHost, out _);
}
private static TimeSpan CalculateThreadSleep(string accessToken)
{
var token = new System.IdentityModel.Tokens.Jwt.JwtSecurityToken(accessToken);
var lease = GetAccessTokenLease(token.ValidTo);
lease = TimeSpan.FromSeconds(lease.TotalSeconds - TimeSpan.FromMinutes(5).TotalSeconds > 0 ? lease.TotalSeconds - TimeSpan.FromMinutes(5).TotalSeconds : lease.TotalSeconds);
return lease;
}
private static TimeSpan GetAccessTokenLease(DateTime expiresOn)
{
var now = DateTime.UtcNow;
var expires = expiresOn.Kind == DateTimeKind.Utc ? expiresOn : TimeZoneInfo.ConvertTimeToUtc(expiresOn);
var lease = expires - now;
return lease;
}
private void Dispose(bool disposing)
{
if (disposedValue)
{
return;
}
if (disposing)
{
if (tokenResetEvent is not null)
{
tokenResetEvent.Set();
tokenResetEvent.Dispose();
}
}
disposedValue = true;
}
public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
#endregion
}
}
@@ -0,0 +1,58 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
namespace console_spo_utils.Services;
internal class NonComplianceBuildService : INonComplianceBuildService
{
private readonly ISiteOptions siteOptions;
private readonly ISharePointAuthenticationManager sharePointAuthenticationManager;
private readonly ISharePointCustomOperation spc;
private readonly ITenantService tenantService;
private readonly INonComplianceDocLibraryService nonComplianceDocLibraryService;
private readonly INonComplianceDocSetService nonComplianceDocSetService;
private readonly ILogger<NonComplianceBuildService> logger;
public NonComplianceBuildService(
ISiteOptions siteOptions,
ISharePointAuthenticationManager sharePointAuthenticationManager,
ISharePointCustomOperation spc,
ITenantService tenantService,
INonComplianceDocLibraryService nonComplianceDocLibraryService,
INonComplianceDocSetService nonComplianceDocSetService,
ILogger<NonComplianceBuildService> logger)
{
this.siteOptions = siteOptions;
this.sharePointAuthenticationManager = sharePointAuthenticationManager;
this.spc = spc;
this.tenantService = tenantService;
this.nonComplianceDocLibraryService = nonComplianceDocLibraryService;
this.nonComplianceDocSetService = nonComplianceDocSetService;
this.logger = logger;
}
public void CreateIfNotExists(string nonComplianceName)
{
var site = siteOptions.GetNonComplianceSite();
var ctx = sharePointAuthenticationManager.GetContext(site);
var list = siteOptions.GetNonComplianceLibrary();
var tenant = siteOptions.GetNonComplianceTenant();
if (!spc.SiteExist(ctx))
{
tenantService.CreateForNonCompliance();
}
else if (!spc.ListExist(ctx, list))
{
nonComplianceDocLibraryService.Create(list, ctx);
}
else if (!spc.FolderExistsInsideList(ctx, list, nonComplianceName))
{
nonComplianceDocSetService.Create(nonComplianceName, list, tenant, ctx);
}
else
{
logger.LogInformation($"Quotation with {nonComplianceName} already exist");
}
}
}
@@ -0,0 +1,115 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class NonComplianceDocLibraryService : INonComplianceDocLibraryService
{
private readonly ILogger<NonComplianceDocLibraryService> logger;
public NonComplianceDocLibraryService(ILogger<NonComplianceDocLibraryService> logger)
{
this.logger = logger;
}
public void Create(string libName, ClientContext ctx)
{
try
{
#region New DocLib
Console.WriteLine($"> Inizializzata la fase di creazione '{libName}'.");
Web web = ctx.Web;
ctx.Load(web, w => w.RootFolder.WelcomePage, w => w.Url);
ListCreationInformation lci = new ListCreationInformation();
lci.Title = libName;
lci.TemplateType = (int)ListTemplateType.DocumentLibrary;
web.Lists.Add(lci);
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di creazione '{libName}'.");
#endregion
#region Field
Console.WriteLine($"> Inizializzata la fase di importazione dei campi '{libName}'.");
List list = ctx.Web.Lists.GetByTitle(libName);
var siteField = ctx.Site.RootWeb;
ctx.Load(list, l => l.Fields);
ctx.Load(siteField, s => s.Fields);
ctx.ExecuteQuery();
string[] fieldName = { "Sorgente", "Rifermento", "Nominativo", "Data Rilevazione", "Commessa", "Parte", "Portal" };
foreach (var fn in fieldName)
{
var Fields = siteField.Fields.GetByTitle(fn);
list.Fields.Add(Fields);
}
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di importazione dei campi '{libName}'.");
#endregion
#region View
Console.WriteLine($"> Inizializzata la fase di creazione della ListView '{libName}'.");
var views = list.Views;
ViewCreationInformation viewCreation = new ViewCreationInformation();
viewCreation.SetAsDefaultView = true;
viewCreation.Title = libName;
viewCreation.ViewTypeKind = ViewType.None;
viewCreation.ColumnWidth = "350";
viewCreation.ViewFields = new string[] { "Type", "Name", "Sorgente", "Rifermento", "Nominativo", "Data Rilevazione", "Commessa", "Parte", "Portal" };
var view = views.Add(viewCreation);
ctx.Load(view);
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di creazione della ListView '{viewCreation.Title}'.");
var customView = views.GetByTitle(viewCreation.Title);
customView.MobileView = true;
customView.MobileDefaultView = true;
customView.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Abilitata la visualizzazione su mobile '{viewCreation.Title}'.");
#endregion
#region Shortcut on Quickmenu
NavigationNodeCollection spNavNodeColl = web.Navigation.QuickLaunch;
NavigationNodeCreationInformation newNavNode = new NavigationNodeCreationInformation();
newNavNode.Title = $"{libName}";
newNavNode.Url = $"{web.Url}/{libName.Replace(" ", "%20").Replace("à", "")}";
newNavNode.AsLastNode = true;
spNavNodeColl.Add(newNavNode);
ctx.ExecuteQuery();
Console.WriteLine($"> Il menu rapido è stato aggiornato, il collegamento a {libName} è ora disponibile.");
#endregion
}
catch (Exception ex)
{
logger.LogError(ex, "NonComplianceDocLibraryService");
}
}
}
@@ -0,0 +1,108 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Repositories;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.DocumentSet;
namespace console_spo_utils.Services;
internal class NonComplianceDocSetService : INonComplianceDocSetService
{
private readonly ISharePointCustomOperation cpt;
private readonly IOneNoteService oneNoteService;
private readonly INonComplianceRepository nonComplianceRepository;
public NonComplianceDocSetService(
ISharePointCustomOperation cpt,
IOneNoteService oneNoteService,
INonComplianceRepository nonComplianceRepository)
{
this.cpt = cpt;
this.oneNoteService = oneNoteService;
this.nonComplianceRepository = nonComplianceRepository;
}
public void Create(string nonComplianceName, string docLibraryName, string tenantName, ClientContext ctx)
{
#region Context
var web = ctx.Web;
ctx.Load(web, w => w.Url);
List list = web.Lists.GetByTitle(docLibraryName);
ctx.Load(list, l => l.RootFolder, l => l.ContentTypes, l => l.Fields, l => l.ContentTypesEnabled);
ctx.ExecuteQuery();
list.ContentTypesEnabled = true;
list.Update();
if (!cpt.ListContentTypeExist(ctx, docLibraryName, "Set di documenti"))
{
var documentCT = ctx.Site.RootWeb.AvailableContentTypes.GetById("0x0120D5");
ctx.Load(documentCT);
ctx.ExecuteQuery();
var ctDocSet = new ContentTypeCreationInformation()
{
Name = "Set di documenti",
ParentContentType = documentCT
};
list.ContentTypes.Add(ctDocSet);
list.Update();
ctx.ExecuteQuery();
}
var ctData = list.ContentTypes.Where(c => c.Name == "Set di documenti");
var contentType = ctData.FirstOrDefault();
ctx.Load(contentType);
ctx.ExecuteQuery();
#endregion
Console.WriteLine($"> Inizializzata la fase di creazione per {nonComplianceName}.");
#region DocSet Field Entry
DocumentSet.Create(ctx, list.RootFolder, nonComplianceName, contentType.Id);
ctx.ExecuteQuery();
Console.WriteLine($"> DocumentSet {nonComplianceName} creata.");
var dsItem = list.RootFolder.Folders.GetByUrl(nonComplianceName).ListItemAllFields;
dsItem["PAL_NC_Source"] = nonComplianceRepository.DefaultNonComplianceSource();
dsItem["PAL_NC_Reference"] = nonComplianceRepository.DefaultNonComplianceReference();
dsItem["PAL_NC_Nominative"] = nonComplianceRepository.DefaultNonComplianceNominative();
dsItem["PAL_NC_DateOfDetection"] = nonComplianceRepository.DefaultNonComplianceDateOfDetection();
dsItem["PAL_NC_Project"] = nonComplianceRepository.DefaultNonComplianceProject();
dsItem["PAL_NC_ItemCode"] = nonComplianceRepository.DefaultNonComplianceItemCode();
dsItem["PAL_NC_PortalUrl"] = nonComplianceRepository.DefaultNonCompliancePortalUrl();
dsItem.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Field value update.");
#endregion
#region Quotation Folder
foreach (var name in Folders.OfferDocSet)
{
Console.WriteLine($"La sotto cartella {name} verrà creata in {nonComplianceName}");
var rPath = ResourcePath.FromDecodedUrl($"{nonComplianceName}/{name}");
list.RootFolder.AddSubFolderUsingPath(rPath);
}
ctx.ExecuteQuery();
oneNoteService.CreateFolderInsideNonCompliance(nonComplianceName, ctx);
Console.WriteLine($"Le sotto cartelle sono state create con successo in {nonComplianceName}");
#endregion
Console.WriteLine($"> {nonComplianceName} creato con successo in Offerte/{docLibraryName}.");
}
}
@@ -0,0 +1,131 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class OneNoteService : IOneNoteService
{
private readonly ILogger<OneNoteService> logger;
private readonly ISiteOptions siteOptions;
private readonly ISharePointCustomOperation spc;
public OneNoteService(
ILogger<OneNoteService> logger,
ISiteOptions siteOptions,
ISharePointCustomOperation spc)
{
this.logger = logger;
this.siteOptions = siteOptions;
this.spc = spc;
}
public bool CreateFolderInsideProject(string projName, ClientContext ctx)
{
try
{
logger.LogInformation($"> Inizializzata la fase di creazione della sezione {projName} in OneNote.");
var list = ctx.Web.Lists.EnsureSiteAssetsLibrary();
ctx.Load(list, l => l.RootFolder);
ctx.ExecuteQuery();
var rPath = ResourcePath.FromDecodedUrl($"{siteOptions.GetProjYearTenant()} Notebook/{projName}");
list.RootFolder.AddSubFolderUsingPath(rPath);
ctx.ExecuteQuery();
logger.LogInformation($"> Completata la fase di creazione della sezione {projName} in OneNote.");
}
catch (Exception ex)
{
logger.LogError(ex, "OnenoteSPFeature");
return false;
}
return true;
}
public bool CreateFolderInsideQuotation(string quotationName, ClientContext ctx)
{
try
{
logger.LogInformation($"> Inizializzata la fase di creazione della sezione {quotationName} in OneNote.");
var list = ctx.Web.Lists.EnsureSiteAssetsLibrary();
ctx.Load(list, l => l.RootFolder);
ctx.ExecuteQuery();
if (!spc.FolderExistsInsideList(ctx, $"{siteOptions.GetQuotationTenant()} Notebook", $"{DateTime.Today.Year}"))
{
var rYearPath = ResourcePath.FromDecodedUrl($"{siteOptions.GetQuotationTenant()} Notebook/{DateTime.Today.Year}");
list.RootFolder.AddSubFolderUsingPath(rYearPath);
ctx.ExecuteQuery();
}
var rPath = ResourcePath.FromDecodedUrl($"{siteOptions.GetQuotationTenant()} Notebook/{DateTime.Today.Year}/{quotationName}");
list.RootFolder.AddSubFolderUsingPath(rPath);
ctx.ExecuteQuery();
logger.LogInformation($"> Completata la fase di creazione della sezione {quotationName} in OneNote.");
}
catch (Exception ex)
{
logger.LogError(ex, "OnenoteSPFeature");
return false;
}
return true;
}
public bool CreateFolderInsideNonCompliance(string quotationName, ClientContext ctx)
{
try
{
logger.LogInformation($"> Inizializzata la fase di creazione della sezione {quotationName} in OneNote.");
var list = ctx.Web.Lists.EnsureSiteAssetsLibrary();
ctx.Load(list, l => l.RootFolder);
ctx.ExecuteQuery();
if (!spc.FolderExistsInsideList(ctx, $"{siteOptions.GetNonComplianceTenant()} Notebook", $"{DateTime.Today.Year}"))
{
var rYearPath = ResourcePath.FromDecodedUrl($"{siteOptions.GetNonComplianceTenant()} Notebook/{DateTime.Today.Year}");
list.RootFolder.AddSubFolderUsingPath(rYearPath);
ctx.ExecuteQuery();
}
var rPath = ResourcePath.FromDecodedUrl($"{siteOptions.GetNonComplianceTenant()} Notebook/{DateTime.Today.Year}/{quotationName}");
list.RootFolder.AddSubFolderUsingPath(rPath);
ctx.ExecuteQuery();
logger.LogInformation($"> Completata la fase di creazione della sezione {quotationName} in OneNote.");
}
catch (Exception ex)
{
logger.LogError(ex, "OnenoteSPFeature");
return false;
}
return true;
}
public void EnableFeature(ClientContext ctx)
{
var featureName = "SiteNotebook";
var featureId = new Guid("f151bb39-7c3b-414f-bb36-6bf18872052f");
#region Feature Activate
if (!spc.SiteFeaturesExist(ctx, featureName))
{
ctx.Web.ActivateFeature(featureId);
ctx.ExecuteQuery();
logger.LogInformation($"> La Feature {featureName} è ora attiva!");
}
#endregion
}
}
@@ -0,0 +1,86 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class ProjectDocLibraryService : IProjectDocLibraryService
{
private readonly ILogger<ProjectDocLibraryService> logger;
private readonly IRightsService rightsService;
public ProjectDocLibraryService(
ILogger<ProjectDocLibraryService> logger,
IRightsService rightsService)
{
this.logger = logger;
this.rightsService = rightsService;
}
public void Create(string ssProjectTitle, ClientContext ctx)
{
try
{
BuildProjectDocumentLibrary(ssProjectTitle, ctx);
BuildProjectFolders(ssProjectTitle, ctx);
}
catch (Exception ex)
{
logger.LogError(ex, "Create Doc Lib");
}
}
private void BuildProjectFolders(string projName, ClientContext clientContext)
{
var projectFolders = Folders.GetProjectFolders(projName);
foreach (var (folderName, folderPath) in projectFolders)
{
logger.LogInformation($"> Inizializzata la fase di {folderName} in {folderPath}.");
var list = clientContext.Web.Lists.GetByTitle(folderPath);
var info = new ListItemCreationInformation
{
UnderlyingObjectType = FileSystemObjectType.Folder,
LeafName = folderName
};
var newItem = list.AddItem(info);
newItem["Title"] = folderName;
newItem.Update();
clientContext.ExecuteQuery();
logger.LogInformation($"> {folderName} creato con successo in {folderPath}.");
}
}
private void BuildProjectDocumentLibrary(string projName, ClientContext clientContext)
{
var docLibNames = Folders.GetProjectDocLib(projName);
foreach (var (libraryName, libraryType) in docLibNames)
{
logger.LogInformation($"> Inizializzata la fase di creazione '{libraryName}'.");
var web = clientContext.Web;
clientContext.Load(web);
var lci = new ListCreationInformation
{
Title = libraryName,
TemplateType = (int)libraryType
};
web.Lists.Add(lci);
clientContext.ExecuteQuery();
if (libraryName.Contains("Commerciale"))
{
rightsService.DomainGroupRights(clientContext, string.Empty, libraryName);
}
logger.LogInformation($"> '{libraryName}' è stato creato con successo.");
}
}
}
@@ -0,0 +1,86 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Navigation;
namespace console_spo_utils.Services;
internal class ProjectQuickMenuService : IProjectQuickMenuService
{
private readonly ILogger<ProjectQuickMenuService> logger;
private readonly ISiteOptions siteOptions;
public ProjectQuickMenuService(ILogger<ProjectQuickMenuService> logger
, ISiteOptions siteOptions)
{
this.logger = logger;
this.siteOptions = siteOptions;
}
public void CreateForProject(string projName, ClientContext ctx)
{
try
{
ClearQuickMenu(ctx);
var subSiteUrl = siteOptions.GetSubProjSite(projName).ToString();
var itemQuickMenu = Folders.GetProjectQuickMenu(projName, subSiteUrl);
var spNavNodeColl = ctx.Web.Navigation.QuickLaunch;
var newNavNode = new NavigationNodeCreationInformation();
ctx.Load(ctx.Web, w => w.RootFolder.WelcomePage);
foreach (var (name, path) in itemQuickMenu)
{
newNavNode.Title = name;
newNavNode.Url = path;
newNavNode.AsLastNode = true;
spNavNodeColl.Add(newNavNode);
ctx.ExecuteQuery();
logger.LogInformation($"> Il menu rapido è stato aggiornato in {projName}");
if (name != $"SottoCommesse {projName}")
{
continue;
}
ctx.Web.RootFolder.WelcomePage = $"SottoCommesse%20{projName}/Forms/SottoCommesse%20{projName}.aspx";
ctx.Web.RootFolder.Update();
ctx.ExecuteQuery();
}
}
catch (Exception ex)
{
logger.LogError(ex, "CreateForProject");
}
}
private void ClearQuickMenu(ClientContext ctx)
{
try
{
NavigationNodeCollection navBar = ctx.Web.Navigation.QuickLaunch;
ctx.Load(navBar);
ctx.ExecuteQueryRetry();
int[] element = new[] { 1, 1, 1 };
foreach (var e in element)
{
navBar[e].DeleteObject();
ctx.ExecuteQuery();
}
}
catch (Exception ex)
{
logger.LogError(ex, "ClearQuickMenu");
}
}
}
@@ -0,0 +1,115 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.WebParts;
namespace console_spo_utils.Services;
internal class ProjectService : IProjectService
{
private readonly ISiteOptions siteOptions;
private readonly ISharePointAuthenticationManager sharePointAuthenticationManager;
private readonly IWebpartService webpartService;
private readonly ILogger<ProjectService> logger;
public ProjectService(ISiteOptions siteOptions,
ISharePointAuthenticationManager sharePointAuthenticationManager,
IWebpartService webpartService,
ILogger<ProjectService> logger)
{
this.siteOptions = siteOptions;
this.sharePointAuthenticationManager = sharePointAuthenticationManager;
this.webpartService = webpartService;
this.logger = logger;
}
public void BuildWebParts()
{
try
{
string wpName = siteOptions.GetProjYearTenant();
var listView = GetListsId(siteOptions.GetProjListTitle(), Fields.SynthticProjTitle);
var ctx = sharePointAuthenticationManager.GetContext(siteOptions.GetProjectSite());
Web web = ctx.Web;
var file = web.GetFileByServerRelativeUrl("/sites/Commesse/SitePages/Home.aspx");
ctx.Load(web);
ctx.ExecuteQuery();
LimitedWebPartManager mgr = file.GetLimitedWebPartManager(PersonalizationScope.Shared);
string url = siteOptions.GetProjectYearSite() + "/Lists/" +
siteOptions.GetProjListTitle().Replace(" ", "%20") +
"/" + siteOptions.GetProjListTitle().Replace(" ", "%20") + ".aspx?viewid=";
string htmlSchema = $"<div><h1 style=\"font-weight: bold; font-size: 18pt; clear: both;\">{siteOptions.GetProjYearTenant()}</h1></div>" +
$"<div><p><a style=\"color: green\" href=\"{url}{listView[Fields.SynthticProjTitle[0]]}\">Progetti Macchina</a><br>Solo i progetti di vendita Macchine/Impianti</p></div>" +
$"<div><p><a style=\"color: green\" href=\"{url}{listView[Fields.SynthticProjTitle[1]]}\">Progetti Ricambi</a><br>Solo i progetti di vendita Ricambi</p></div>" +
$"<div><p><a style=\"color: green\" href=\"{url}{listView[Fields.SynthticProjTitle[2]]}\">Altri Progetti</a><br>Tutti gli altri progetti che non siano di vendita Macchine/Impianti o Ricambi</p></div>";
string xmlSchema = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<WebPart xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" +
" xmlns=\"http://schemas.microsoft.com/WebPart/v2\">" +
$"<Title>{siteOptions.GetProjYearTenant()}</Title><FrameType>None</FrameType>" +
"<Assembly>Microsoft.SharePoint, Version=13.0.0.0, Culture=neutral, " +
"PublicKeyToken=94de0004b6e3fcc5</Assembly>" +
"<TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>" +
"<ContentLink xmlns=\"http://schemas.microsoft.com/WebPart/v2/ContentEditor\" />" +
"<Content xmlns=\"http://schemas.microsoft.com/WebPart/v2/ContentEditor\">" +
$"<![CDATA[{htmlSchema}]]></Content>" +
"<PartStorage xmlns=\"http://schemas.microsoft.com/WebPart/v2/ContentEditor\" /></WebPart>";
webpartService.AddWebPart(web, mgr, xmlSchema, wpName, "Body", 0);
var qm = new NavigationNodeCreationInformation()
{
Title = siteOptions.GetProjYearTenant(),
Url = siteOptions.GetProjectYearSite().ToString(),
AsLastNode = true
};
web.Navigation.QuickLaunch.Add(qm);
ctx.ExecuteQuery();
}
catch (Exception ex)
{
logger.LogError(ex, "WebPart Build");
}
}
private Dictionary<string, string> GetListsId(string listTitle, string[] listViewTitle)
{
Dictionary<string, string> listViewId = new Dictionary<string, string>();
try
{
foreach (var lViewTitle in listViewTitle)
{
var ctx = sharePointAuthenticationManager.GetContext(siteOptions.GetProjectYearSite());
var list = ctx.Web.Lists.GetByTitle(listTitle);
ctx.Load(list.Views);
var listView = list.Views.GetByTitle(lViewTitle);
ctx.Load(listView, l => l.Id);
ctx.ExecuteQuery();
var id = listView.Id;
listViewId.Add(lViewTitle, id.ToString());
}
}
catch (Exception ex)
{
logger.LogError(ex, "Get List Id for Web Part");
}
return listViewId;
}
}
@@ -0,0 +1,169 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class ProjectYearService : IProjectYearService
{
private readonly ILogger<ProjectYearService> logger;
private readonly IProjectService projectService;
public ProjectYearService(
ILogger<ProjectYearService> logger,
IProjectService projectService)
{
this.logger = logger;
this.projectService = projectService;
}
public void CreateList(string listTitle, ClientContext ctx)
{
try
{
#region New List
Console.WriteLine($"> Inizializzata la fase di creazione della lista '{listTitle}'.");
Web web = ctx.Web;
ListCreationInformation creationInfo = new ListCreationInformation();
creationInfo.Title = listTitle;
creationInfo.TemplateType = (int)ListTemplateType.GenericList;
List oList = web.Lists.Add(creationInfo);
ctx.ExecuteQuery();
ctx.Load(oList, l => l.Fields);
var fld = oList.Fields.GetByInternalNameOrTitle("Title");
if (fld != null)
{
fld.Required = false;
fld.SetShowInDisplayForm(false);
fld.SetShowInEditForm(false);
fld.SetShowInNewForm(false);
oList.Update();
ctx.ExecuteQuery();
}
Console.WriteLine($"> La lista '{listTitle}' è stato creato con successo.");
#endregion
#region Field
Console.WriteLine($"> Inizializzata la fase di importazione dei campi '{listTitle}'.");
List list = ctx.Web.Lists.GetByTitle(listTitle);
var siteField = ctx.Site.RootWeb;
ctx.Load(list, l => l.Fields);
ctx.Load(siteField, s => s.Fields);
ctx.ExecuteQuery();
foreach (var fn in Fields.SiteFields)
{
var Fields = siteField.Fields.GetByTitle(fn);
list.Fields.Add(Fields);
}
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di importazione dei campi '{listTitle}'.");
#endregion
#region View
Console.WriteLine($"> Inizializzata la fase di creazione della ListView '{listTitle}'.");
var views = list.Views;
ViewCreationInformation viewCreation = new ViewCreationInformation();
viewCreation.Title = listTitle;
viewCreation.ViewTypeKind = ViewType.Html;
viewCreation.ColumnWidth = "350";
viewCreation.ViewFields = Fields.SiteFields;
viewCreation.SetAsDefaultView = true;
var view = views.Add(viewCreation);
ctx.Load(view);
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di creazione della ListView '{viewCreation.Title}'.");
var customView = views.GetByTitle(viewCreation.Title);
customView.MobileView = true;
customView.MobileDefaultView = true;
customView.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Abilitata la visualizzazione su mobile '{viewCreation.Title}'.");
ctx.Web.RootFolder.WelcomePage = $"Lists/{listTitle}/{listTitle}.aspx";
ctx.Web.RootFolder.Update();
ctx.ExecuteQuery();
CreateViewList(list, ctx);
projectService.BuildWebParts();
Console.WriteLine($"> Impostata come HomePage di '{viewCreation.Title}'");
#endregion
}
catch (Exception ex)
{
logger.LogError(ex, "Project Years");
}
}
public void CreateViewList(List list, ClientContext ctx)
{
try
{
foreach (KeyValuePair<string, string> listTitle in Fields.SyntheticProjList)
{
Console.WriteLine($"> Inizializzata la fase di creazione della ListView '{listTitle}'.");
var views = list.Views;
ViewCreationInformation viewCreation = new ViewCreationInformation();
viewCreation.Title = listTitle.Key;
viewCreation.ViewTypeKind = ViewType.Html;
viewCreation.ColumnWidth = "350";
viewCreation.ViewFields = Fields.SiteFields;
viewCreation.Query = $"<Where>{listTitle.Value}</Where>";
var view = views.Add(viewCreation);
ctx.Load(view);
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di creazione della ListView '{viewCreation.Title}'.");
var customView = views.GetByTitle(viewCreation.Title);
customView.MobileView = true;
customView.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Abilitata la visualizzazione su mobile '{viewCreation.Title}'.");
}
}
catch (Exception ex)
{
logger.LogError(ex, "Project Years");
}
}
}
@@ -0,0 +1,58 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
namespace console_spo_utils.Services;
internal class QuotationBuildService : IQuotationBuildService
{
private readonly ISiteOptions siteOptions;
private readonly ISharePointAuthenticationManager sharePointAuthenticationManager;
private readonly ISharePointCustomOperation spc;
private readonly ITenantService tenantService;
private readonly IQuotationDocLibraryService quotationDocLibraryService;
private readonly IQuotationDocSetService quotationDocSetService;
private readonly ILogger<QuotationBuildService> logger;
public QuotationBuildService(
ISiteOptions siteOptions,
ISharePointAuthenticationManager sharePointAuthenticationManager,
ISharePointCustomOperation spc,
ITenantService tenantService,
IQuotationDocLibraryService quotationDocLibraryService,
IQuotationDocSetService quotationDocSetService,
ILogger<QuotationBuildService> logger)
{
this.siteOptions = siteOptions;
this.sharePointAuthenticationManager = sharePointAuthenticationManager;
this.spc = spc;
this.tenantService = tenantService;
this.quotationDocLibraryService = quotationDocLibraryService;
this.quotationDocSetService = quotationDocSetService;
this.logger = logger;
}
public void CreateIfNotExists(string quotationName)
{
var site = siteOptions.GetQuotationSite();
var ctx = sharePointAuthenticationManager.GetContext(site);
var list = siteOptions.GetQuotationLibrary();
var tenant = siteOptions.GetQuotationTenant();
if (!spc.SiteExist(ctx))
{
tenantService.CreateForQuotation();
}
else if (!spc.ListExist(ctx, list))
{
quotationDocLibraryService.Create(list, ctx);
}
else if (!spc.FolderExistsInsideList(ctx, list, quotationName))
{
quotationDocSetService.Create(quotationName, list, tenant, ctx);
}
else
{
logger.LogInformation($"Quotation with {quotationName} already exist");
}
}
}
@@ -0,0 +1,115 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class QuotationDocLibraryService : IQuotationDocLibraryService
{
private readonly ILogger<QuotationDocLibraryService> logger;
public QuotationDocLibraryService(
ILogger<QuotationDocLibraryService> logger)
{
this.logger = logger;
}
public void Create(string libName, ClientContext ctx)
{
try
{
#region New DocLib
Console.WriteLine($"> Inizializzata la fase di creazione '{libName}'.");
Web web = ctx.Web;
ctx.Load(web, w => w.RootFolder.WelcomePage, w => w.Url);
ListCreationInformation lci = new ListCreationInformation();
lci.Title = libName;
lci.TemplateType = (int)ListTemplateType.DocumentLibrary;
web.Lists.Add(lci);
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di creazione '{libName}'.");
#endregion
#region Field
Console.WriteLine($"> Inizializzata la fase di importazione dei campi '{libName}'.");
List list = ctx.Web.Lists.GetByTitle(libName);
var siteField = ctx.Site.RootWeb;
ctx.Load(list, l => l.Fields);
ctx.Load(siteField, s => s.Fields);
ctx.ExecuteQuery();
string[] fieldName = { "ID Offerta", "Fornitore", "Causale", "Autore" };
foreach (var fn in fieldName)
{
var Fields = siteField.Fields.GetByTitle(fn);
list.Fields.Add(Fields);
}
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di importazione dei campi '{libName}'.");
#endregion
#region View
Console.WriteLine($"> Inizializzata la fase di creazione della ListView '{libName}'.");
var views = list.Views;
ViewCreationInformation viewCreation = new ViewCreationInformation();
viewCreation.SetAsDefaultView = true;
viewCreation.Title = libName;
viewCreation.ViewTypeKind = ViewType.None;
viewCreation.ColumnWidth = "350";
viewCreation.ViewFields = new string[] { "Type", "Name", "ID Offerta", "Fornitore", "Causale", "Autore" };
var view = views.Add(viewCreation);
ctx.Load(view);
ctx.ExecuteQuery();
Console.WriteLine($"> Completata la fase di creazione della ListView '{viewCreation.Title}'.");
var customView = views.GetByTitle(viewCreation.Title);
customView.MobileView = true;
customView.MobileDefaultView = true;
customView.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Abilitata la visualizzazione su mobile '{viewCreation.Title}'.");
#endregion
#region Shortcut on Quickmenu
NavigationNodeCollection spNavNodeColl = web.Navigation.QuickLaunch;
NavigationNodeCreationInformation newNavNode = new NavigationNodeCreationInformation();
newNavNode.Title = $"{libName}";
newNavNode.Url = $"{web.Url}/{libName.Replace(" ", "%20")}";
newNavNode.AsLastNode = true;
spNavNodeColl.Add(newNavNode);
ctx.ExecuteQuery();
Console.WriteLine($"> Il menu rapido è stato aggiornato, il collegamento a {libName} è ora disponibile.");
#endregion
}
catch (Exception ex)
{
logger.LogError(ex, "QuotationDocLibraryService");
}
}
}
@@ -0,0 +1,114 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Repositories;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.DocumentSet;
namespace console_spo_utils.Services;
internal class QuotationDocSetService : IQuotationDocSetService
{
private readonly ISharePointCustomOperation cpt;
private readonly ILogger<QuotationDocSetService> logger;
private readonly IOneNoteService oneNoteService;
private readonly IQuotationRepository quotationRepository;
public QuotationDocSetService(ISharePointCustomOperation cpt,
ILogger<QuotationDocSetService> logger,
IOneNoteService oneNoteService,
IQuotationRepository quotationRepository)
{
this.cpt = cpt;
this.logger = logger;
this.oneNoteService = oneNoteService;
this.quotationRepository = quotationRepository;
}
public void Create(string quotationName, string docLibraryName, string tenantName, ClientContext ctx)
{
try
{
#region Context
var web = ctx.Web;
ctx.Load(web, w => w.Url);
List list = web.Lists.GetByTitle(docLibraryName);
ctx.Load(list, l => l.RootFolder, l => l.ContentTypes, l => l.Fields, l => l.ContentTypesEnabled);
ctx.ExecuteQuery();
list.ContentTypesEnabled = true;
list.Update();
if (!cpt.ListContentTypeExist(ctx, docLibraryName, "Set di documenti"))
{
var documentCT = ctx.Site.RootWeb.AvailableContentTypes.GetById("0x0120D5");
ctx.Load(documentCT);
ctx.ExecuteQuery();
var ctDocSet = new ContentTypeCreationInformation()
{
Name = "Set di documenti",
ParentContentType = documentCT
};
list.ContentTypes.Add(ctDocSet);
list.Update();
ctx.ExecuteQuery();
}
var ctData = list.ContentTypes.Where(c => c.Name == "Set di documenti");
var contentType = ctData.FirstOrDefault();
ctx.Load(contentType);
ctx.ExecuteQuery();
#endregion
Console.WriteLine($"> Inizializzata la fase di creazione per {quotationName}.");
#region DocSet Field Entry
DocumentSet.Create(ctx, list.RootFolder, quotationName, contentType.Id);
ctx.ExecuteQuery();
Console.WriteLine($"> DocumentSet {quotationName} creata.");
var dsItem = list.RootFolder.Folders.GetByUrl(quotationName).ListItemAllFields;
dsItem["PAL_ID_Quotation"] = quotationRepository.DefaultIdQuotation(quotationName);
dsItem["PAL_Quotation_Name"] = quotationRepository.DefaultQuotationName(quotationName);
dsItem["PAL_Quotation_Reason"] = quotationRepository.DefaultQuotationReason(quotationName);
dsItem["PAL_Authors"] = quotationRepository.DefaultAuthors(quotationName);
dsItem.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Field value update.");
#endregion
#region Quotation Folder
foreach (var name in Folders.OfferDocSet)
{
Console.WriteLine($"La sotto cartella {name} verrà creata in {quotationName}");
var rPath = ResourcePath.FromDecodedUrl($"{quotationName}/{name}");
list.RootFolder.AddSubFolderUsingPath(rPath);
}
ctx.ExecuteQuery();
oneNoteService.CreateFolderInsideQuotation(quotationName, ctx);
Console.WriteLine($"Le sotto cartelle sono state create con successo in {quotationName}");
#endregion
Console.WriteLine($"> {quotationName} creato con successo in Offerte/{docLibraryName}.");
}
catch (Exception ex)
{
logger.LogError(ex, "");
}
}
}
+146
View File
@@ -0,0 +1,146 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services
{
internal class RightsService : IRightsService
{
private readonly ILogger<RightsService> logger;
public RightsService(ILogger<RightsService> logger)
{
this.logger = logger;
}
#region Rights
public void DomainGroupRights(ClientContext ctx, string tenantName, string docLibName = "")
{
#region Groups & Privileges
var itsAdGroupDictionary = new Dictionary<string, string>()
{
{ "ITS-SPO-PROJ-OWNER", "Full Control" },
{ "ITS-SPO-PROJ-DESIGN", "Design" },
{ "ITS-SPO-PROJ-MODIFY", "Edit" },
{ "ITS-SPO-PROJ-COLLABORATE", "Contribute" },
{ "ITS-SPO-PROJ-READ", "Read" }
};
var itsAdGruopSalesRole = new Dictionary<string, string>()
{
{ "ITS-SPO-PROJ-OWNER", "Full Control" },
{ "ITS-SPO-PROJ-SALES-MODIFY", "Edit" },
{ "ITS-SPO-PROJ-SALES-READ", "Read" }
};
var itsAdGruopNCRole = new Dictionary<string, string>()
{
{ "ITS-SPO-NC-OWNER", "Full Control" },
{ "ITS-SPO-NC-MODIFY", "Edit" },
{ "ITS-SPO-NC-READ", "Read" }
};
#endregion
logger.LogInformation("> Inizializzata la fase di assegnazione dei ruoli.");
try
{
if (tenantName.Contains("Commesse"))
{
#region Site Permission Create
var web = ctx.Web;
foreach (var role in itsAdGroupDictionary)
{
var adGroup = web.EnsureUser(role.Key);
ctx.Load(adGroup);
var roleD = web.RoleDefinitions.GetByName(role.Value);
var roleDb = new RoleDefinitionBindingCollection(ctx) { roleD };
web.RoleAssignments.Add(adGroup, roleDb);
web.Update();
}
ctx.ExecuteQuery();
logger.LogInformation("> Completata la fase di assegnazione dei ruoli.");
#endregion
}
else if (tenantName.Contains("Offerte"))
{
#region Site Permission Quotation
var web = ctx.Web;
foreach (var role in itsAdGruopSalesRole)
{
var adGroup = web.EnsureUser(role.Key);
ctx.Load(adGroup);
var roleD = web.RoleDefinitions.GetByName(role.Value);
var roleDb = new RoleDefinitionBindingCollection(ctx) { roleD };
web.RoleAssignments.Add(adGroup, roleDb);
web.Update();
}
ctx.ExecuteQuery();
logger.LogInformation("> Completata la fase di assegnazione dei ruoli.");
#endregion
}
else if (tenantName.Contains("Conformità"))
{
#region Site Permission Quotation
var web = ctx.Web;
foreach (var role in itsAdGruopNCRole)
{
var adGroup = web.EnsureUser(role.Key);
ctx.Load(adGroup);
var roleD = web.RoleDefinitions.GetByName(role.Value);
var roleDb = new RoleDefinitionBindingCollection(ctx) { roleD };
web.RoleAssignments.Add(adGroup, roleDb);
web.Update();
}
ctx.ExecuteQuery();
logger.LogInformation("> Completata la fase di assegnazione dei ruoli.");
#endregion
}
else if (!string.IsNullOrEmpty(docLibName))
{
#region DocLib Permission
var web = ctx.Web;
var list = web.Lists.GetByTitle(docLibName);
ctx.Load(list);
list.BreakRoleInheritance(false, true);
ctx.ExecuteQuery();
foreach (var role in itsAdGruopSalesRole)
{
var adGroup = web.EnsureUser(role.Key);
ctx.Load(adGroup);
var roleD = web.RoleDefinitions.GetByName(role.Value);
var roleDb = new RoleDefinitionBindingCollection(ctx) { roleD };
list.RoleAssignments.Add(adGroup, roleDb);
list.Update();
}
ctx.ExecuteQuery();
logger.LogInformation($"> Completata la fase di assegnazione dei ruoli in {docLibName}.");
#endregion
}
}
catch (Exception ex)
{
logger.LogError("Rights Service", ex);
}
}
#endregion
}
}
@@ -0,0 +1,159 @@
using console_spo_utils.Enums;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.SharePoint.Client;
using System.Security;
using System.Xml.Linq;
using console_spo_utils.Constants;
namespace console_spo_utils.Services
{
internal class SharePointCustomOperation : ISharePointCustomOperation
{
private readonly ILogger logger;
private readonly IRightsService rightsService;
private readonly ISharePointAuthenticationManager authMgr;
public SharePointCustomOperation(
ILogger<SharePointCustomOperation> logger,
IRightsService rightsService,
ISharePointAuthenticationManager authMgr)
{
this.logger = logger;
this.rightsService = rightsService;
this.authMgr = authMgr;
}
#region Check If Exist
public bool SiteExist(ClientContext ctx)
{
try
{
var web = ctx.Web;
ctx.Load(web, w => w.Title);
ctx.ExecuteQuery();
return true;
}
catch (Exception ex)
{
logger.LogWarning("Site Exists", ex);
return false;
}
}
public bool ListExist(ClientContext ctx, string listTitle)
{
try
{
var targetList = ctx.Web.Lists.GetByTitle(listTitle);
ctx.ExecuteQuery();
return true;
}
catch (Exception ex)
{
logger.LogWarning("List Exist", ex);
return false;
}
}
public bool FolderExistsInsideList(ClientContext context, string listTitle, string folderName)
{
var folderExists = context.Web.Lists.GetByTitle(listTitle).RootFolder;
context.Load(folderExists, f => f.Folders);
try
{
context.ExecuteQuery();
if (folderExists.Folders.Any(fn => fn.Name == folderName))
{
return true;
}
return false;
}
catch (Exception ex)
{
logger.LogWarning("Folder Exists Inside List", ex);
return false;
}
}
public bool SiteFeaturesExist(ClientContext ctx, string featureName)
{
var web = ctx.Web;
var wFeatures = web.Features;
ctx.Load(web);
ctx.Load(wFeatures);
ctx.ExecuteQuery();
foreach (var wFeature in wFeatures)
{
ctx.Load(wFeature, wf => wf.DisplayName);
ctx.ExecuteQuery();
logger.LogInformation(wFeature.DisplayName);
if (wFeature.DisplayName == featureName) return true;
}
return false;
}
public bool ListContentTypeExist(ClientContext ctx, string listTitle, string contentTypeName)
{
ContentTypeCollection cntCollection = ctx.Web.Lists.GetByTitle(listTitle).ContentTypes;
ctx.Load(cntCollection, cntyp => cntyp.Include(ct => ct.Name).Where(ct => ct.Name == contentTypeName));
ctx.ExecuteQuery();
if (!cntCollection.Any())
{
Console.WriteLine(cntCollection.Count);
return false;
}
else
{
Console.WriteLine(cntCollection.Count);
return true;
}
}
#endregion
public void PalCustomField(ClientContext ctx, PalFieldType et)
{
var fieldList = et switch
{
PalFieldType.Project => Fields.ProjectCustomFields,
PalFieldType.Quotation => Fields.QuotationCustomFields,
PalFieldType.NonCompliance => Fields.NonComplianceCustomFields,
_ => throw new NotImplementedException("Entity type not found")
};
try
{
var site = ctx.Site;
ctx.Load(site, w => w.RootWeb, w => w.RootWeb.Fields);
ctx.ExecuteQuery();
foreach (var f in fieldList)
{
var fieldXml = $"<Field Name='{f.Key}' Type='{f.Value[0]}' Description='' DisplayName='{f.Value[1]}' StaticName='{f.Key}' Group='{f.Value[2]}' Hidden='{f.Value[3]}' Required='{f.Value[4]}' Sealed='{f.Value[5]}' ShowInDisplayForm='{f.Value[6]}' ShowInEditForm='{f.Value[7]}' ShowInNewForm='{f.Value[8]}'>{f.Value[9]}</Field>";
site.RootWeb.Fields.AddFieldAsXml(fieldXml, false, AddFieldOptions.AddToDefaultContentType);
ctx.Load(site.RootWeb.Fields);
}
ctx.ExecuteQuery();
}
catch (Exception ex)
{
logger.LogError("PalCustomField", ex);
}
}
}
}
@@ -0,0 +1,82 @@
using System.Linq.Expressions;
using console_spo_utils.Interfaces.Repositories;
using console_spo_utils.Interfaces.Services;
namespace console_spo_utils.Services;
internal class SharePointStructureBuilderService : ISharePointStructureBuilder
{
private readonly ISiteService siteService;
private readonly ISubProjectRepository subProjectRepository;
private readonly ISubProjectBuilderService subProjectBuilderService;
private readonly IQuotationBuildService quotationBuildService;
private readonly INonComplianceBuildService nonComplianceBuildService;
private readonly IWebpartService webpartService;
public SharePointStructureBuilderService(
ISiteService siteService,
ISubProjectRepository subProjectRepository,
ISubProjectBuilderService subProjectBuilderService,
IQuotationBuildService quotationBuildService,
INonComplianceBuildService nonComplianceBuildService,
IWebpartService webpartService)
{
this.siteService = siteService;
this.subProjectRepository = subProjectRepository;
this.subProjectBuilderService = subProjectBuilderService;
this.quotationBuildService = quotationBuildService;
this.nonComplianceBuildService = nonComplianceBuildService;
this.webpartService = webpartService;
}
public bool BuildProject(string projName)
{
var siteBuilderResult = siteService.CreateProjectSiteIfNotExists();
if (!siteBuilderResult)
{
throw new Exception($"Impossibile to build site");
}
var subSiteBuilderResult = siteService.CreateSubSiteIfNotExists(projName);
if (!subSiteBuilderResult)
{
throw new Exception($"Impossibile to build subSite for {projName} ");
}
var subProjects = subProjectRepository.GetFromProject(projName);
var subProjectBuilderResult = subProjectBuilderService.SubProjectDocSet(projName, subProjects);
if (!subProjectBuilderResult)
{
throw new Exception($"Impossibile to build subSite for {projName} ");
}
return true;
}
public bool BuildQuotation(string quotationName)
{
var siteBuildResult = siteService.CreateQuotationSiteIfNotExists(quotationName);
if (!siteBuildResult)
{
throw new Exception($"Impossibile to build site");
}
quotationBuildService.CreateIfNotExists(quotationName);
return true;
}
public bool BuildNonCompliance(string nonComplianceName)
{
var siteBuildResult = siteService.CreateNonComplianceSiteIfNotExists(nonComplianceName);
if (!siteBuildResult)
{
throw new Exception($"Impossibile to build site");
}
nonComplianceBuildService.CreateIfNotExists(nonComplianceName);
return true;
}
}
+92
View File
@@ -0,0 +1,92 @@
using System.Net;
using System.Security;
using console_spo_utils.Interfaces.Services;
namespace console_spo_utils.Services;
public class SiteOptions : ISiteOptions
{
private const string SiteCollection = "https://italsortbuttrio.sharepoint.com";
public string TokenEndpoint { get; } = "https://login.microsoftonline.com/common/oauth2/token";
public string DefaultAadAppId { get; } = "46e6296e-176f-4ebb-a14b-bdd5678c16e6";
public Uri GetProjectYearSite()
{
return new Uri($"{SiteCollection}/sites/{GetProjYearTenant().Replace(" ","")}");
}
private static int GetYear()
{
return DateTime.Today.Year;
}
public string GetProjYearTenant()
{
return $"Commesse {GetYear()}";
}
public string GetUser()
{
return "svcItsSharePointAdmin@italsort.com";
}
public SecureString GetPassword()
{
return new NetworkCredential("", "$O,D1XBp1O5.OdjZt86#a=").SecurePassword;
}
public string GetProjListTitle()
{
return $"Lista {GetProjYearTenant()}";
}
public Uri GetSubProjSite(string projName)
{
return new Uri($"{GetProjectYearSite()}/{projName}");
}
public string GetQuotationTenant()
{
return "Offerte";
}
public string GetQuotationLibrary()
{
return $"{GetQuotationTenant()} {GetYear()}";
}
public Uri GetQuotationSite()
{
return new Uri($"{SiteCollection}/sites/{GetQuotationTenant()}");
}
public string GetSubProjList(string projName)
{
return $"SottoCommesse {projName}";
}
private string GetProjectTenant()
{
return "Commesse";
}
public Uri GetProjectSite()
{
return new Uri($"{SiteCollection}/sites/{GetProjectTenant()}");
}
public string GetNonComplianceTenant()
{
return "Non Conformità";
}
public string GetNonComplianceLibrary()
{
return $"{GetNonComplianceTenant()} {GetYear()}";
}
public Uri GetNonComplianceSite()
{
return new Uri($"{SiteCollection}/sites/{GetNonComplianceTenant().Replace(" ", String.Empty)}");
}
}
+185
View File
@@ -0,0 +1,185 @@
using console_spo_utils.Enums;
using console_spo_utils.Interfaces.Repositories;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class SiteService : ISiteService
{
private readonly ILogger<SiteService> logger;
private readonly ISharePointAuthenticationManager authMgr;
private readonly ISharePointCustomOperation spc;
private readonly ISiteOptions siteOptions;
private readonly ISubSiteService subSiteService;
private readonly IOneNoteService oneNoteService;
private readonly IProjectSettingsRepository projectSettingsRepository;
private readonly IProjectDocLibraryService projectDocLibraryService;
private readonly IProjectQuickMenuService projectQuickMenuService;
private readonly ITenantService tenantService;
private readonly IProjectYearService projectYearService;
public SiteService(
ILogger<SiteService> logger,
ISharePointAuthenticationManager authMgr,
ISharePointCustomOperation spc,
ISiteOptions siteOptions,
ISubSiteService subSiteService,
IOneNoteService oneNoteService,
IProjectSettingsRepository projectSettingsRepository,
IProjectDocLibraryService projectDocLibraryService,
IProjectQuickMenuService projectQuickMenuService,
ITenantService tenantService,
IProjectYearService projectYearService)
{
this.logger = logger;
this.authMgr = authMgr;
this.spc = spc;
this.siteOptions = siteOptions;
this.subSiteService = subSiteService;
this.oneNoteService = oneNoteService;
this.projectSettingsRepository = projectSettingsRepository;
this.projectDocLibraryService = projectDocLibraryService;
this.projectQuickMenuService = projectQuickMenuService;
this.tenantService = tenantService;
this.projectYearService = projectYearService;
}
public bool CreateProjectSiteIfNotExists()
{
try
{
var site = siteOptions.GetProjectYearSite();
var listTitle = siteOptions.GetProjListTitle();
using var ctx = authMgr.GetContext(site);
if (spc.SiteExist(ctx))
{
return true;
}
tenantService.CreateForProject();
projectYearService.CreateList(listTitle,ctx);
}
catch (Exception e)
{
logger.LogError(e, "Site Service");
return false;
}
return true;
}
public bool CreateSubSiteIfNotExists(string projName)
{
var projectSite = siteOptions.GetProjectYearSite();
var subProjSite = siteOptions.GetSubProjSite(projName);
var siteContext = authMgr.GetContext(projectSite);
var subSiteContext = authMgr.GetContext(subProjSite);
if (!spc.SiteExist(siteContext))
{
throw new Exception($"Site {siteContext.Url} not exists");
}
if (spc.SiteExist(subSiteContext))
{
logger.LogInformation($"The subsite {subSiteContext.Url} already exists");
return true;
}
var existSubSite = subSiteService.Create(projName, siteContext);
if (!existSubSite)
{
return true;
}
oneNoteService.CreateFolderInsideProject(projName, siteContext);
CreateProjectListEntry(projName, siteContext);
projectDocLibraryService.Create(projName, subSiteContext);
subSiteService.AddColumnsToListView(projName, subSiteContext);
projectQuickMenuService.CreateForProject(projName, subSiteContext);
return true;
}
public bool CreateQuotationSiteIfNotExists(string quotationName)
{
try
{
var site = siteOptions.GetQuotationSite();
using var ctx = authMgr.GetContext(site);
if (spc.SiteExist(ctx))
{
return true;
}
tenantService.CreateForQuotation();
}
catch (Exception e)
{
logger.LogError(e, "Site Service");
return false;
}
return true;
}
public bool CreateNonComplianceSiteIfNotExists(string nonComplianceName)
{
try
{
var site = siteOptions.GetNonComplianceSite();
using var ctx = authMgr.GetContext(site);
if (spc.SiteExist(ctx))
{
return true;
}
tenantService.CreateForNonCompliance();
}
catch (Exception e)
{
logger.LogError(e, "Site Service");
return false;
}
return true;
}
private void CreateProjectListEntry(string projName, ClientContext ctx)
{
try
{
var listTitle = siteOptions.GetProjListTitle();
var tenant = siteOptions.GetProjYearTenant().Replace(" ",string.Empty);
var list = ctx.Web.Lists.GetByTitle(listTitle);
var itemCreateInfo = new ListItemCreationInformation();
var oItem = list.AddItem(itemCreateInfo);
var link = new FieldUrlValue
{
Url = $"/sites/{tenant}/{projName}",
Description = projName
};
oItem["PAL_ID_Project"] = link;
oItem["PAL_Customer"] = projectSettingsRepository.DefaultCostumer(projName);
oItem["PAL_DlvReason"] = projectSettingsRepository.DefaultDlvReason(projName);
oItem.Update();
ctx.ExecuteQuery();
logger.LogInformation($"> La Commessa {projName} è stata aggiunta alla lista {listTitle} con successo!");
}
catch (Exception ex)
{
logger.LogError(ex, "Create List Entry");
}
}
}
@@ -0,0 +1,128 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Repositories;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client.DocumentSet;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class SubProjectBuilderService : ISubProjectBuilderService
{
private readonly ISiteOptions siteOptions;
private readonly ISharePointCustomOperation cpt;
private readonly ISharePointAuthenticationManager authMgr;
private readonly ISubProjectRepository subProjectRepository;
private readonly ILogger<SubProjectBuilderService> logger;
public SubProjectBuilderService(ISiteOptions siteOptions,
ISharePointCustomOperation cpt,
ISharePointAuthenticationManager authMgr,
ISubProjectRepository subProjectRepository,
ILogger<SubProjectBuilderService> logger)
{
this.siteOptions = siteOptions;
this.cpt = cpt;
this.authMgr = authMgr;
this.subProjectRepository = subProjectRepository;
this.logger = logger;
}
public bool SubProjectDocSet(string projName, List<string> subProjTitle)
{
try
{
#region Context
var listTitle = siteOptions.GetSubProjList(projName);
var subSite = siteOptions.GetSubProjSite(projName);
var ctx = authMgr.GetContext(subSite);
var web = ctx.Web;
ctx.Load(web, w => w.Url);
var list = web.Lists.GetByTitle(listTitle);
ctx.Load(list, l => l.RootFolder, l => l.ContentTypes, l => l.Fields, l => l.ContentTypesEnabled);
ctx.ExecuteQuery();
list.ContentTypesEnabled = true;
list.Update();
if (cpt.ListContentTypeExist(ctx, listTitle, "Set di documenti") == false)
{
var documentCT = ctx.Site.RootWeb.AvailableContentTypes.GetById("0x0120D5");
ctx.Load(documentCT);
ctx.ExecuteQuery();
var ctDocSet = new ContentTypeCreationInformation()
{
Name = "Set di documenti",
ParentContentType = documentCT
};
list.ContentTypes.Add(ctDocSet);
list.Update();
ctx.ExecuteQuery();
}
var ctData = list.ContentTypes.Where(c => c.Name == "Set di documenti");
var contentType = ctData.FirstOrDefault();
ctx.Load(contentType);
ctx.ExecuteQuery();
#endregion
foreach (var spt in subProjTitle)
{
if (cpt.FolderExistsInsideList(ctx, listTitle, spt) == false)
{
Console.WriteLine($"> Inizializzata la fase di creazione per {spt}.");
#region DocSet Field Entry
DocumentSet.Create(ctx, list.RootFolder, spt, contentType.Id);
ctx.ExecuteQuery();
Console.WriteLine($"> DocumentSet {spt} creata.");
var dsItem = list.RootFolder.Folders.GetByUrl(spt).ListItemAllFields;
dsItem["_ExtendedDescription"] = subProjectRepository.DefaultDescription(projName);
dsItem["PAL_Item"] = subProjectRepository.DefaultItem(projName);
dsItem["PAL_ItemCode"] = subProjectRepository.DefaultItemCode(projName);
dsItem["PAL_ItemDescription"] = subProjectRepository.DefaultItemDescription(projName);
dsItem["PAL_SerialNumber"] = subProjectRepository.DefaultSerialNumber(projName);
dsItem.Update();
ctx.ExecuteQuery();
Console.WriteLine($"> Field value update.");
#endregion
#region SubProject Folder
foreach (var name in Folders.SubProjectDocSet)
{
Console.WriteLine($"La sotto cartella {name} verrà creata in {spt}");
var rPath = ResourcePath.FromDecodedUrl($"{spt}/{name}");
list.RootFolder.AddSubFolderUsingPath(rPath);
}
ctx.ExecuteQuery();
Console.WriteLine($"Le sotto cartelle sono state create con successo in {spt}");
#endregion
Console.WriteLine($"> {spt} creato con successo in SottoCommesse {projName}.");
}
}
}
catch (Exception ex)
{
logger.LogError(ex,"Sub Proj Doc Set");
return false;
}
return true;
}
}
@@ -0,0 +1,114 @@
using console_spo_utils.Constants;
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
namespace console_spo_utils.Services;
internal class SubSiteService : ISubSiteService
{
private readonly ILogger<SubSiteService> logger;
private readonly IProjectQuickMenuService projectQuickMenuService;
public SubSiteService(ILogger<SubSiteService> logger,
IProjectQuickMenuService projectQuickMenuService)
{
this.logger = logger;
this.projectQuickMenuService = projectQuickMenuService;
}
public bool Create(string projName, ClientContext siteContext)
{
try
{
logger.LogInformation($"> Il sito {projName} è in fase di creazione!");
var wci = new WebCreationInformation
{
Url = projName,
Title = projName,
UseSamePermissionsAsParentSite = true,
WebTemplate = "SITEPAGEPUBLISHING#0"
};
var web = siteContext.Site.RootWeb.Webs.Add(wci);
siteContext.ExecuteQuery();
logger.LogInformation($"> Il sito {projName} è stato creato con successo!");
}
catch (Exception ex)
{
logger.LogError("Create Sub Site", ex);
return false;
}
return true;
}
public void AddColumnsToListView(string ssProjectTitle, ClientContext ctx)
{
try
{
var listTitle = $"SottoCommesse {ssProjectTitle}";
#region Field
logger.LogInformation($"> Inizializzata la fase di importazione dei campi in 'SottoCommesse {ssProjectTitle}'.");
var web = ctx.Web;
var list = web.Lists.GetByTitle(listTitle);
var siteField = ctx.Site.RootWeb;
ctx.Load(list, l => l.Fields);
ctx.Load(siteField, s => s.Fields);
ctx.ExecuteQuery();
AddFieldsToSubProj(siteField, list, ctx);
logger.LogInformation($"> Completata la fase di importazione dei campi in 'SottoCommesse {ssProjectTitle}'.");
#endregion
#region View
logger.LogInformation($"> Inizializzata la fase di creazione della ListView '{listTitle}'.");
var views = list.Views;
var viewCreation = new ViewCreationInformation
{
SetAsDefaultView = true,
Title = listTitle,
ViewTypeKind = ViewType.None,
ColumnWidth = "350",
ViewFields = Fields.SubProject
};
var view = views.Add(viewCreation);
ctx.Load(view);
ctx.ExecuteQuery();
logger.LogInformation($"> Completata la fase di creazione della ListView '{viewCreation.Title}'.");
var customView = views.GetByTitle(viewCreation.Title);
customView.MobileView = true;
customView.MobileDefaultView = true;
customView.Update();
ctx.ExecuteQuery();
logger.LogInformation($"> Abilitata la visualizzazione su mobile '{viewCreation.Title}'.");
#endregion
}
catch (Exception ex)
{
logger.LogError("Create Sub Site", ex);
}
}
private static void AddFieldsToSubProj(Web siteField, List list, ClientContext ctx)
{
foreach (var fieldName in Fields.SubSiteProject)
{
var fields = siteField.Fields.GetByTitle(fieldName);
list.Fields.Add(fields);
}
ctx.ExecuteQuery();
}
}
+108
View File
@@ -0,0 +1,108 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.Online.SharePoint.TenantAdministration;
using console_spo_utils.Enums;
namespace console_spo_utils.Services;
internal class TenantService : ITenantService
{
private readonly ISharePointAuthenticationManager authMgr;
private readonly ISharePointCustomOperation cpt;
private readonly IRightsService rightsService;
private readonly IOneNoteService oneNoteService;
private readonly ILogger<TenantService> logger;
private readonly ISiteOptions siteOptions;
public TenantService(
ISharePointAuthenticationManager authMgr,
ISharePointCustomOperation cpt,
IRightsService rightsService,
IOneNoteService oneNoteService,
ILogger<TenantService> logger,
ISiteOptions siteOptions)
{
this.authMgr = authMgr;
this.cpt = cpt;
this.rightsService = rightsService;
this.oneNoteService = oneNoteService;
this.logger = logger;
this.siteOptions = siteOptions;
}
public void CreateForProject()
{
TenantCreation(
siteOptions.GetProjYearTenant(),
siteOptions.GetProjectYearSite(),
PalFieldType.Project
);
}
public void CreateForQuotation()
{
TenantCreation(
siteOptions.GetQuotationTenant(),
siteOptions.GetQuotationSite(),
PalFieldType.Quotation
);
}
public void CreateForNonCompliance()
{
TenantCreation(
siteOptions.GetNonComplianceTenant(),
siteOptions.GetNonComplianceSite(),
PalFieldType.NonCompliance
);
}
public void TenantCreation(string tenantName, Uri site, PalFieldType fieldType)
{
Console.WriteLine($"> Inizializzata la fase di creazione del sito '../{tenantName.Replace(" ", string.Empty)}'.");
string siteAdmin = "https://italsortbuttrio-admin.sharepoint.com";
Uri path = new Uri(siteAdmin);
var tenantCtx = authMgr.GetContext(path);
var ctx = authMgr.GetContext(site);
try
{
var tenant = new Tenant(tenantCtx);
var scp = new SiteCreationProperties
{
Url = site.ToString(),
Title = tenantName,
Owner = siteOptions.GetUser(),
Template = "SITEPAGEPUBLISHING#0"
};
SpoOperation spo = tenant.CreateSite(scp);
tenantCtx.Load(tenant);
tenantCtx.Load(spo, i => i.IsComplete);
tenantCtx.ExecuteQuery();
while (!spo.IsComplete)
{
Console.WriteLine($"Il sito '../{scp.Title}' è in fase di pubblicazione.");
System.Threading.Thread.Sleep(30000);
spo.RefreshLoad();
tenantCtx.ExecuteQuery();
}
Console.WriteLine($"> Il sito è stato creato con successo. ({site})");
rightsService.DomainGroupRights(ctx, tenantName, string.Empty);
oneNoteService.EnableFeature(ctx);
cpt.PalCustomField(ctx, fieldType);
}
catch (Exception ex)
{
logger.LogError(ex, "Tenant Creation");
}
}
}
@@ -0,0 +1,40 @@
using console_spo_utils.Interfaces.Services;
using Microsoft.Extensions.Logging;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.WebParts;
namespace console_spo_utils.Services
{
internal class WebpartService : IWebpartService
{
private readonly ILogger<WebpartService> logger;
private readonly ISharePointAuthenticationManager authMgr;
private readonly ISiteOptions siteOptions;
public WebpartService(
ILogger<WebpartService> logger,
ISharePointAuthenticationManager authMgr,
ISiteOptions siteOptions)
{
this.logger = logger;
this.authMgr = authMgr;
this.siteOptions = siteOptions;
}
public void AddWebPart(Web web, LimitedWebPartManager mgr, string xmlSchema, string listName, string zoneName, int zoneId)
{
try
{
WebPartDefinition def = mgr.ImportWebPart(xmlSchema);
def.WebPart.Hidden = false;
mgr.AddWebPart(def.WebPart, zoneName, zoneId);
mgr.Context.ExecuteQuery();
}
catch (Exception ex)
{
logger.LogError(ex, "Project Years");
}
}
}
}
+48
View File
@@ -0,0 +1,48 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using console_spo_utils.Interfaces.Services;
namespace console_spo_utils.Workers
{
internal class MainWorker : BackgroundService
{
private readonly ISharePointStructureBuilder structureBuilder;
private readonly ILogger<MainWorker> logger;
public MainWorker(
ISharePointStructureBuilder structureBuilder,
ILogger<MainWorker> logger)
{
this.structureBuilder = structureBuilder;
this.logger = logger;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
var buildProjectsResult = structureBuilder.BuildProject("CT0000");
if (!buildProjectsResult)
{
logger.LogError("Impossible to create structure");
return;
}
var buildQuotationResult = structureBuilder.BuildQuotation("OF0001");
if (!buildQuotationResult)
{
logger.LogError("Impossible to create structure");
return;
}
var buildNonComplianceResult = structureBuilder.BuildNonCompliance("NC0002");
if (!buildNonComplianceResult)
{
logger.LogError("Impossible to create structure");
return;
}
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="6.0.8" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.0.9" />
<PackageReference Include="Microsoft.SharePoint.Client" Version="14.0.4762.1000" />
<PackageReference Include="Microsoft.SharePointOnline.CSOM" Version="16.1.22615.12000" />
<PackageReference Include="PnP.Core" Version="1.7.0" />
<PackageReference Include="PnP.Core.Admin" Version="1.7.0" />
<PackageReference Include="PnP.Core.Auth" Version="1.7.0" />
<PackageReference Include="SharePointPnPCoreOnline" Version="3.28.2012" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.22.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Fakes\Repositories\" />
</ItemGroup>
</Project>
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
@@ -0,0 +1 @@
obj\Debug\net6.0\\_IsIncrementalBuild
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("console_spo_utils")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("console_spo_utils")]
[assembly: System.Reflection.AssemblyTitleAttribute("console_spo_utils")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generato dalla classe WriteCodeFragment di MSBuild.
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = console_spo_utils
build_property.ProjectDir = C:\Sources\VS\console_spo_utils\console_spo_utils\
@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
@@ -0,0 +1,207 @@
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\console_spo_utils.exe
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\console_spo_utils.deps.json
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\console_spo_utils.runtimeconfig.json
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\console_spo_utils.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\console_spo_utils.pdb
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.csproj.AssemblyReference.cache
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.GeneratedMSBuildEditorConfig.editorconfig
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.AssemblyInfoInputs.cache
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.AssemblyInfo.cs
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.csproj.CoreCompileInputs.cache
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\refint\console_spo_utils.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.pdb
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.genruntimeconfig.cache
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\ref\console_spo_utils.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.JsonWebTokens.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.Logging.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.Tokens.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.Runtime.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.IdentityModel.Tokens.Jwt.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\obj\Debug\net6.0\console_spo_utils.csproj.CopyComplete
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Client.Policy.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Client.TranslationServices.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.SharePoint.Tools.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Online.SharePoint.Client.Tenant.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.ProjectServer.Client.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.DocumentManagement.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.Publishing.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.Search.Applications.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.Search.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.Taxonomy.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.UserProfiles.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.WorkflowServices.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\AngleSharp.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Net.Http.Formatting.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Web.Http.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Azure.ActiveDirectory.GraphClient.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Azure.KeyVault.Core.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Data.Edm.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Data.OData.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Data.Services.Client.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Graph.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Graph.Core.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Newtonsoft.Json.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\SharePointPnP.IdentityModel.Extensions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\OfficeDevPnP.Core.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Spatial.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.WindowsAzure.Storage.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\de\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\es\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fr\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\it\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ja\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ko\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ru\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hans\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hant\Microsoft.Data.Edm.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\de\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\es\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fr\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\it\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ja\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ko\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ru\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hans\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hant\Microsoft.Data.OData.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\de\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\es\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fr\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\it\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ja\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ko\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ru\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hans\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hant\Microsoft.Data.Services.Client.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\de\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\es\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fr\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\it\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ja\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ko\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ru\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hans\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hant\System.Spatial.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Bcl.AsyncInterfaces.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Identity.Client.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Text.Json.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Caching.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Caching.Memory.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.DependencyInjection.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Http.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.ObjectPool.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Options.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Primitives.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Identity.Client.Extensions.Msal.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Crm.Sdk.Proxy.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.PowerPlatform.Dataverse.Client.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Xrm.Sdk.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Rest.ClientRuntime.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Win32.SystemEvents.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Configuration.ConfigurationManager.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Drawing.Common.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Private.ServiceModel.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Runtime.Caching.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Security.Cryptography.Pkcs.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Security.Cryptography.ProtectedData.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Security.Cryptography.Xml.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Security.Permissions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.ServiceModel.Duplex.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.ServiceModel.Http.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.ServiceModel.Primitives.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.ServiceModel.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Windows.Extensions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\cs\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\de\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\es\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fr\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\it\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ja\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ko\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\pl\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\pt-BR\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ru\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\tr\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hans\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-Hant\System.Private.ServiceModel.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\netcoreapp3.0\System.Security.Cryptography.Pkcs.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.ApplicationInsights.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Authorization.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Components.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Components.Authorization.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Components.Forms.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Components.Web.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Components.WebAssembly.Authentication.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.AspNetCore.Metadata.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.JSInterop.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\PnP.Core.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\PnP.Core.Admin.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\PnP.Core.Auth.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.IO.Pipelines.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\TimeZoneConverter.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\net6.0\Microsoft.Win32.SystemEvents.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\unix\lib\net6.0\System.Drawing.Common.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Drawing.Common.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Security.Cryptography.ProtectedData.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Windows.Extensions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Hangfire.Core.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.Binder.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.CommandLine.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.FileExtensions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.Json.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Configuration.UserSecrets.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.FileProviders.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.FileProviders.Physical.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.FileSystemGlobbing.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Hosting.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Hosting.Abstractions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.Configuration.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.Console.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.Debug.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.EventLog.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Logging.EventSource.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\System.Diagnostics.EventLog.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\ca\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\de\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\es\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fa\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\fr\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\nb\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\nl\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\pt-BR\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\pt-PT\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\pt\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\tr-TR\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh-TW\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\zh\Hangfire.Core.resources.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Diagnostics.EventLog.Messages.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\runtimes\win\lib\net6.0\System.Diagnostics.EventLog.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.ApplicationPages.Administration.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.ApplicationPages.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Client.ServerRuntime.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.DesignTime.Activities.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Portal.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Publishing.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Security.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.Taxonomy.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.SharePoint.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Sharepoint.WorkflowActions.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Client.Education.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.DocumentManagement.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Policy.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Server.Search.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Server.UserProfiles.dll
C:\Sources\VS\console_spo_utils\console_spo_utils\bin\Debug\net6.0\Microsoft.Office.Server.dll
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("console_spoutils")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("console_spoutils")]
[assembly: System.Reflection.AssemblyTitleAttribute("console_spoutils")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generato dalla classe WriteCodeFragment di MSBuild.
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = console_spoutils
build_property.ProjectDir = C:\Sources\VS\console_spo_utils\console_spo_utils\
@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("library_spo_utils")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("library_spo_utils")]
[assembly: System.Reflection.AssemblyTitleAttribute("library_spo_utils")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generato dalla classe WriteCodeFragment di MSBuild.
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = library_spo_utils
build_property.ProjectDir = C:\Sources\VS\console_spo_utils\library_spo_utils\
@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
@@ -0,0 +1,125 @@
{
"format": 1,
"restore": {
"C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spo_utils.csproj": {}
},
"projects": {
"C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spo_utils.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spo_utils.csproj",
"projectName": "console_spo_utils",
"projectPath": "C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spo_utils.csproj",
"packagesPath": "C:\\Users\\cbo\\.nuget\\packages\\",
"outputPath": "C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files\\DevExpress 22.1\\Components\\Offline Packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\cbo\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 22.1.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\DevExpress 22.1\\Components\\System\\Components\\Packages": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"dependencies": {
"Hangfire.Core": {
"target": "Package",
"version": "[1.7.31, )"
},
"Microsoft.AspNetCore.Components.WebAssembly.Authentication": {
"target": "Package",
"version": "[6.0.8, )"
},
"Microsoft.Extensions.Hosting": {
"target": "Package",
"version": "[6.0.1, )"
},
"Microsoft.Extensions.Hosting.Abstractions": {
"target": "Package",
"version": "[6.0.0, )"
},
"Microsoft.PowerPlatform.Dataverse.Client": {
"target": "Package",
"version": "[1.0.9, )"
},
"Microsoft.SharePoint.Client": {
"target": "Package",
"version": "[14.0.4762.1000, )"
},
"Microsoft.SharePoint.Client.Online.CSOM": {
"target": "Package",
"version": "[15.0.4919.1000, )"
},
"Microsoft.SharePointOnline.CSOM": {
"target": "Package",
"version": "[16.1.22615.12000, )"
},
"PnP.Core": {
"target": "Package",
"version": "[1.7.0, )"
},
"PnP.Core.Admin": {
"target": "Package",
"version": "[1.7.0, )"
},
"PnP.Core.Auth": {
"target": "Package",
"version": "[1.7.0, )"
},
"SharePointPnPCoreOnline": {
"target": "Package",
"version": "[3.28.2012, )"
},
"System.IdentityModel.Tokens.Jwt": {
"target": "Package",
"version": "[6.22.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400\\RuntimeIdentifierGraph.json"
}
}
}
}
}
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\cbo\.nuget\packages\;C:\Program Files\DevExpress 22.1\Components\Offline Packages;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\cbo\.nuget\packages\" />
<SourceRoot Include="C:\Program Files\DevExpress 22.1\Components\Offline Packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.components.webassembly.authentication\6.0.8\buildTransitive\Microsoft.AspNetCore.Components.WebAssembly.Authentication.props" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.components.webassembly.authentication\6.0.8\buildTransitive\Microsoft.AspNetCore.Components.WebAssembly.Authentication.props')" />
</ImportGroup>
</Project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)system.text.json\6.0.2\build\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\6.0.2\build\System.Text.Json.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.components.analyzers\6.0.8\buildTransitive\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.components.analyzers\6.0.8\buildTransitive\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.targets')" />
</ImportGroup>
</Project>
@@ -0,0 +1,79 @@
{
"format": 1,
"restore": {
"C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spoutils.csproj": {}
},
"projects": {
"C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spoutils.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spoutils.csproj",
"projectName": "console_spoutils",
"projectPath": "C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\console_spoutils.csproj",
"packagesPath": "C:\\Users\\cbo\\.nuget\\packages\\",
"outputPath": "C:\\Sources\\VS\\console_spo_utils\\console_spo_utils\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\DevExpress 21.2\\Components\\Offline Packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\cbo\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 21.2.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\DevExpress 21.2\\Components\\System\\Components\\Packages": {},
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"dependencies": {
"Microsoft.SharePoint.Client": {
"target": "Package",
"version": "[14.0.4762.1000, )"
},
"System.IdentityModel.Tokens.Jwt": {
"target": "Package",
"version": "[6.21.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.301\\RuntimeIdentifierGraph.json"
}
}
}
}
}
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\cbo\.nuget\packages\;C:\Program Files (x86)\DevExpress 21.2\Components\Offline Packages;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.1</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\cbo\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\DevExpress 21.2\Components\Offline Packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
@@ -0,0 +1,117 @@
{
"format": 1,
"restore": {
"C:\\Sources\\VS\\console_spo_utils\\library_spo_utils\\library_spo_utils.csproj": {}
},
"projects": {
"C:\\Sources\\VS\\console_spo_utils\\library_spo_utils\\library_spo_utils.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Sources\\VS\\console_spo_utils\\library_spo_utils\\library_spo_utils.csproj",
"projectName": "library_spo_utils",
"projectPath": "C:\\Sources\\VS\\console_spo_utils\\library_spo_utils\\library_spo_utils.csproj",
"packagesPath": "C:\\Users\\cbo\\.nuget\\packages\\",
"outputPath": "C:\\Sources\\VS\\console_spo_utils\\library_spo_utils\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files\\DevExpress 22.1\\Components\\Offline Packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\cbo\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\DevExpress 22.1.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\DevExpress 22.1\\Components\\System\\Components\\Packages": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"dependencies": {
"Microsoft.AspNetCore.Components.WebAssembly.Authentication": {
"target": "Package",
"version": "[6.0.8, )"
},
"Microsoft.Extensions.Hosting": {
"target": "Package",
"version": "[6.0.1, )"
},
"Microsoft.Extensions.Hosting.Abstractions": {
"target": "Package",
"version": "[6.0.0, )"
},
"Microsoft.PowerPlatform.Dataverse.Client": {
"target": "Package",
"version": "[1.0.9, )"
},
"Microsoft.SharePoint.Client": {
"target": "Package",
"version": "[14.0.4762.1000, )"
},
"Microsoft.SharePointOnline.CSOM": {
"target": "Package",
"version": "[16.1.22615.12000, )"
},
"PnP.Core": {
"target": "Package",
"version": "[1.7.0, )"
},
"PnP.Core.Admin": {
"target": "Package",
"version": "[1.7.0, )"
},
"PnP.Core.Auth": {
"target": "Package",
"version": "[1.7.0, )"
},
"SharePointPnPCoreOnline": {
"target": "Package",
"version": "[3.28.2012, )"
},
"System.IdentityModel.Tokens.Jwt": {
"target": "Package",
"version": "[6.22.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400\\RuntimeIdentifierGraph.json"
}
}
}
}
}
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\cbo\.nuget\packages\;C:\Program Files\DevExpress 22.1\Components\Offline Packages;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\cbo\.nuget\packages\" />
<SourceRoot Include="C:\Program Files\DevExpress 22.1\Components\Offline Packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.components.webassembly.authentication\6.0.8\buildTransitive\Microsoft.AspNetCore.Components.WebAssembly.Authentication.props" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.components.webassembly.authentication\6.0.8\buildTransitive\Microsoft.AspNetCore.Components.WebAssembly.Authentication.props')" />
</ImportGroup>
</Project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)system.text.json\6.0.2\build\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\6.0.2\build\System.Text.Json.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.configuration.usersecrets\6.0.1\buildTransitive\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.components.analyzers\6.0.8\buildTransitive\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.components.analyzers\6.0.8\buildTransitive\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.targets')" />
</ImportGroup>
</Project>
File diff suppressed because it is too large Load Diff