-
Notifications
You must be signed in to change notification settings - Fork 10
Add error based response #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,30 @@ | |||
| **/.classpath | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
سلام؛
آقا ما از پروژه های این مخزن داکر ایمیج میسازیم ؟ فکر کنم به ازای هر Dockerfile باید یدونه از اینا داشته باشیم.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
برای پروژه های تستی نیاز هست که DockerImage داشته باشیم ؟
| /// Represents a single response of a command/query service with additional informations about invalid items. | ||
| /// </summary> | ||
| /// <typeparam name="ValidationResultType"></typeparam> | ||
| public interface IResponse<ValidationResultType> : IResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
بهتر نیست اسم این واسط بشود
IValidatedResponse
| public IList<ValidationResult> InvalidItems { get; set; } | ||
| [Obsolete("Due to incompatability with Grpc this response type is only used for backward compatibility.")] | ||
| [DataContract] | ||
| public class ErrorResponseBase : ResponseBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
این کلاس لازم است ؟
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
البته منم موافقم اینطور بشود.
یه کدهایی در PR خانوم سلطانزاده دیدم بنظرم مفید است.
در سرویس ها لازم نیست همه Return Typeها از جنس Response<> باشد. البته با حفظ سلسله مراتب ارث بری
در تولید ExampleResponse خیلی بچه ها را کمک میکند
| /// <summary> | ||
| /// The reason caused the validation issue. | ||
| /// </summary> | ||
| [DataMember(Order = 2)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Order = 1
نباید باشد ؟
| [DataContract] | ||
| public class Response<T> where T : class | ||
| // TODO: [ProtoImplement(typeof(Response))] | ||
| public class Response<T> : Response where T : class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
پیاده سازی این یه باگی دارد فکر کنم باید به ازای تمام T ها اون بساط ProtoImplement را اضافه کنیم
| { | ||
| internal class GrpcTestContext<TStartup> : IDisposable where TStartup : class | ||
| { | ||
| private readonly Stopwatch _stopwatch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
اینها به انتهای فایل منتقل بشوند 🌹
| { | ||
| internal class ForwardingLoggerProvider : ILoggerProvider | ||
| { | ||
| private readonly LogMessage _logAction; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
اینها به انتهای فایل منتقل بشوند 🌹
| { | ||
| public class IntegrationTestBase<TStartup> : IDisposable where TStartup : class | ||
| { | ||
| private GrpcChannel? _channel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
اینها هم همینطور
| @@ -0,0 +1 @@ | |||
| global using NUnit.Framework; No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
فکر کنم قرار بود از اینها استفاده نکنیم
| @@ -0,0 +1,35 @@ | |||
| using BSN.Commons.GrpcIntegrationTest.Sample.AppService.Contract; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
یک کسری از این ها استفاده نشده است
ITNOA
This PR resolve #67