Network Metadata Provider

INetworkInformationService in assembly SanteDB.Core.Api version 2.1.151.0

Summary

Represents network information service

Events

EventTypeDescription

NetworkStatusChanged

EventHandler

Fired when the network status changes

Properties

PropertyTypeAccessDescription

IsNetworkAvailable

Boolean

R

Gets whether the network is available

IsNetworkConnected

Boolean

R

Gets whether the network is connected.

IsNetworkWifi

Boolean

R

Returns true if the network is WIFI

Operations

OperationResponse/ReturnInput/ParameterDescription

GetInterfaces

IEnumerable<NetworkInterfaceInfo>

none

TODO

Ping

Int64

String hostName

Pings the specified host

Nslookup

String

String address

Perform a DNS lookup

GetHostName

String

none

TODO

GetMachineName

String

none

TODO

Implementations

Default Network Information Service - (SanteDB.Server.Core)

Default network information service

Service Registration

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

Example Implementation

/// Example Implementation
using SanteDB.Core.Services;
/// Other usings here
public class MyNetworkInformationService : SanteDB.Core.Services.INetworkInformationService { 
	public String ServiceName => "My own INetworkInformationService service";
	/// <summary>
	/// Fired when the network status changes
	/// </summary>
	public event EventHandler NetworkStatusChanged;
	/// <summary>
	/// Gets whether the network is available
	/// </summary>
	public Boolean IsNetworkAvailable {
		get;
	}
	/// <summary>
	/// Gets whether the network is connected.
	/// </summary>
	public Boolean IsNetworkConnected {
		get;
	}
	/// <summary>
	/// Returns true if the network is WIFI
	/// </summary>
	public Boolean IsNetworkWifi {
		get;
	}
	public IEnumerable<NetworkInterfaceInfo> GetInterfaces(){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Pings the specified host
	/// </summary>
	public Int64 Ping(String hostName){
		throw new System.NotImplementedException();
	}
	/// <summary>
	/// Perform a DNS lookup
	/// </summary>
	public String Nslookup(String address){
		throw new System.NotImplementedException();
	}
	public String GetHostName(){
		throw new System.NotImplementedException();
	}
	public String GetMachineName(){
		throw new System.NotImplementedException();
	}
}

References

Last updated