Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol ConnectionServerProtocol {
- func connectWithUsernameAndPassword(username: String, password: String)
- }
- var username: String?
- var password: String?
- let connectionServerProtocol: ConnectionServerProtocol
- public init(connectionServerProtocol: ConnectionServerProtocol) {
- self.connectionServerProtocol = connectionServerProtocol
- }
- public func connectWithUsernameAndPassword(username: String, password: String) {
- self.username = username
- self.password = MD5(password)
- self.connectionServerProtocol.dataTask()
- }
- let cs = ConnectionServer()
- let cs = ConnectionServer(connectionServerProtocol:ConnectionServerProtocol)
- let cs = ConnectionServer(connectionServerProtocol: ConnectionServerProtocol.self as! ConnectionServerProtocol)
- let cs = ConnectionServer.self
- cs.connectWithUsernameAndPassword(username: SomeUserName", password:"SomePassword")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement