OSLC4Net.Core 0.4.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package OSLC4Net.Core --version 0.4.2
                    
NuGet\Install-Package OSLC4Net.Core -Version 0.4.2
                    
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="OSLC4Net.Core" Version="0.4.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OSLC4Net.Core" Version="0.4.2" />
                    
Directory.Packages.props
<PackageReference Include="OSLC4Net.Core" />
                    
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 OSLC4Net.Core --version 0.4.2
                    
#r "nuget: OSLC4Net.Core, 0.4.2"
                    
#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.
#addin nuget:?package=OSLC4Net.Core&version=0.4.2
                    
Install OSLC4Net.Core as a Cake Addin
#tool nuget:?package=OSLC4Net.Core&version=0.4.2
                    
Install OSLC4Net.Core as a Cake Tool

OSLC4Net, an OSLC SDK for .NET

CI Discourse forum

What is OSLC4NET?

OSLC4Net is an SDK and sample applications that help the .NET community adopt Open Services for Lifecycle Collaboration (OSLC, homepage) and build OSLC-conformant tools.

The SDK allows developers to create OSLC servers and clients by adding OSLC annotations to .NET objects to represent them as OSLC resources. It includes a library based on the dotNetRDF package, which assists with representing these resources as RDF and helps parse Turle, RDF/XML, and JSON-LD documents into OSLC .NET objects.

The OSLC4Net.Client package can be used to help create consumer REST requests. On the server side, the project offers an RDF-specific MediaTypeFormatter that can help process OSLC REST requests within an ASP.NET MVC 5 API. Join the discussion on the .NET Core migration.

Getting started

If you do not have a .NET development environment, start by downloading VS Code C# Dev Kit. Make sure to install .NET 8 SDK for development. Libraries target NETStandard 2.0 and should run on .NET Framework 4.8 or .NET 6+ (recommended).

A simple OSLC Client

Create a new console application targeting .NET 6+, add a NuGet dependency to OSLC4Net.Client (make sure the Include prerelease is checked if you see an empty list) and add the following code:

private const string OSLC_SERVER_URI = "https://oslc.itm.kth.se/ccm";

static void Main(string[] args)
{
    try
    {
        var helper = new JazzRootServicesHelper(OSLC_SERVER_URI, OSLCConstants.OSLC_CM_V2);
        var catUri = helper.GetCatalogUrl();
        Console.WriteLine($"The OSLC server has an OSLC Service Provider Catalog at the following URI:\n    {catUri}");
    } catch (RootServicesException e) {
        Console.WriteLine($"Failed to fetch the OSLC RootServices document from:\n    {OSLC_SERVER_URI}/rootservices");
    }
    Console.ReadLine();
}

This should give you a valid response.

Running the sample StockQuote provider

[!NOTE] Sample StockQuote provider has not yet been migrated to .NET 6+.

[!WARNING] Sample StockQuote provider is a toy implementation and does not correspond to any standards-track OSLC specifications.

OSLC4Net.StockQuoteSample is a sample OSLC provider which implements one resource type, a StockQuote. This resource is not defined by an OSLC specification, it shows how OSLC4Net can be used to create an experimental OSLC provider.

  1. Build the OSLC4Net_SDK\OSLC4Net.Core.sln solution
  2. Right click the OSLC4Net.StockQuoteSample project and run it via Debug->Start new instance

You'll see a web page created - that is currently just a skeleton provided by ASP.NET. Try performing a GET request using Postman (make sure to set the Accept header to application/rdf+xml:

  • http://localhost:7077/api/stockquote - returns all StockQuotes
  • http://localhost:7077/api/stockquote?getShape=true - returns the StockQuote OSLC resource shape
  • http://localhost:7077/api/stockquote/nasdaq_goog - returns an individual StockQuote

A request to the first URL using Fiddler should have the following response:

alternate text is missing from this package README image

More information on OSLC

  • See the OSLC site for more details on OSLC specifications and community activities.
  • See the Eclipse Lyo site for information on OSLC SDKs and samples for other technologies.

OSLC4Net License

OSLC4Net is licensed under the Eclipse Public License 1.0

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. 
.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.
  • .NETStandard 2.0

NuGet packages (6)

Showing the top 5 NuGet packages that depend on OSLC4Net.Core:

Package Downloads
OSLC4Net.Core.Query

Package Description

OSLC4Net.ChangeManagementCommon

Package Description

OSLC4Net.Core.DotNetRdfProvider

Package Description

OSLC4Net.Client

Package Description

OSLC4Net.Core.JsonProvider

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.0 300 4/13/2025
0.5.0-preview.1 140 4/13/2025
0.4.7-preview.4 62 12/7/2024
0.4.7-preview.3 62 12/6/2024
0.4.7-preview.2 57 12/6/2024
0.4.7-preview.1 53 12/6/2024
0.4.6 239 11/15/2024
0.4.5 262 10/19/2024
0.4.5-preview.3 65 10/19/2024
0.4.3 252 10/19/2024
0.4.2 295 10/9/2024
0.3.0-alpha 155 4/25/2023