Example #1
0
        public CodeRef(Code code)
        {
            Contract.AssertNotNull(code, "code");

            CodeId      = code.Id;
            CodeListRef = new CodeListRef(code.CodeList, null);
        }
Example #2
0
        public void AddCodeList(CodeListRef codelistRef)
        {
            Contract.AssertNotNull(codelistRef, "codelistRef");
            Contract.AssertNotNull(codelistRef.Id, "codelistRef.Id");
            Contract.AssertNotNull(codelistRef.AgencyId, "codelistRef.AgencyId");
            Contract.AssertNotNull(codelistRef.Alias, "codelistRef.Alias");

            if (codeListRefs.Exists(c => c == codelistRef))
            {
                throw new SDMXException("CodeListRef '{0}' already exists.", codelistRef);
            }

            codeListRefs.Add(codelistRef);
        }