public override string ToString() { String resourceString = "", varString = ""; try { foreach (var resource in RequiredResources.ToList()) { resourceString += resource.ToString() + "\n"; } } catch { resourceString = "Unable to fetch required resources"; } try { foreach (var v in PossibleVariables) { varString += v.ToString() + "\n"; } } catch { varString = "Unable to fetch possible variables"; } return(String.Format( "Name: {0}, " + "Pull Name: {1}, " + "Last Used: {2} " + "\nRequred Resources {3}" + "\nPossible Environmental Variables {4}", Name, PullName, LastUsedDate.ToString(), resourceString, varString)); }
public void SetVariables() { Variables = PossibleVariables.Count(); Resoures = RequiredResources.Count(); v = PossibleVariables.ToList(); resources = RequiredResources.ToList(); }
public void ResourceRequired(string resourceType, string resourceName) { if (WithinContext) { RequiredResources.Add(new ResourceRequiredModel { ResourceType = resourceType, ResourceName = resourceName, }); } }