コード例 #1
0
        public string GetCollectedInfo(FoundryApplication application)
        {
            const string lineBreak = "\n";
            var collectedInfo = Properties.Resources.ApplicationMemory + lineBreak + application.Resources.Memory +
                                lineBreak;

            return collectedInfo;
        }
コード例 #2
0
        public void PutApplication(FoundryApplication foundryApplication)
        {
            var foundry = _wrapper.Get();

            var foundryApplicationToReplace =
                foundry.Applications.SingleOrDefault(foundryTarget => foundryTarget.Path == foundryApplication.Path);

            foundry.Applications.Remove(foundryApplicationToReplace);

            foundry.Applications.Add(foundryApplication);
            _wrapper.Save(foundry);
        }
コード例 #3
0
ファイル: Map.cs プロジェクト: BrianMMcClain/Thor.NET
        public static FoundryApplication FoundryApplicationMap(FoundryTarget target,
                                                              Application cloudApplication)
        {
            var foundryApplication =
                new FoundryApplication { Name = cloudApplication.Name, Target = target };
            
            var rootUri = cloudApplication.Uris[0];
            if (!string.IsNullOrWhiteSpace(rootUri))
            {
                if (!rootUri.StartsWith("http://"))
                {
                    rootUri = "http://" + rootUri;
                    foundryApplication.Path = new Uri(rootUri);
                }
            }

            return foundryApplication;
        }