Пример #1
0
    //private string root;

    protected void Page_Load(object sender, EventArgs e)
    {
        // prevent invalid ViewState errors in Firefox
        if (Request.Browser.Browser == "Firefox")
        {
            Response.Cache.SetNoStore();
        }

        if (!IsPostBack)
        {
            Repeater1.DataBind();
            Repeater2.DataBind();
            DemoInfo.DataBind();
            SandboxInfo.DataBind();
        }
    }
Пример #2
0
        private SandboxInfo TryLoadSandboxee(FileInfo fileInfo)
        {
            var sandboxInfo = new SandboxInfo();

            sandboxInfo.FileCreated = fileInfo.CreationTimeUtc;

            sandboxInfo.AppDomain = AppDomain.CreateDomain(fileInfo.Name, null, new AppDomainSetup()
            {
                ApplicationBase       = pluginPath,
                ShadowCopyDirectories = pluginPath,
                ShadowCopyFiles       = "true"
            });

            sandboxInfo.Guest         = (SandboxGuest)sandboxInfo.AppDomain.CreateInstanceAndUnwrap(typeof(SandboxGuest).Assembly.FullName, typeof(SandboxGuest).FullName);
            sandboxInfo.SandboxeeInfo = sandboxInfo.Guest.TryLoadAssembly(fileInfo.FullName);

            if (sandboxInfo.SandboxeeInfo == null)
            {
                AppDomain.Unload(sandboxInfo.AppDomain);
                return(null);
            }

            return(sandboxInfo);
        }
Пример #3
0
 public RefreshSandboxCommand(SandboxInfo sbxInfo)
 {
     SbxInfo = sbxInfo;
 }
Пример #4
0
 public CheckSandboxStatusCommand(SandboxInfo sbxInfo)
 {
     SbxInfo = sbxInfo;
 }
Пример #5
0
 public CreateSandboxCommand(SandboxInfo sbxInfo)
 {
     SbxInfo = sbxInfo;
 }