public void ExecuteOnImage(BisqueSession session, BisqueImage file)
        {
            const string ModuleServicePrefix = "module_service/";
            string ContentType = "content-type";

            string parametersXml = "<mex><tag name = \"inputs\" ><tag type = \"image\" name = \"image_url\" value = \"" + file.URI +"\" /><tag type = \"system-input\" name = \"mex_url\" /><tag type = \"system-input\" name = \"bisque_token\" /></tag><tag name = \"execute_options\" ><tag name = \"iterable\" value = \"image_url\" /></tag></mex>";

            var request = new RestRequest(ModuleServicePrefix + this.Name + "/execute", Method.PUT);
            request.AddHeader(ContentType, MediaTypeNames.Text.Xml);
            request.AddParameter(MediaTypeNames.Text.Xml, parametersXml, ParameterType.RequestBody);

            var response = session.Client.Execute(request);
            RestSharpHelpers.CheckResponse(response);
        }
Beispiel #2
0
 internal static IEnumerable<BisqueImage> ImagesFromResources(IEnumerable<BisqueImageResource> enumerable , BisqueSession usedSession )
 {
     foreach(var res in enumerable)
     {
         yield return new BisqueImage(res, usedSession);
     }
 }
Beispiel #3
0
 public BisqueImage(BisqueImageResource imageResource, BisqueSession session)
 {
     this.resource = imageResource;
     this.usedSession = session;
 }
 public MainWindow()
 {
     InitializeComponent();
     this.session = new BisqueSession("http://bisquedemo");
 }