public String generateGRequest() { string url = ""; url += HEADER; url += myFormat.ToString() + "?"; // sb.append("origin=" + myOrigin + "&"); // sb.append("destination=" + myDest); url += "origin=" + coordinateToString(myOriginCoordinates); url += "destination=" + coordinateToString(myDestCoordinates); if (myAvoid != null && !(myAvoid.Count() == 0)) { url += "?"; foreach (ToAvoidGM av in myAvoid) { url += av.ToString() + "|"; } url = url.Substring(0, url.Length - 1); } if (myMode != null) { url += "?" + myMode.ToString(); } url += "&key=" + API_KEY; return(url); }
public Synthesizer(Uri endpointUri, OutputFormats outputFormats, AuthClient authorization) { SynthesizeQueue = new List <SynthesizeTask>(); EndpointUri = endpointUri; DescriptionAttribute[] attributes = (DescriptionAttribute[])outputFormats.GetType().GetField(outputFormats.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); string description = attributes.Length > 0 ? attributes[0].Description : string.Empty; OutputFormat = description; AuthorizationClient = authorization; }
public static string GetFilenameFromPattern(string pattern, OutputFormats imageFormat, ICaptureDetails captureDetails) { return(FillPattern(pattern, captureDetails, true) + "." + imageFormat.ToString().ToLower()); }