public List <VerificationFailure> Verify(InterceptionProcessingData processingData) { var returnVal = new List <VerificationFailure>(); if (processingData.BoundaryType != BoundaryType.Exit) { return(returnVal); } if (_helper.IsUnserializable(processingData.ReturnType)) { returnVal.Add(new TypeSerializationFailure(processingData.ReturnType)); } else { var res = _serializer.Serialize(processingData.ReturnValue); if (!res.Success) { _helper.AddUnserializableType(processingData.ReturnType); returnVal.Add(new TypeSerializationFailure(processingData.ReturnType)); } } return(returnVal); }
public List <VerificationFailure> Verify(InterceptionProcessingData processingData) { var returnVal = new List <VerificationFailure>(); var instanceType = processingData.TargetInstance.GetType(); if (processingData.BoundaryType != BoundaryType.Entry) { return(returnVal); } if (_helper.IsUnserializable(instanceType)) { returnVal.Add(new TypeSerializationFailure(instanceType)); } else { var serResult = _serializer.Serialize(processingData.TargetInstance); if (!serResult.Success) { _helper.AddUnserializableType(instanceType); returnVal.Add(new TypeSerializationFailure(instanceType)); } } return(returnVal); }
private List <VerificationFailure> ProcessArg(object arg) { var res = new List <VerificationFailure>(); var argType = arg.GetType(); if (_dalHelper.IsUnserializable(argType)) { res.Add(new TypeSerializationFailure(argType)); } else { ; var serResult = _serializer.Serialize(arg); if (!serResult.Success) { _dalHelper.AddUnserializableType(argType); res.Add(new TypeSerializationFailure(argType)); } } return(res); }