Skip to content

Commit 0e9bd6f

Browse files
committed
Changed namespace, prepared for nuget package
1 parent ee5957b commit 0e9bd6f

File tree

70 files changed

+231
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+231
-228
lines changed

.cr/personal/FavoritesList/List.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Root Type="DevExpress.CodeRush.Foundation.CodePlaces.Options.FavoritesListContainer">
3+
<Options Language="Neutral">
4+
<Groups />
5+
</Options>
6+
</Root>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<ProjectReference Include="..\DigiKey.Api\OriginalCircuit.DigiKey.Api.csproj" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
14+
<PackageReference Include="RestSharp" Version="108.0.3" />
15+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
16+
</ItemGroup>
17+
18+
</Project>

DigiKey.Api.ConsoleClient/Program.cs

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
using DigiKey.Api.Client;
2-
using DigiKey.Api.Configuration;
3-
using DigiKey.Api.OAuth2;
1+
using OriginalCircuit.DigiKey.Api.Configuration;
2+
using OriginalCircuit.DigiKey.Api.Model;
3+
using OriginalCircuit.DigiKey.Api.OAuth2;
44
using System;
5-
using System.Threading.Tasks;
6-
using System.Linq;
7-
using DigiKey.Api.Model;
85
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Threading.Tasks;
98

