Example #1
0
        private void InitializeFromString(string content)
        {
            _jsonModel = JsonConvert.DeserializeObject <JsonServiceAccountModel>(content);

            if (_jsonModel == null)
            {
                throw new FileLoadException("Incorrect json file was provided");
            }
            FillRsaParams();
        }
Example #2
0
        private void InitializeFromFile(string fileName)
        {
            _jsonModel = JsonConvert.DeserializeObject <JsonServiceAccountModel>(File.ReadAllText(fileName));

            if (_jsonModel == null)
            {
                throw new FileLoadException("Incorrect json file was provided");
            }
            FillRsaParams();
        }