Esempio n. 1
0
        /// <summary>
        /// Constructor for string input argument for an action
        /// </summary>
        /// <remarks>Intended to be write only (its value is written on construction and not be later read)</remarks>
        /// <param name="aParameter">Defines the name plus any bounds to the value for the argument.
        /// Must have been previously added to the action using Action.AddInputParameter</param>
        /// <param name="aValue">Value for the argument</param>
        public ArgumentString(ParameterString aParameter, String aValue)
        {
            IntPtr value = InteropUtils.StringToHGlobalUtf8(aValue);

            iHandle = ActionArgumentCreateStringInput(aParameter.Handle(), value);
            Marshal.FreeHGlobal(value);
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor for string output argument for an action
 /// </summary>
 /// <remarks>Intended to be created without any value.  The value is later set after
 /// CpService.InvokeAction is called but before the invocation's callback is run)</remarks>
 /// <param name="aParameter">Defines the name plus any bounds to the value for the argument.
 /// Must have been previously added to the action using Action.AddOutputParameter</param>
 public ArgumentString(ParameterString aParameter)
 {
     iHandle = ActionArgumentCreateStringOutput(aParameter.Handle());
 }