private static void EncodeAndAddReturnValue(PSObject psObject, object returnValue) { if (returnValue != null) { RemoteHostEncoder.EncodeAndAddAsProperty(psObject, "mr", returnValue); } }
/// <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); }
/// <summary> /// Encode and add exception. /// </summary> private static void EncodeAndAddException(PSObject psObject, Exception exception) { RemoteHostEncoder.EncodeAndAddAsProperty(psObject, RemoteDataNameStrings.MethodException, exception); }
private static void EncodeAndAddException(PSObject psObject, Exception exception) { RemoteHostEncoder.EncodeAndAddAsProperty(psObject, "me", exception); }