/// <summary> /// Инстанцировать класс /// </summary> /// <returns></returns> public static IProtocol CreateProtocol() { if (protocol == null) { protocol = new VersionX100(); } return protocol as IProtocol; }
/// <summary> /// Инстанцировать класс /// </summary> /// <returns></returns> public static IProtocol CreateProtocol() { if (protocol == null) { protocol = new VersionX100(); } return(protocol as IProtocol); }
/// <summary> /// Получить протокол /// </summary> /// <param name="version">версия протокола</param> /// <returns></returns> public static IProtocol GetProtocol(ProtocolVersion version) { switch (version) { case ProtocolVersion.x100: return(VersionX100.CreateProtocol()); default: return(null); } }