public bool CanGenerateTransaction(BaseStockQuotation quotation)
 {
     return(_stockShares == quotation._stockShares &&
            _stockIdentifier == quotation._stockIdentifier &&
            _price == quotation._price &&
            _type != quotation._type);
 }
 public static void LogQuotationProposal(BaseStockQuotation quotation)
 {
     PrintDetailInYellow($"\n[{DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss")}] Quotation published", string.Empty);
     PrintDetailInYellow("Owner", quotation._ownerName);
     PrintDetailInYellow("Stock Identifier", quotation._stockIdentifier);
     PrintDetailInYellow("Bid/Ask", quotation._type);
     PrintDetailInYellow("Shares", quotation._stockShares);
     PrintDetailInYellow("Price", quotation._price);
 }
        public static void NotifyTransaction(BaseStockQuotation myQuotation, BaseStockQuotation arrivedQuotation)
        {
            var(seller, buyer) = myQuotation._type == QuotationType.Ask
                ? (myQuotation._ownerName, arrivedQuotation._ownerName)
                : (arrivedQuotation._ownerName, myQuotation._ownerName);

            PrintDetailInGreen($"\n[{DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss")}] Transaction executed", string.Empty);
            PrintDetailInGreen("Buyer", buyer);
            PrintDetailInGreen("Seller", seller);
            PrintDetailInGreen("Stock Identifier", myQuotation._stockIdentifier);
            PrintDetailInGreen("Shares", myQuotation._stockShares);
            PrintDetailInGreen("Price", myQuotation._price);
        }