Beispiel #1
0
 private static void EncodeAndAddReturnValue(PSObject psObject, object returnValue)
 {
     if (returnValue != null)
     {
         RemoteHostEncoder.EncodeAndAddAsProperty(psObject, "mr", returnValue);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Encode and add return value.
        /// </summary>
        private static void EncodeAndAddReturnValue(PSObject psObject, object returnValue)
        {
            // Do nothing if the return value is null.
            if (returnValue == null)
            {
                return;
            }

            // Otherwise add the property.
            RemoteHostEncoder.EncodeAndAddAsProperty(psObject, RemoteDataNameStrings.MethodReturnValue, returnValue);
        }
Beispiel #3
0
 /// <summary>
 /// Encode and add exception.
 /// </summary>
 private static void EncodeAndAddException(PSObject psObject, Exception exception)
 {
     RemoteHostEncoder.EncodeAndAddAsProperty(psObject, RemoteDataNameStrings.MethodException, exception);
 }
Beispiel #4
0
 private static void EncodeAndAddException(PSObject psObject, Exception exception)
 {
     RemoteHostEncoder.EncodeAndAddAsProperty(psObject, "me", exception);
 }