Exemplo n.º 1
0
        public static List <SASIdentifier> DecodeSASIdentifiers(string sasIdentifiersValue)
        {
            ASCIIEncoding aSCIIEncoding = new ASCIIEncoding();

            if (sasIdentifiersValue == null)
            {
                throw new ArgumentNullException("sasIdentifiersValue");
            }
            SASUtilities.ValidateACIIEncoding(sasIdentifiersValue);
            sasIdentifiersValue = aSCIIEncoding.GetString(Convert.FromBase64String(sasIdentifiersValue));
            List <SASIdentifier> sASIdentifiers = new List <SASIdentifier>();

            using (StringReader stringReader = new StringReader(sasIdentifiersValue))
            {
                string str = null;
                while (true)
                {
                    string str1 = stringReader.ReadLine();
                    str = str1;
                    if (str1 == null)
                    {
                        break;
                    }
                    str = str.Trim();
                    if (str.Length != 0)
                    {
                        string        str2          = aSCIIEncoding.GetString(Convert.FromBase64String(str));
                        SASIdentifier sASIdentifier = new SASIdentifier();
                        sASIdentifier.Decode(str2);
                        sASIdentifiers.Add(sASIdentifier);
                    }
                }
            }
            return(sASIdentifiers);
        }