Common.ProFile
1.1.5
dotnet add package Common.ProFile --version 1.1.5
NuGet\Install-Package Common.ProFile -Version 1.1.5
<PackageReference Include="Common.ProFile" Version="1.1.5" />
<PackageVersion Include="Common.ProFile" Version="1.1.5" />
<PackageReference Include="Common.ProFile" />
paket add Common.ProFile --version 1.1.5
#r "nuget: Common.ProFile, 1.1.5"
#:package Common.ProFile@1.1.5
#addin nuget:?package=Common.ProFile&version=1.1.5
#tool nuget:?package=Common.ProFile&version=1.1.5
🔗 Common.ProFile
A typed .NET client library for ProFile backend, providing secure access to version, part, and document data via a simple HTTP abstraction with DI support.
✅ Features
✔ Secure authentication using AES-encrypted credentials
✔ Fetch ProFile version information
✔ Query parts by article number or ID
✔ Recursively traverse Bill of Materials (BOM)
✔ Download files and documents
✔ Resolve latest document version by status
✔ Fully DI-compatible
📦 Installation
Install via your internal NuGet feed: Opton Media
dotnet add package Common.ProFile --version 1.0.x
✅ Usage in Code
1. Register the Client in Startup
services.AddCommonSecurity(); // From Common.Security
services.AddProFileClient(configuration); // Registers IProFileAccess
🧠 The configuration section ProFile
should exist in your appsettings.json
:
"ProFile": {
"ServerName": "profile.OptonMedia.de",
"Tenant": "OptonMediaTenant",
"AuthorizationEncrypted": "<your encrypted bearer token>"
}
2. Inject and Use the Client
public class MyService
{
private readonly IProFileAccess _profile;
public MyService(IProFileAccess profile)
{
_profile = profile;
}
public async Task RunAsync()
{
var version = await _profile.GetVersionAsync();
var part = await _profile.GetPartAsync("WD191-001");
}
}
🖼️ Example WinForms Integration
Program.cs
var config = new ConfigurationBuilder()
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.AddJsonFile("appsettings.json")
.Build();
var services = new ServiceCollection();
services.AddCommonSecurity();
services.AddProFileClient(config);
var provider = services.BuildServiceProvider();
var mainView = ActivatorUtilities.CreateInstance<MainView>(provider);
Application.Run(mainView);
MainView.cs
public partial class MainView : Form
{
private readonly IProFileAccess _profileClient;
public MainView(IProFileAccess profileClient)
{
_profileClient = profileClient;
InitializeComponent();
Load += MainView_LoadAsync;
}
private async void MainView_LoadAsync(object sender, EventArgs e)
{
var id = await _profileClient.GetLatestDocumentVersionIdAsync(470033, "Freigegeben PO");
MessageBox.Show($"Latest approved version: {id}");
}
}
🧠 Behavior
- Automatically sets
BaseAddress
andAuthorization
onHttpClient
- Decrypts
AuthorizationEncrypted
withCommon.Security
- Uses Polly retry policies for robustness
- Parses JSON responses using Newtonsoft
🔧 API Overview
Method | Purpose |
---|---|
GetVersionAsync() |
Gets ProFile server version |
GetPartInfoAsync(id or article) |
Gets part metadata |
GetPartAsync(id or article) |
Gets part + BOM graph |
DownloadFileAsync(docId) |
Downloads file binary |
GetDocumentStatusAsync(docId) |
Returns release status |
GetAllDocumentVersionsAsync(docId) |
Lists all version IDs |
GetLatestDocumentVersionIdAsync(docId, status) |
Finds latest with status |
📂 Folder Structure
/Common.ProFile
/IProFileAccess.cs
/ProFileClient.cs
/ProFileOptions.cs
/ServiceCollectionExtensions.cs
✅ Future Features
- 📄 Model classes for documents
- 📊 Diagnostics for API calls
- 🗂️ Additional filter/query helpers
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Common.Security (>= 1.0.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 2.1.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.1.1)
- Microsoft.Extensions.Http (>= 2.1.1)
- Microsoft.Extensions.Http.Polly (>= 2.1.1)
- Microsoft.Extensions.Options (>= 2.1.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 2.1.1)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.1.5 | 144 | 8/8/2025 |