Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for binary 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 ArgumentBinary(ParameterBinary aParameter)
 {
     iHandle = ActionArgumentCreateBinaryOutput(aParameter.Handle());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for binary 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 for the argument.
 /// Must have been previously added to the action using Action.AddInputParameter</param>
 /// <param name="aData">Value for the argument</param>
 public unsafe ArgumentBinary(ParameterBinary aParameter, byte[] aData)
 {
     fixed (byte* pData = aData)
     {
         iHandle = ActionArgumentCreateBinaryInput(aParameter.Handle(), new IntPtr(pData), aData.Length);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor suitable for use by clients of the device stack
 /// </summary>
 /// <param name="aParameter">Parameter defining the name for the property.</param>
 /// <param name="aOwnsNativeProperty">Whether the managed property owns the underlying native property.</param>
 public PropertyBinary(ParameterBinary aParameter, bool aOwnsNativeProperty = false)
     : base(aOwnsNativeProperty)
 {
     iHandle = ServicePropertyCreateBinaryDv(aParameter.Handle());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor suitable for use by clients of the device stack
 /// </summary>
 /// <param name="aParameter">Parameter defining the name for the property.</param>
 /// <param name="aOwnsNativeProperty">Whether the managed property owns the underlying native property.</param>
 public PropertyBinary(ParameterBinary aParameter, bool aOwnsNativeProperty = false)
     : base(aOwnsNativeProperty)
 {
     iHandle = ServicePropertyCreateBinaryDv(aParameter.Handle());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor for binary 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 for the argument.
 /// Must have been previously added to the action using Action.AddInputParameter</param>
 /// <param name="aData">Value for the argument</param>
 public ArgumentBinary(ParameterBinary aParameter, byte[] aData)
 {
     GCHandle h = GCHandle.Alloc(aData, GCHandleType.Pinned);
     iHandle = ActionArgumentCreateBinaryInput(aParameter.Handle(), h.AddrOfPinnedObject(), aData.Length);
     h.Free();
 }