/// <summary>
        /// Invoke the specified callback in a medium trusted context
        /// </summary>
        public static void MediumTrustInvoke(ThreadStart callback)
        {
            SecurityTemplate template = new SecurityTemplate(true);

            template.PartialTrustInvoke(PERMISSIONSET_MEDIUMTRUST, callback);
        }
 /// <summary>
 /// Invoke the specified callback in a medium trusted context
 /// </summary>
 public static void MediumTrustInvoke( ThreadStart callback )
 {
     SecurityTemplate template = new SecurityTemplate(true);
     template.PartialTrustInvoke(PERMISSIONSET_MEDIUMTRUST, callback);
 }