Edit

Share via


_Application3.CacheSolution(String) Method

Definition

Examines the form template in the cache and, if necessary, updates it from the published location of the form template.

public:
 void CacheSolution(System::String ^ bstrSolutionURI);
public void CacheSolution (string bstrSolutionURI);
abstract member CacheSolution : string -> unit
Public Sub CacheSolution (bstrSolutionURI As String)

Parameters

bstrSolutionURI
String

Specifies the Uniform Resource Identifier (URI) of the form template. This parameter can be specified as a form definition (.xsf) file or a form template (.xsn) file.

Implements

Examples

In the following example, the CacheFormTemplate custom function loops through the location for each the form template specified in the forms array and passes that value to the CacheSolution method for evaluation.

private string[] _forms = 
{
   @"\\MyServer\MyForms\MyForm.xsn", 
   @"\\MyServer\MyForms\manifest.xsf" 
};

private void someFunction()
{
   CacheFormTemplate(_forms);
}

private void CacheFormTemplate(string[] forms)
{
   foreach (string form in forms)
   {
      thisApplication.<span class="label">CacheSolution</span>(form);
    }
}

In the following example, the CacheFormTemplate custom function loops through the location for each the form template specified in the forms array and passes that value to the CacheSolution method for evaluation.

private string[] _forms = 
{
   @"\\MyServer\MyForms\MyForm.xsn", 
   @"\\MyServer\MyForms\manifest.xsf" 
};

private void someFunction()
{
   CacheFormTemplate(_forms);
}

private void CacheFormTemplate(string[] forms)
{
   foreach (string form in forms)
   {
      thisApplication.<span class="label">CacheSolution</span>(form);
    }
}

Remarks

If the form template that currently exists in the cache matches the form template from the published location, no caching takes place. If the computer is offline and the form is already in the cache, the cache is kept and no update will occur.

Important: This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.

Applies to