Пример #1
0
        public void PrepareAndExecute(Delegate PrepareCallback, Delegate UserCallback)
        {
            String LMethodName = getText();

            Admin.GetServerMethodParameters((TDBXReader MetaDatas) =>
            {
                parameters   = new List <DSRESTParameter>();
                bool Cicla   = true;
                bool IsEqual = false;
                while (MetaDatas.next())
                {
                    if (Cicla && IsEqual)
                    {
                        break;
                    }
                    if (LMethodName.Equals(MetaDatas.getValue("MethodAlias").GetAsString()))
                    {
                        IsEqual           = true;
                        Cicla             = false;
                        DSRESTParameter p = new DSRESTParameter(
                            MetaDatas.getValue("Name").GetAsString(),                 //param.Name,
                            MetaDatas.getValue("DBXParameterDirection").GetAsInt32(), //param.Direction,
                            MetaDatas.getValue("DBXType").GetAsInt32(),               //param.DBXType,
                            MetaDatas.getValue("ParameterTypeName").GetAsString());   //param.TypeName);
                        parameters.Add(p);
                    }
                    else
                    {
                        Cicla = true;
                    }
                }
                PrepareCallback.DynamicInvoke();
                Connection.execute(this, Admin, UserCallback);
            });
        }
Пример #2
0
        /**
         * Prepares internal parameter list using information passed
         * It prepares parameters list using information in an {@link DSRESTParameterMetaData}
         * @param metadatas
         */

        public void prepare(DSRESTParameterMetaData[] metadatas)
        {
            parameters = new List <DSRESTParameter>();
            foreach (DSRESTParameterMetaData param in metadatas)
            {
                DSRESTParameter p = new DSRESTParameter(
                    param.Name,
                    param.Direction,
                    param.DBXType,
                    param.TypeName);
                parameters.Add(p);
            }
        }
Пример #3
0
 public void PrepareAndExecute(Delegate PrepareCallback, Delegate UserCallback)
 {
     String LMethodName = getText();
     Admin.GetServerMethodParameters((TDBXReader MetaDatas) =>
     {
     parameters = new List<DSRESTParameter>();
     bool Cicla = true;
     bool IsEqual = false;
     while (MetaDatas.next())
     {
         if (Cicla && IsEqual) break;
         if (LMethodName.Equals(MetaDatas.getValue("MethodAlias").GetAsString()))
         {
             IsEqual = true;
             Cicla = false;
             DSRESTParameter p = new DSRESTParameter(
                         MetaDatas.getValue("Name").GetAsString(), //param.Name,
                         MetaDatas.getValue("DBXParameterDirection").GetAsInt32(),//param.Direction,
                         MetaDatas.getValue("DBXType").GetAsInt32(),//param.DBXType,
                         MetaDatas.getValue("ParameterTypeName").GetAsString());//param.TypeName);
             parameters.Add(p);
         }
         else
         {
             Cicla = true;
         }
     }
     PrepareCallback.DynamicInvoke();
     Connection.execute(this, Admin, UserCallback);
     });
 }
Пример #4
0
 /**
  * Prepares internal parameter list using information passed
  * It prepares parameters list using information in an {@link DSRESTParameterMetaData}
  * @param metadatas
  */
 public void prepare(DSRESTParameterMetaData[] metadatas)
 {
     parameters = new List<DSRESTParameter>();
     foreach (DSRESTParameterMetaData param in metadatas) {
     DSRESTParameter p = new DSRESTParameter(
                 param.Name,
                 param.Direction,
                 param.DBXType,
                 param.TypeName);
     parameters.Add(p);
     }
 }
Пример #5
0
 private bool isURLParameter(DSRESTParameter parameter)
 {
     return ((parameter.getDBXType() != DBXDataTypes.JsonValueType)
         && (parameter.getDBXType() != DBXDataTypes.BinaryBlobType) && (parameter
         .getDBXType() != DBXDataTypes.TableType));
 }
Пример #6
0
 /** This method returns the URL encoded string starting from the input
   	 * DSRESTParameter
   	 *
   	 * @param parameter
   	 *            the DSRESTParameter to encode
   	 * @return the DSRESTParameter encoded
   	 */
 private String encodeURIComponent(DSRESTParameter parameter)
 {
     return encodeURIComponent(parameter.getValue().ToString());
 }
Пример #7
0
 /** This method returns the URL encoded string starting from the input
  * DSRESTParameter
  *
  * @param parameter
  *            the DSRESTParameter to encode
  * @return the DSRESTParameter encoded
  */
 private String encodeURIComponent(DSRESTParameter parameter)
 {
     return(encodeURIComponent(parameter.getValue().ToString()));
 }
Пример #8
0
 private bool isURLParameter(DSRESTParameter parameter)
 {
     return((parameter.getDBXType() != DBXDataTypes.JsonValueType) &&
            (parameter.getDBXType() != DBXDataTypes.BinaryBlobType) && (parameter
                                                                        .getDBXType() != DBXDataTypes.TableType));
 }