public static void InitService(UCSSprotocols protocol, string serviceName, string host, EventHandlerServiceInited initedCallback = null, EventHandlerServiceError errorCallback = null) { if (string.IsNullOrEmpty(serviceName)) { throw new System.ArgumentNullException("serviceName"); } if (string.IsNullOrEmpty(host)) { throw new System.ArgumentNullException("host"); } if (UCSS.Instance._initedProtocols.Count > 0 && UCSS.Instance._initedProtocols.ContainsKey(serviceName)) { throw new System.InvalidOperationException("serviceName [" + serviceName + "] already exists in CSS"); } BaseProtocol selectedProtocol = null; switch (protocol) { case UCSSprotocols.amf: break; default: throw new System.InvalidOperationException("protocol [" + protocol + "] is NOT found in InitService"); } if (selectedProtocol != null) { UCSS.Instance._initedProtocols.Add(serviceName, selectedProtocol); } //Debug.Log("CSS.Instance._initedProtocols = " + UCSS.Instance._initedProtocols.Count); } // InitService
} // RemoveTransaction public static void RemoveTransaction(string serviceName, string id) { BaseProtocol protocol = UCSS.GetInitedProtocol(serviceName); protocol.RemoveTransaction(id); } // RemoveTransaction