public void DeleteItemByName(string itemName)
        {
            ICsiNamedObject sourceElement = new CsiNamedObject(this.GetOwnerDocument(), "__listItem", this);

            sourceElement.SetAttribute("__listItemAction", "delete");
            CsiXmlHelper.FindCreateSetValue2(sourceElement, "__key", "__name", itemName, true);
        }
        public ICsiNamedObject ChangeItemByIndex(int index)
        {
            ICsiNamedObject sourceElement = new CsiNamedObject(this.GetOwnerDocument(), "__listItem", this);

            sourceElement.SetAttribute("__listItemAction", "change");
            CsiXmlHelper.FindCreateSetValue(sourceElement, "__index", XmlConvert.ToString(index));
            return(sourceElement);
        }
        public ICsiNamedObject AppendItem(string itemName)
        {
            ICsiNamedObject obj2 = new CsiNamedObject(this.GetOwnerDocument(), "__listItem", this);

            obj2.SetAttribute("__listItemAction", "add");
            obj2.SetRef(itemName);
            return(obj2);
        }
Esempio n. 4
0
        private void CreateConnect(string userName, string password, ICsiXmlElement parent)
        {
            ICsiDocument    document = parent.GetOwnerDocument();
            ICsiXmlElement  element  = new CsiXmlElement(document, "__connect", parent);
            ICsiNamedObject obj2     = new CsiNamedObject(document, "user", element);

            obj2.SetRef(userName);
            ICsiDataField field = new CsiDataField(document, "password", element);

            field.SetEncryptedValue(password);
        }
Esempio n. 5
0
        private void CreateConnectWithoutPassword(string userName, string sessionId, ICsiXmlElement parent)
        {
            ICsiDocument    document = parent.GetOwnerDocument();
            ICsiXmlElement  element  = new CsiXmlElement(document, "__useSession", parent);
            ICsiNamedObject obj2     = new CsiNamedObject(document, "user", element);

            obj2.SetRef(userName);
            ICsiDataField field = new CsiDataField(document, "sessionId", element);

            field.SetAttribute("__encrypted", "no");
            field.SetValue(sessionId);
        }