Skip to content

Commit

Permalink
Merge pull request #129 from cjvandyk/5.5.800
Browse files Browse the repository at this point in the history
-Major code cleanup.
  • Loading branch information
cjvandyk authored Feb 14, 2024
2 parents 1bb0d5f + c8be452 commit dc82d91
Show file tree
Hide file tree
Showing 42 changed files with 191 additions and 239 deletions.
7 changes: 1 addition & 6 deletions Classes/Extensions.Azure.Blob.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//#pragma warning disable CS0162, CS1587, CS1591, CS1998, IDE0059, IDE0028

/// <summary>
/// <summary>
/// Author: Cornelius J. van Dyk blog.cjvandyk.com @cjvandyk
/// This code is provided under GNU GPL 3.0 and is a copyrighted work of the
/// author and contributors. Please see:
Expand All @@ -16,7 +14,6 @@
using System.Linq;
using System.Text.Json;
using static Extensions.Core; //NuGet Extensions.cs
using static System.Logit;

namespace Extensions.Azure
{
Expand Down Expand Up @@ -218,5 +215,3 @@ public static BlobObject ReadFromBlob(string blobName)
}
}
}

//#pragma warning restore CS0162, CS1587, CS1591, CS1998, IDE0059, IDE0028
9 changes: 1 addition & 8 deletions Classes/Extensions.CMail.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
#pragma warning disable CS0162, CS1587, CS1591, CS1998, IDE0059, IDE0028

/// <summary>
/// <summary>
/// Author: Cornelius J. van Dyk blog.cjvandyk.com @cjvandyk
/// This code is provided under GNU GPL 3.0 and is a copyrighted work of the
/// author and contributors. Please see:
/// https://github.com/cjvandyk/Extensions/blob/main/LICENSE
/// </summary>

using Microsoft.Graph;
using Microsoft.Graph.Me.SendMail;
using Microsoft.Graph.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static Extensions.Core;
using static Extensions.Identity.AuthMan;

namespace Extensions
{
Expand Down Expand Up @@ -166,5 +161,3 @@ internal static FileAttachment GetGraphFileAttachment(
}
}
}

#pragma warning restore CS0162, CS1587, CS1591, CS1998, IDE0059, IDE0028
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Graph;
using Microsoft.Online.SharePoint.TenantAdministration;
/// <summary>
/// Author: Cornelius J. van Dyk blog.cjvandyk.com @cjvandyk
/// This code is provided under GNU GPL 3.0 and is a copyrighted work of the
/// author and contributors. Please see:
/// https://github.com/cjvandyk/Extensions/blob/main/LICENSE
/// </summary>

using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using static Extensions.Core;
using static Extensions.Identity.AuthMan;
using static System.Logit;

namespace Extensions
{
/// <summary>
/// Class that carries the configuration for a given tenant.
/// </summary>
[Serializable]
public partial class Config
public partial class Configuration
{
/// <summary>
/// Settings contains the dictionary of all settings.
Expand All @@ -36,7 +33,7 @@ public partial class Config
/// <summary>
/// Empty constructor.
/// </summary>
public Config()
public Configuration()
{
}

Expand All @@ -47,7 +44,7 @@ public Config()
/// <param name="tenantString">The name of the tenant e.g. for
/// contoso.sharepoint.us it would be 'contoso'.</param>
/// <returns>The filename of the configuration JSON file.</returns>
internal string GetConfigFileName(string tenantString)
internal static string GetConfigFileName(string tenantString)
{
return $"UniversalConfig.{tenantString}.json";
}
Expand All @@ -59,7 +56,7 @@ internal string GetConfigFileName(string tenantString)
/// <param name="tenantString">The name of the tenant e.g. for
/// contoso.sharepoint.us it would be 'contoso'.</param>
/// <returns>The filename of the label JSON file.</returns>
internal string GetLabelsFileName(string tenantString)
internal static string GetLabelsFileName(string tenantString)
{
return $"Labels.{tenantString}.json";
}
Expand All @@ -85,7 +82,7 @@ internal void LoadConfig(string tenantString)
/// </summary>
/// <param name="filePath">The name of the file to load.</param>
/// <returns>A dictionary of strings from the JSON file.</returns>
internal Dictionary<string, string> LoadJSON(string filePath)
internal static Dictionary<string, string> LoadJSON(string filePath)
{
var result = new Dictionary<string, string>();
using (StreamReader reader = new StreamReader(filePath))
Expand Down
5 changes: 1 addition & 4 deletions Classes/Extensions.Constants.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//#pragma warning disable CS1587, CS1591

/// <summary>
/// <summary>
/// Author: Cornelius J. van Dyk blog.cjvandyk.com @cjvandyk
/// This code is provided under GNU GPL 3.0 and is a copyrighted work of the
/// author and contributors. Please see:
Expand Down Expand Up @@ -774,4 +772,3 @@ public enum TimeZone
#endregion TimeZone
}
}
//#pragma warning restore CS1587, CS1591
Loading

0 comments on commit dc82d91

Please sign in to comment.