public static void ParseStreamStatus(SamReply reply) { if (reply == null) { throw new ArgumentNullException("reply"); } if (!reply.Check("STREAM", "STATUS")) { throw new SamReplyMismatchException(reply); } if (reply.ResultString != SamBridgeErrorMessage.OK) { throw new SamBridgeErrorException(reply); } }
public static string ParseSessionStatus(SamReply reply) { if (reply == null) { throw new ArgumentNullException("reply"); } if (!reply.Check("SESSION", "STATUS")) { throw new SamReplyMismatchException(reply); } if (reply.ResultString != SamBridgeErrorMessage.OK) { throw new SamBridgeErrorException(reply); } string destination = reply.UniqueValue("DESTINATION").Value; return(destination); }
public static string ParseHelloReply(SamReply reply) { if (reply == null) { throw new ArgumentNullException("reply"); } if (!reply.Check("HELLO", "REPLY")) { throw new SamReplyMismatchException(reply); } if (reply.ResultString != SamBridgeErrorMessage.OK) { throw new SamBridgeErrorException(reply); } string version = reply.UniqueValue("VERSION").Value; return(version); }
public static SamDestination ParseDestReply(SamReply reply) { if (reply == null) { throw new ArgumentNullException("reply"); } if (!reply.Check("DEST", "REPLY")) { throw new SamReplyMismatchException(reply); } if (reply.ResultString != SamBridgeErrorMessage.OK) { throw new SamBridgeErrorException(reply); } string pubBase64 = reply.UniqueValue("PUB").Value; string privBase64 = reply.UniqueValue("PRIV").Value; return(new SamDestination(pubBase64, privBase64)); }
public static SamLookupResult ParseNamingReply(SamReply reply) { if (reply == null) { throw new ArgumentNullException("reply"); } if (!reply.Check("NAMING", "REPLY")) { throw new SamReplyMismatchException(reply); } if (reply.ResultString != SamBridgeErrorMessage.OK) { throw new SamBridgeErrorException(reply); } string nameInReply = reply.UniqueValue("NAME").Value; string valueBase64 = reply.UniqueValue("VALUE").Value; return(new SamLookupResult(nameInReply, valueBase64)); }
public static SamReply ParseReply(string input, string major, string minor) { if (input == null) { throw new ArgumentNullException("input"); } if (major == null) { throw new ArgumentNullException("major"); } if (minor == null) { throw new ArgumentNullException("minor"); } SamReply reply = Parse(input); if (!reply.Check(major, minor)) { throw new SamReplyMismatchException(reply); } return(reply); }
public static void ParseStreamStatus(SamReply reply) { if (reply == null) throw new ArgumentNullException("reply"); if (!reply.Check("STREAM", "STATUS")) throw new SamReplyMismatchException(reply); if (reply.ResultString != SamBridgeErrorMessage.OK) throw new SamBridgeErrorException(reply); }
public static string ParseSessionStatus(SamReply reply) { if (reply == null) throw new ArgumentNullException("reply"); if (!reply.Check("SESSION", "STATUS")) throw new SamReplyMismatchException(reply); if (reply.ResultString != SamBridgeErrorMessage.OK) throw new SamBridgeErrorException(reply); string destination = reply.UniqueValue("DESTINATION").Value; return destination; }
public static SamLookupResult ParseNamingReply(SamReply reply) { if (reply == null) throw new ArgumentNullException("reply"); if (!reply.Check("NAMING", "REPLY")) throw new SamReplyMismatchException(reply); if (reply.ResultString != SamBridgeErrorMessage.OK) throw new SamBridgeErrorException(reply); string nameInReply = reply.UniqueValue("NAME").Value; string valueBase64 = reply.UniqueValue("VALUE").Value; return new SamLookupResult(nameInReply, valueBase64); }
public static string ParseHelloReply(SamReply reply) { if (reply == null) throw new ArgumentNullException("reply"); if (!reply.Check("HELLO", "REPLY")) throw new SamReplyMismatchException(reply); if (reply.ResultString != SamBridgeErrorMessage.OK) throw new SamBridgeErrorException(reply); string version = reply.UniqueValue("VERSION").Value; return version; }
public static SamDestination ParseDestReply(SamReply reply) { if (reply == null) throw new ArgumentNullException("reply"); if (!reply.Check("DEST", "REPLY")) throw new SamReplyMismatchException(reply); if (reply.ResultString != SamBridgeErrorMessage.OK) throw new SamBridgeErrorException(reply); string pubBase64 = reply.UniqueValue("PUB").Value; string privBase64 = reply.UniqueValue("PRIV").Value; return new SamDestination(pubBase64, privBase64); }