Click or drag to resize

RuntimeManagerIsProtected Method

Checks if a PTX is signed and/or encrypted.

Namespace:  OpenTestSystem.Otx.Runtime.Api
Assembly:  OpenTestSystem.Otx.Runtime.Api (in OpenTestSystem.Otx.Runtime.Api.dll) Version: 5.5.0.0 (6.1.0.31040)
Syntax
public bool IsProtected(
	string fileName
)

Parameters

fileName
Type: SystemString
The path of ptx file to load.

Return Value

Type: Boolean
Returns True if a PTX file is signed or encrypted, otherwise false.

Implements

IRuntimeManagerIsProtected(String)
Exceptions
ExceptionCondition
FileNotFoundExceptionThe file cannot be found.
Examples
Simple sample which loads a protected PTX file.
C#
static class Program
{
    static void Main()
    { 
        RuntimeManager rt = new RuntimeManager();
        if (rt.IsProtected("C:\\Sample.ptx"))
        {
            rt.Load("C:\\Sample.ptx", "MyPassword");
        }
        else
        {
            rt.Load("C:\\Sample.ptx");
        }
    } 
}
See Also