//public static System.Xml.XmlDocument Office365XML = new System.Xml.XmlDocument(); //public static System.Xml.XmlDocument AzureXML = new System.Xml.XmlDocument(); //really should be at the model level, but this is easier for now //public static DateTime LastOffice365Update; //public static DateTime LastAzureUpdate; protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //pre-populate everything MicrosoftIPs.UpdateIPs(Models.CloudIP_ENum.All); }
public IHttpActionResult Actions(string operation) { System.Collections.ObjectModel.Collection <string> _IPs = new System.Collections.ObjectModel.Collection <string>(); if (operation == "listregions") { System.Collections.ObjectModel.Collection <string> regions = new System.Collections.ObjectModel.Collection <string>(); foreach (XmlNode product in MicrosoftIPs.AzureIPs.LastChild.ChildNodes) { regions.Add(product.Attributes.GetNamedItem("Name").Value); } return(Ok(regions)); } else if (operation == "update") { //MicrosoftIPs.LastAzureIPUpdate = WebApiApplication.LastAzureUpdate; MicrosoftIPs.UpdateIPs(CloudIP_ENum.Azure); return(Ok(MicrosoftIPs.LastAzureIPUpdate)); } else { return(NotFound()); } }