CSDNCurrent en:Terms of Use

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche



The Terms of Use that are defined under the Legal tab on the Cryptshare Server administration website can be downloaded by the Client, so that they can be presented to a user in a client side application. The Terms of Use can be downloaded using the Client's method RequestTermsOfUse(). The method returns a TermsOfUseResult which in turn contains a DateChanged and a TermsOfUseResultEntry[]. A TermsOfUseResultEntry contains a key-value pair: texts as the values, and their corresponding language codes as the keys.

Example: Requesting the Terms of Use

// First create the Client instance
// Create a WebServiceUri for your Cryptshare Server 
WebServiceUri serviceUri = new WebServiceUri("https://cryptshare.server.com");
 
// Create a CryptshareConnection instance for your WebServiceUri
CryptshareConnection connection = new CryptshareConnection(serviceUri);
 
// Create the Client instance with the sender's email address, 
// the CryptshareConnection, and the path to the verification store.
Client client = new Client("sender_email@server.com", connection, @"C:\temp");

// Request the Terms of Use
TermsOfUseResult tos = client.RequestTermsOfUse();

foreach (TermsOfUseResultEntry entry in tos.terms)
{
	Console.WriteLine("Terms of use for language '" + entry.key + "': " + entry.value);
}