static public string ToBinaryRepresentationString(this byte[] item, BinaryRepresentationType type) { switch (type) { case BinaryRepresentationType.Base64: return(item.ToBase64String()); case BinaryRepresentationType.Hex: return(item.ToHexString()); } throw new UnaccountedBranchException("type", type); }
static public string ToBinaryRepresentationString(this ByteSequence item, BinaryRepresentationType type) { return(item.GetBytes().ToBinaryRepresentationString(type)); }