ConfigApiSharp 1.2.0
dotnet add package ConfigApiSharp --version 1.2.0
NuGet\Install-Package ConfigApiSharp -Version 1.2.0
<PackageReference Include="ConfigApiSharp" Version="1.2.0" />
paket add ConfigApiSharp --version 1.2.0
#r "nuget: ConfigApiSharp, 1.2.0"
// Install ConfigApiSharp as a Cake Addin
#addin nuget:?package=ConfigApiSharp&version=1.2.0
// Install ConfigApiSharp as a Cake Tool
#tool nuget:?package=ConfigApiSharp&version=1.2.0
ConfigApiSharp
Creating a Configuration API proxy client for interfacing with a Milestone Advanced VMS Management Server has a bit of boilerplate involved. In it's present state, this project simply provides a sort of "factory" mechanism for producing a config API client or ServerCommandService client, saving the headache of making sure the client is setup properly.
This is basically all documented and almost entirely copy/pasted from Milestone's MIP SDK documentation with some minor tweaks, so no magic sauce here. Just a conventient wrapper that I intend to use for myself going forward.
Getting Started
Interfacing with the Configuration API does not specifically require the use of MIP SDK component libraries. This proxy was created by pulling the WSDL from an existing XProtect Corporate 2018 R2 system, and if you're not taking advantage of the built-in configuration item types (eg. Hardware, Camera, RecordingServer etc), then you can do a lot of helpful configuration related operations just using the WCF proxy client. Simply re-use the source here in your own project or add the ConfigApiSharp nuget package. Below is a sample console application where you can supply the login parameters as arguments and simply print the Management Server information to console.
using ConfigApiSharp;
using System;
using System.Linq;
namespace ConfigApiTest
{
static class Program
{
static void Main(string[] args)
{
var host = "mgtsrv1";
var port = 80;
var result = ConfigApiSharp.ClientFactory.BuildConfigApiClient(host, port, UserType.CurrentUser);
if (result.Success)
{
var client = result.Client;
var managementServer = client.GetItem("/");
foreach (var property in managementServer.Properties)
{
Console.WriteLine($"{property.DisplayName} : {property.Value}");
}
}
}
}
}
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
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 |
---|
Added WcfSettings class for customizing timeouts and other WCF binding properties. Also updated interfaces against current 2019 R1 WSDL.