예제 #1
0
        public void AddLiteralData(string id, string dataType, string s)
        {
            LiteralOutput o = new LiteralOutput(id, "", "", dataType);

            o.Value = s;
            returnValues.Add(o);
        }
예제 #2
0
        /// <summary>
        /// This method is called by the DescribeProcess part of WPS.NET, it must be implemented.
        /// </summary>
        /// <returns>The process description</returns>
        public override ProcessDescription GetDescription()
        {
            ///This is where we create the process description
            ProcessDescription process = new ProcessDescription("AsyncClock", "Async Clock", "Counts a user-defined number of seconds asynchronously (This is an example of async process for developpers)", "1.1");

            ///This check is meant to make sure everything is in it's place so that the process
            ///can be called asynchronously without failing miserably.
            if (this is IAsyncProcess && this.MainAppDomain != null)
            {
                ///Is this process implements IAsyncProcess and if the Main Application Domain is provided,
                ///we can assume that status will be supported (provided status updates are properly coded).
                process.statusSupported = true;

                if (this.BaseUrlToResultPath != String.Empty && this.StoredResultPath != string.Empty)
                    ///If the necessary informations for responses and results storage are provided
                    ///we can enable storage support.
                    process.storeSupported = true;
            }

            ///This is the declaration of the numberOfSeconds parameter
            ///It has 1 minoccurs and 1 maxoccurs, it is mandatory.
            LiteralInput numberOfSeconds = new LiteralInput("numberOfSeconds", "Number of seconds", "The number of seconds this process will count", "integer", "100");
            numberOfSeconds.MinOccurs = 1;
            numberOfSeconds.MaxOccurs = 1;

            ///Dont forget to add the previously created parameter in the inputs collection of the process.
            process.inputs.Add(numberOfSeconds);

            ///A start date should be also specified
            process.processStartDate = this.startDate;

            ///Specify the output of the process
            LiteralOutput output = new LiteralOutput("AsyncClockResult", "Async Clock Result", "A string containing the start datetime and the end datetime", "string");
            output.Value = String.Empty;
            process.outputs.Add(output);

            ///Return the description of the process.
            return process;
        }
예제 #3
0
 public void AddLiteralData(string id, string dataType, string s)
 {
     LiteralOutput o = new LiteralOutput(id, "", "", dataType);
     o.Value = s;
     returnValues.Add(o);
 }