Skip to content

Commit

Permalink
move toString to base market event protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Oct 10, 2023
1 parent 6af567b commit be83ada
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DXFeedFramework/Events/Market/Candles/Candle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ extension Candle {
}

/// Returns string representation of this candle event.
func toString() -> String {
public func toString() -> String {
return "Candle{\(baseFieldsToString())}"
}

Expand Down
1 change: 1 addition & 0 deletions DXFeedFramework/Events/Market/MarketEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Foundation
/// property that is defined by this class.
public protocol MarketEvent: IEventType {
var type: EventCode { get }
func toString() -> String
}

public struct MarketEventConst {
Expand Down
2 changes: 1 addition & 1 deletion DXFeedFramework/Events/Market/Profile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ extension Profile {
}

/// Returns string representation of this profile event.
func toString() -> String {
public func toString() -> String {
return "Profile{\(baseFieldsToString())}"
}

Expand Down
2 changes: 1 addition & 1 deletion Samples/PerfTestCL/IpfConnectCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extension IpfConnectCommand: Hashable {
extension IpfConnectCommand: DXEventListener {
func receiveEvents(_ events: [DXFeedFramework.MarketEvent]) {
events.forEach { mEvent in
print("\(mEvent.eventSymbol): \(mEvent.quote.toString())")
print("\(mEvent.eventSymbol): \(mEvent.toString())")
}
}
}

0 comments on commit be83ada

Please sign in to comment.