public static OperationMessage WithPropertyName(OperationMessage op, string propertyName, string value) { return new OperationMessage { DeveloperMessage = op.DeveloperMessage.Replace("{propertyName}", propertyName).Replace("{value}", value), UserMessage = op.UserMessage.Replace("{propertyName}", propertyName).Replace("{value}", value), ErrorCode = op.ErrorCode }; }
public static OperationMessage WithDeveloperMessage(OperationMessage op, string developerMessage) { return new OperationMessage { DeveloperMessage = op.DeveloperMessage.Replace("{value}", developerMessage), UserMessage = op.UserMessage, ErrorCode = op.ErrorCode }; }