10-
namespace DigiKey.Api.ConsoleClient
9+
namespace OriginalCircuit.DigiKey.Api.ConsoleClient
1110
{
1211
class Program
1312
{
@@ -30,9 +29,9 @@ static async Task Main(string[] args)
3029
}
3130

3231
//await Categories();
33-
await KeywordSearch();
32+
//await KeywordSearch();
3433
//await Manufacturers();
35-
//await ProductDetails();
34+
await ProductDetails();
3635
//await SuggestedParts();
3736
//await Taxonomy();
3837

DigiKey.Api.OAuth2ConsoleClient/DigiKey.Api.OAuth2ConsoleClient.csproj

-12
This file was deleted.

DigiKey.Api.ConsoleClient/DigiKey.Api.ConsoleClient.csproj DigiKey.Api.OAuth2ConsoleClient/OriginalCircuit.DigiKey.Api.OAuth2ConsoleClient.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<ProjectReference Include="..\DigiKey.Api\DigiKey.Api.csproj" />
9+
<ProjectReference Include="..\DigiKey.Api\OriginalCircuit.DigiKey.Api.csproj" />
1010
</ItemGroup>
1111

1212
</Project>

DigiKey.Api.OAuth2ConsoleClient/Program.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
using DigiKey.Api.Configuration;
2-
using DigiKey.Api.OAuth2;
1+
using OriginalCircuit.DigiKey.Api.Configuration;
2+
using OriginalCircuit.DigiKey.Api.OAuth2;
33
using System;
44
using System.Diagnostics;
55
using System.Net;
66
using System.Text;
77
using System.Threading.Tasks;
88
using System.Web;
99

10-
namespace DigiKey.Api.OAuth2ConsoleClient
10+
namespace OriginalCircuit.DigiKey.Api.OAuth2ConsoleClient
1111
{
1212
class Program
1313
{

DigiKey.Api/BaseApi.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using DigiKey.Api.Client;
1+
using OriginalCircuit.DigiKey.Api.Client;
22
using RestSharp;
33
using System.Collections.Generic;
44
using System.Threading.Tasks;
55

6-
namespace DigiKey.Api
6+
namespace OriginalCircuit.DigiKey.Api
77
{
88
public enum LocaleSite
99
{

DigiKey.Api/Client/ApiClient.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using DigiKey.Api.Configuration;
2-
using DigiKey.Api.OAuth2;
1+
using OriginalCircuit.DigiKey.Api.Configuration;
2+
using OriginalCircuit.DigiKey.Api.OAuth2;
33
using Newtonsoft.Json;
44
using RestSharp;
55
using System;
@@ -11,7 +11,7 @@
1111
using System.Text.RegularExpressions;
1212
using System.Threading.Tasks;
1313

14-
namespace DigiKey.Api.Client
14+
namespace OriginalCircuit.DigiKey.Api.Client
1515
{
1616
/// <summary>
1717
/// API client is mainly responsible for making the HTTP call to the API backend.
@@ -170,7 +170,7 @@ public async Task<RestResponse> CallApi(
170170
request.AddHeader("Content-Type", "application/json");
171171

172172
// set user agent
173-
RestClientOptions.UserAgent = "github.com/issus/DigiKey.Api/1.0.0";
173+
RestClientOptions.UserAgent = "github.com/issus/OriginalCircuit.DigiKey.Api/1.0.0";
174174

175175
RequestCount++;
176176

DigiKey.Api/Client/ApiException.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
using System;
1212

13-
namespace DigiKey.Api.Client
13+
namespace OriginalCircuit.DigiKey.Api.Client
1414
{
1515
/// <summary>
1616
/// API Exception

DigiKey.Api/Client/ApiResponse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections.Generic;
22

3-
namespace DigiKey.Api.Client
3+
namespace OriginalCircuit.DigiKey.Api.Client
44
{
55
/// <summary>
66
/// API Response

DigiKey.Api/Client/ExceptionFactory.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using RestSharp;
1313
using System;
1414

15-
namespace DigiKey.Api.Client
15+
namespace OriginalCircuit.DigiKey.Api.Client
1616
{
1717
/// <summary>
1818
/// A delegate to ExceptionFactory method

DigiKey.Api/Client/RateLimit.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Linq;
33

4-
namespace DigiKey.Api.Client
4+
namespace OriginalCircuit.DigiKey.Api.Client
55
{
66
public class RateLimit
77
{

DigiKey.Api/Client/SwaggerDateConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
using Newtonsoft.Json.Converters;
1212

13-
namespace DigiKey.Api.Client
13+
namespace OriginalCircuit.DigiKey.Api.Client
1414
{
1515
/// <summary>
1616
/// Formatter for 'date' swagger formats ss defined by full-date - RFC3339

DigiKey.Api/Configuration/ApiClientConfig.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using DigiKey.Api.Client;
1+
using OriginalCircuit.DigiKey.Api.Client;
22
using System;
33
using System.Collections.Generic;
44
using System.Configuration;
55
using System.Globalization;
66
using System.IO;
77
using System.Text.RegularExpressions;
88

9-
namespace DigiKey.Api.Configuration
9+
namespace OriginalCircuit.DigiKey.Api.Configuration
1010
{
1111
public class ApiClientConfig : ConfigurationHelper, IApiClientConfigHelper
1212
{
@@ -32,7 +32,7 @@ private ApiClientConfig()
3232
searchPaths.Add(Directory.GetCurrentDirectory());
3333
searchPaths.Add(Directory.GetParent(baseDir).FullName);
3434
searchPaths.Add(Directory.GetParent(baseDir).Parent.Parent.FullName);
35-
///DigiKeyApi\DigiKey.Api.ConsoleClient\bin\Debug\netcoreapp3.1\
35+
///DigiKeyApi\OriginalCircuit.DigiKey.Api.ConsoleClient\bin\Debug\netcoreapp3.1\
3636
searchPaths.Add(Directory.GetParent(baseDir).Parent.Parent.Parent.FullName);
3737

3838
string apiConfigPath = null;

DigiKey.Api/Configuration/ConfigurationHelper.cs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
using System;
22
using System.Configuration;
3+
using System.Diagnostics;
34
using System.Diagnostics.CodeAnalysis;
45

5-
namespace DigiKey.Api.Configuration
6+
namespace OriginalCircuit.DigiKey.Api.Configuration
67
{
78

89
/// <summary>
@@ -80,14 +81,11 @@ public void Save()
8081
config.Save(ConfigurationSaveMode.Full);
8182
ConfigurationManager.RefreshSection("appSettings");
8283
}
83-
catch (ConfigurationErrorsException cee)
84-
{
85-
//_log.DebugFormat($"Exception Message {cee.Message}");
86-
throw;
87-
}
8884
catch (System.Exception ex)
8985
{
90-
//_log.DebugFormat($"Exception Message {ex.Message}");
86+
#if DEBUG
87+
Debug.WriteLine($"Exception Message {ex.Message}");
88+
#endif
9189
throw;
9290
}
9391
}

DigiKey.Api/Configuration/IApiClientConfigHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace DigiKey.Api.Configuration
3+
namespace OriginalCircuit.DigiKey.Api.Configuration
44
{
55
public interface IApiClientConfigHelper
66
{

DigiKey.Api/Configuration/IConfigurationHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace DigiKey.Api.Configuration
1+
namespace OriginalCircuit.DigiKey.Api.Configuration
22
{
33
public interface IConfigurationHelper
44
{

DigiKey.Api/DigiKey.Api.csproj

-20
This file was deleted.

DigiKey.Api/Model/ApiErrorResponse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Text;
88

99

10-
namespace DigiKey.Api.Model
10+
namespace OriginalCircuit.DigiKey.Api.Model
1111
{
1212
/// <summary>
1313
/// Common response model returned for any type of HTTP exception.

DigiKey.Api/Model/ApiValidationError.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Text;
77

88

9-
namespace DigiKey.Api.Model
9+
namespace OriginalCircuit.DigiKey.Api.Model
1010
{
1111
/// <summary>
1212
/// Error with API input.

DigiKey.Api/Model/AssociatedProduct.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Text;
1717

1818

19-
namespace DigiKey.Api.Model
19+
namespace OriginalCircuit.DigiKey.Api.Model
2020
{
2121
/// <summary>
2222
/// A limited product model used for associated products.

DigiKey.Api/Model/BasicProduct.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Text;
1717

1818

19-
namespace DigiKey.Api.Model
19+
namespace OriginalCircuit.DigiKey.Api.Model
2020
{
2121
/// <summary>
2222
/// Basic product properties

DigiKey.Api/Model/CategoriesResponse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text;
1818

1919

20-
namespace DigiKey.Api.Model
20+
namespace OriginalCircuit.DigiKey.Api.Model
2121
{
2222
/// <summary>
2323
/// Response model for Categories call.

DigiKey.Api/Model/Category.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text;
1818

1919

20-
namespace DigiKey.Api.Model
20+
namespace OriginalCircuit.DigiKey.Api.Model
2121
{
2222
/// <summary>
2323
/// Products Category

DigiKey.Api/Model/ChangeNotification.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
using Newtonsoft.Json.Converters;
2222
using System.ComponentModel.DataAnnotations;
2323

24-
namespace DigiKey.Api.Model
24+
namespace OriginalCircuit.DigiKey.Api.Model
2525
{
2626
/// <summary>
2727
/// The change notification details.

DigiKey.Api/Model/DigiReelPricingDto.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Text;
1717

1818

19-
namespace DigiKey.Api.Model
19+
namespace OriginalCircuit.DigiKey.Api.Model
2020
{
2121
/// <summary>
2222
/// Response for Digi-Reel Pricing Request

DigiKey.Api/Model/Filters.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text;
1818

1919

20-
namespace DigiKey.Api.Model
20+
namespace OriginalCircuit.DigiKey.Api.Model
2121
{
2222
/// <summary>
2323
/// Filters to narrow down the search results based on parameters.

DigiKey.Api/Model/IsoSearchLocale.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Text;
1717

1818

19-
namespace DigiKey.Api.Model
19+
namespace OriginalCircuit.DigiKey.Api.Model
2020
{
2121
/// <summary>
2222
/// The validated locale that was used for the search. If the provided locale was invalid, this will show the corrections.

DigiKey.Api/Model/KeywordSearchRequest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text;
1818

1919

20-
namespace DigiKey.Api.Model
20+
namespace OriginalCircuit.DigiKey.Api.Model
2121
{
2222
/// <summary>
2323
/// This DTO takes the input from the V3 KeywordSearch and creates the Search2.0 request

DigiKey.Api/Model/KeywordSearchResponse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text;
1818

1919

20-
namespace DigiKey.Api.Model
20+
namespace OriginalCircuit.DigiKey.Api.Model
2121
{
2222
/// <summary>
2323
/// Response model for a keyword search request.

DigiKey.Api/Model/KitPart.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Text;
1717

1818

19-
namespace DigiKey.Api.Model
19+
namespace OriginalCircuit.DigiKey.Api.Model
2020
{
2121
/// <summary>
2222
/// Product contained within a Kit.

DigiKey.Api/Model/LimitedParameter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text;
1818

1919

20-
namespace DigiKey.Api.Model
20+
namespace OriginalCircuit.DigiKey.Api.Model
2121
{
2222
/// <summary>
2323
/// Parameters for filtering that are limited to parameters for the products in the response.

0 commit comments

Comments
 (0)