Common.ProFile 1.1.5

dotnet add package Common.ProFile --version 1.1.5
                    
NuGet\Install-Package Common.ProFile -Version 1.1.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Common.ProFile" Version="1.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Common.ProFile" Version="1.1.5" />
                    
Directory.Packages.props
<PackageReference Include="Common.ProFile" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Common.ProFile --version 1.1.5
                    
#r "nuget: Common.ProFile, 1.1.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Common.ProFile@1.1.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Common.ProFile&version=1.1.5
                    
Install as a Cake Addin
#tool nuget:?package=Common.ProFile&version=1.1.5
                    
Install as a Cake Tool

🔗 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 and Authorization on HttpClient
  • Decrypts AuthorizationEncrypted with Common.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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