Resource Patching Provider

IPatchService in assembly SanteDB.Core.Api version 3.0.1980.0

Summary

Represents a patch service which can calculate and apply patches

Operations

Operation
Response/Return
Input/Parameter
Description

Diff

Patch

IdentifiedData existing IdentifiedData updated String[] ignoreProperties

Performs a DIFF and creates the related patch which can be used to update to

Patch

IdentifiedData

Patch patch IdentifiedData data Boolean force

Apples the specified onto returning the updated object

Test

Boolean

Patch patch IdentifiedData target

Tests that the patch can be applied on the specified object

Implementations

Basic Patching Service - (SanteDB.Core.Api)

Represents a simple patch service which can calculate patches and apply them

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Core.Services.Impl.SimplePatchService, SanteDB.Core.Api, Version=3.0.1980.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

Example Implementation

/// Example Implementation
using SanteDB.Core.Services;
/// Other usings here
public class MyPatchService : SanteDB.Core.Services.IPatchService { 
	public String ServiceName => "My own IPatchService service";
	/// <summary>
	/// Performs a DIFF and creates the related patch which can be used to update             to
	/// </summary>
	public Patch Diff(IdentifiedData existing,IdentifiedData updated,String[] ignoreProperties){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Apples the specified  onto  returning the updated object
	/// </summary>
	public IdentifiedData Patch(Patch patch,IdentifiedData data,Boolean force){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Tests that the patch can be applied on the specified object
	/// </summary>
	public Boolean Test(Patch patch,IdentifiedData target){
		throw new System.NotImplementedException();
	}
}

References

Last updated