Пример #1
0
 internal override void SetXML(XmlElement xml, BaseClassIfc host, HashSet <int> processed)
 {
     base.SetXML(xml, host, processed);
     setAttribute(xml, "Description", Description);
     if (mReferencedDocument > 0)
     {
         xml.AppendChild(ReferencedDocument.GetXML(xml.OwnerDocument, "ReferencedDocument", this, processed));
     }
 }
Пример #2
0
 protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed)
 {
     base.setJSON(obj, host, processed);
     setAttribute(obj, "Description", Description);
     if (mReferencedDocument > 0)
     {
         obj["ReferencedDocument"] = ReferencedDocument.getJson(this, processed);
     }
 }
Пример #3
0
 protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options)
 {
     base.setJSON(obj, host, options);
     setAttribute(obj, "Description", Description);
     if (mReferencedDocument > 0)
     {
         obj["ReferencedDocument"] = ReferencedDocument.getJson(this, options);
     }
 }
        internal List <ReferencedDocument> createSdkReferencedDocumentsForTest()
        {
            List <ReferencedDocument> documents = new List <ReferencedDocument>();

            ReferencedDocument referencedDocument = new ReferencedDocument();

            referencedDocument.DocumentId = DOCUMENT_ID;
            referencedDocument.Fields     = createSdkReferencedFieldsForTest();

            documents.Add(referencedDocument);
            return(documents);
        }
Пример #5
0
        public override void ConvertAPIToSDK()
        {
            List <Silanis.ESL.API.ReferencedField> apiFields = createApiReferencedFieldsForTest();

            Silanis.ESL.API.ReferencedDocument api = new Silanis.ESL.API.ReferencedDocument();
            api.DocumentId = DOCUMENT_ID;
            api.Fields     = apiFields;

            ReferencedDocument sdk = ReferencedDocumentConverter.ToSDK(api);

            Assert.AreEqual(sdk.DocumentId, DOCUMENT_ID);
            Assert.IsTrue(compareReferencedFields(apiFields, sdk.Fields));
        }
Пример #6
0
        public override void ConvertSDKToAPI()
        {
            List <ReferencedField> sdkFields = createSdkReferencedFieldsForTest();

            ReferencedDocument sdk = new ReferencedDocument();

            sdk.DocumentId = DOCUMENT_ID;
            sdk.Fields     = sdkFields;

            Silanis.ESL.API.ReferencedDocument api = ReferencedDocumentConverter.ToAPI(sdk);

            Assert.AreEqual(api.DocumentId, DOCUMENT_ID);
            Assert.IsTrue(compareReferencedFields(api.Fields, sdkFields));
        }
 internal Boolean compareReferencedDocuments(Silanis.ESL.API.ReferencedDocument apiRefDoc, ReferencedDocument sdkRefDoc)
 {
     return(apiRefDoc.DocumentId.Equals(sdkRefDoc.DocumentId) &&
            compareReferencedFields(apiRefDoc.Fields, sdkRefDoc.Fields));
 }
Пример #8
0
        public override void ConvertNullAPIToSDK()
        {
            ReferencedDocument sdk = ReferencedDocumentConverter.ToSDK(null);

            Assert.IsNull(sdk);
        }