internal ApplicationEnvironment(IHostContext hostContext, CellLifeIdentity cellIdentity, SolutionHead solution, AssembliesHead assemblies, Action<IHostCommand> sendCommand)
 {
     _hostContext = hostContext;
     _cellIdentity = cellIdentity;
     _solution = solution;
     _assemblies = assemblies;
     _sendCommand = sendCommand;
 }
        public X509Certificate2 GetCertificate(CellLifeIdentity cell, string thumbprint)
        {
            var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
            try
            {
                store.Open(OpenFlags.ReadOnly);
                var certs = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false);
                if (certs.Count != 1)
                {
                    return null;
                }

                return certs[0];
            }
            finally
            {
                store.Close();
            }
        }
 public string GetLocalResourcePath(CellLifeIdentity cell, string resourceName)
 {
     var dir = Path.Combine(Path.GetTempPath(), _identity.UniqueWorkerInstanceName, cell.UniqueCellInstanceName, resourceName);
     Directory.CreateDirectory(dir);
     return dir;
 }
 public IPEndPoint GetEndpoint(CellLifeIdentity cell, string endpointName)
 {
     return null;
 }
 public string GetSettingValue(CellLifeIdentity cell, string settingName)
 {
     return ConfigurationManager.AppSettings[settingName];
 }
 public string GetSettingValue(CellLifeIdentity cell, string settingName)
 {
     return null;
 }
 public X509Certificate2 GetCertificate(CellLifeIdentity cell, string thumbprint)
 {
     return null;
 }