diff --git a/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift b/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift index 62ecb19db..ffddcad28 100644 --- a/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift +++ b/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift @@ -7,7 +7,7 @@ import Foundation -class MarketEventSymbols { +public class MarketEventSymbols { enum Separtors: String { case exchSeparator = "&" case open = "{" @@ -16,7 +16,7 @@ class MarketEventSymbols { case value = "=" } - static func changeExchangeCode(_ symbol: String?, _ exchangeCode: Character) -> String? { + public static func changeExchangeCode(_ symbol: String?, _ exchangeCode: Character) -> String? { guard let symbol = symbol else { return exchangeCode == "\0" ? nil : "\(Separtors.exchSeparator.rawValue)\(exchangeCode)" } @@ -31,7 +31,7 @@ class MarketEventSymbols { result + symbol[index] } - static func getBaseSymbol(_ symbol: String?) -> String? { + public static func getBaseSymbol(_ symbol: String?) -> String? { guard let symbol = symbol else { return nil } @@ -46,7 +46,7 @@ class MarketEventSymbols { return hasExchangeCodeInternal(symbol, length) ? symbol[0..<(length - 2)] : symbol[0.. String? { + public static func getAttributeStringByKey(_ symbol: String?, _ key: String?) throws -> String? { guard let key = key else { throw ArgumentException.argumentNil } @@ -115,7 +115,7 @@ class MarketEventSymbols { return symbol[startPos.. String? { guard let symbol = symbol else { return nil @@ -166,7 +166,7 @@ class MarketEventSymbols { return result } - static func changeAttributeStringByKey(_ symbol: String?, + public static func changeAttributeStringByKey(_ symbol: String?, _ key: String?, _ value: String?) throws -> String? { guard let key = key else { @@ -253,7 +253,7 @@ class MarketEventSymbols { symbol[index-1.. Character { + public static func getExchangeCode(_ symbol: String?) -> Character { let emptyChar: Character = "\0" if hasExchangeCode(symbol), let symbol = symbol { let str = symbol[getLengthWithoutAttributesInternal(symbol) - 1] diff --git a/DXFeedFramework/Ipf/InstrumentProfile.swift b/DXFeedFramework/Ipf/InstrumentProfile.swift index a3dfd2d81..45422d062 100644 --- a/DXFeedFramework/Ipf/InstrumentProfile.swift +++ b/DXFeedFramework/Ipf/InstrumentProfile.swift @@ -33,40 +33,40 @@ public class InstrumentProfile { ipfType = IPFType.valueOf(str: type) } } - var symbol = "" - var descriptionStr = "" - var localSymbol = "" - var localDescription = "" - var country = "" - var opol = "" - var exchangeData = "" - var exchanges = "" - var currency = "" - var baseCurrency = "" - var cfi = "" - var isin = "" - var sedol = "" - var cusip = "" - var icb: Int32 = 0 - var sic: Int32 = 0 - var multiplier: Double = 0 - var product = "" - var underlying = "" - var spc: Double = 0 - var additionalUnderlyings = "" - var mmy = "" - var expiration: Int32 = 0 - var lastTrade: Int32 = 0 - var strike: Double = 0 - var optionType = "" - var expirationStyle = "" - var settlementStyle = "" - var priceIncrements = "" - var tradingHours = "" + public var symbol = "" + public var descriptionStr = "" + public var localSymbol = "" + public var localDescription = "" + public var country = "" + public var opol = "" + public var exchangeData = "" + public var exchanges = "" + public var currency = "" + public var baseCurrency = "" + public var cfi = "" + public var isin = "" + public var sedol = "" + public var cusip = "" + public var icb: Int32 = 0 + public var sic: Int32 = 0 + public var multiplier: Double = 0 + public var product = "" + public var underlying = "" + public var spc: Double = 0 + public var additionalUnderlyings = "" + public var mmy = "" + public var expiration: Int32 = 0 + public var lastTrade: Int32 = 0 + public var strike: Double = 0 + public var optionType = "" + public var expirationStyle = "" + public var settlementStyle = "" + public var priceIncrements = "" + public var tradingHours = "" var customFields = [String: String]() - var ipfType: IPFType? + public var ipfType: IPFType? init() { // to activaate didSet methods