private void PackStandards(string type, List <JToken> standards, ref Extensions extensions) { type = type.ToLower(); try { Uri extURI = new Uri((string)_standardsObject["extension"][type]["id"]); extensions.Add(extURI, JToken.FromObject(standards)); } catch (NullReferenceException) { throw new VocabMissingException("extension type", type); } }
public Extensions Build() { var extensions = new Extensions(); foreach (string key in _standardsMap.Keys) { PackStandards(key, _standardsMap[key], ref extensions); } return(extensions); }