internal static PervasiveDigital.Scratch.DeploymentHelper.Extensibility.Contracts.IDriverContract ViewToContractAdapter(PervasiveDigital.Scratch.DeploymentHelper.Extensibility.IDriver view)
 {
     if ((view == null))
     {
         return null;
     }
     if (view.GetType().Equals(typeof(IDriverContractToViewHostAdapter)))
     {
         return ((IDriverContractToViewHostAdapter)(view)).GetSourceContract();
     }
     else
     {
         return new IDriverViewToContractHostAdapter(view);
     }
 }
 internal static PervasiveDigital.Scratch.DeploymentHelper.Extensibility.Contracts.IFirmwareConfigurationContract ViewToContractAdapter(PervasiveDigital.Scratch.DeploymentHelper.Extensibility.IFirmwareConfiguration view)
 {
     if ((view == null))
     {
         return null;
     }
     if (view.GetType().Equals(typeof(IFirmwareConfigurationContractToViewAddInAdapter)))
     {
         return ((IFirmwareConfigurationContractToViewAddInAdapter)(view)).GetSourceContract();
     }
     else
     {
         return new IFirmwareConfigurationViewToContractAddInAdapter(view);
     }
 }
 internal static PervasiveDigital.Scratch.DeploymentHelper.Extensibility.IDriver ContractToViewAdapter(PervasiveDigital.Scratch.DeploymentHelper.Extensibility.Contracts.IDriverContract contract)
 {
     if ((contract == null))
     {
         return null;
     }
     if (((System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain(contract) != true)
                 && contract.GetType().Equals(typeof(IDriverViewToContractHostAdapter))))
     {
         return ((IDriverViewToContractHostAdapter)(contract)).GetSourceView();
     }
     else
     {
         return new IDriverContractToViewHostAdapter(contract);
     }
 }