コード例 #1
0
 public CsiQueryParameters(ICsiDocument doc, string queryName, ICsiXmlElement element) : this(doc, element)
 {
     base.SetAttribute("__queryName", queryName);
 }
コード例 #2
0
 public CsiObjectList(ICsiDocument doc, XmlElement domElement) : base(doc, domElement)
 {
 }
コード例 #3
0
 public CsiSubentity(ICsiDocument doc, string name, ICsiXmlElement parent)
     : base(doc, name, parent)
 {
 }
コード例 #4
0
 public CsiRevisionedObject(ICsiDocument doc, string name, ICsiXmlElement parent)
     : base(doc, name, parent)
 {
 }
コード例 #5
0
 public CsiRequestSelectionValuesEx(ICsiDocument doc, ICsiXmlElement parent)
     : base(doc, "__requestSelectionValuesEx", parent)
 {
 }
コード例 #6
0
 public CsiDataField(ICsiDocument doc, string name, ICsiXmlElement parent, string val) : this(doc, name, parent)
 {
     this.SetValue(val);
 }
コード例 #7
0
 /// <summary>
 /// 打印文档
 /// </summary>
 /// <param name="document">文档</param>
 /// <param name="isInput">是否输入文档</param>
 public static void Print(this ICsiDocument document, bool isInput = false)
 {
     PrintDocument(document.AsXml(), isInput);
 }
コード例 #8
0
 public CsiResponseData(ICsiDocument doc, XmlElement domElement)
     : base(doc, domElement)
 {
 }
コード例 #9
0
 public CsiResponseData(ICsiDocument doc, ICsiXmlElement oParent)
     : base(doc, "__responseData", oParent)
 {
 }
コード例 #10
0
 public CsiExceptionData(ICsiDocument doc, string name, ICsiXmlElement parent) : base(doc, name, parent)
 {
 }
コード例 #11
0
 public CsiExceptionData(ICsiDocument doc, XmlElement domElement) : base(doc, domElement)
 {
 }
コード例 #12
0
 public CsiQuery(ICsiDocument doc, ICsiXmlElement parent) : base(doc, "__query", parent)
 {
 }
コード例 #13
0
 public CsiQuery(ICsiDocument doc, XmlElement element) : base(doc, element)
 {
 }
コード例 #14
0
 public CsiQueryParameters(ICsiDocument doc, ICsiXmlElement parent) : base(doc, "__queryParameters", parent)
 {
 }
コード例 #15
0
        public static ICsiXmlElement CreateCsiElement(ICsiDocument document, XmlElement element)
        {
            string         typeName = null;
            string         name     = null;
            string         str5;
            ICsiXmlElement element3;

            try
            {
                name = element.Name;
                string attribute = element.GetAttribute("__nodeType");
                if (StringUtil.IsEmptyString(attribute))
                {
                    attribute = element.GetAttribute("__type");
                }
                if (StringUtil.IsEmptyString(attribute))
                {
                    XmlElement parentNode = (XmlElement)element.ParentNode;
                    if (parentNode != null)
                    {
                        string data = parentNode.GetAttribute("__nodeType");
                        if (!StringUtil.IsEmptyString(data))
                        {
                            if (name.Equals("__listItem"))
                            {
                                if (data.EndsWith("List"))
                                {
                                    attribute = data.Substring(0, data.Length - "List".Length);
                                }
                            }
                            else if (name.Equals("__defaultValue") && "__label".Equals(parentNode.Name))
                            {
                                attribute = data;
                            }
                        }
                    }
                }
                if (!StringUtil.IsEmptyString(attribute))
                {
                    typeName = CsiConstants.NodeToClassMapping[attribute] as string;
                }
                if (typeName == null)
                {
                    typeName = CsiConstants.NodeToClassMapping[name] as string;
                }
                if (typeName == null)
                {
                    typeName = "Camstar.XMLClient.API.CsiXmlElement";
                }
                Type type  = Type.GetType(typeName);
                Type type2 = typeof(ICsiDocument);
                Type type3 = typeof(XmlElement);
                element3 = (ICsiXmlElement)type.GetConstructor(new[] { type2, type3 }).Invoke(new object[] { document, element });
            }
            catch (TypeLoadException exception)
            {
                str5 = $"csiXmlHelper.createcsiElementment() - TypeLoadException: Tag = {name}, className = {typeName}";
                throw new CsiClientException(-1L, exception, str5);
            }
            catch (MethodAccessException exception2)
            {
                str5 = $"csiXmlHelper.createcsiElementment() - MethodAccessException: Tag = {name}, className = {typeName}";
                throw new CsiClientException(-1L, exception2, str5);
            }
            catch (SecurityException exception3)
            {
                str5 = $"csiXmlHelper.createcsiElementment() - SecurityException: Tag = {name}, className = {typeName}";
                throw new CsiClientException(-1L, exception3, str5);
            }
            catch (UnauthorizedAccessException exception4)
            {
                str5 = $"csiXmlHelper.createcsiElementment() - UnauthorizedAccessException: Tag = {name}, className = {typeName}";
                throw new CsiClientException(-1L, exception4, str5);
            }
            catch (ArgumentException exception5)
            {
                str5 = $"csiXmlHelper.createcsiElementment() - ArgumentException: Tag = {name}, className = {typeName}";
                throw new CsiClientException(-1L, exception5, str5);
            }
            catch (TargetInvocationException exception6)
            {
                str5 = $"csiXmlHelper.createcsiElementment() - TargetInvocationException: 标签:{name}, 类:{typeName}";
                throw new CsiClientException(-1L, exception6, str5);
            }
            catch (Exception exception7)
            {
                str5 = $"csiXmlHelper.createcsiElementment(): 标签 = {name}, 类 = {typeName}";
                throw new CsiClientException(-1L, exception7, str5);
            }
            return(element3);
        }
コード例 #16
0
 public CsiMetaData(ICsiDocument doc, XmlElement element) : base(doc, element)
 {
 }
コード例 #17
0
 public CsiDataField(ICsiDocument doc, string name, ICsiXmlElement parent) : base(doc, name, parent)
 {
     this.mData = base.GetDomElement().OwnerDocument.CreateCDataSection("");
     base.GetDomElement().AppendChild(this.mData);
 }
コード例 #18
0
 public CsiMetaData(ICsiDocument doc, ICsiXmlElement parent) : base(doc, "__metadata", parent)
 {
 }
コード例 #19
0
 private CsiDataField(ICsiDocument doc, string name, ICsiXmlElement parent, string val, bool ignoreContraint) : base(doc, name, parent)
 {
     this.mData = base.GetDomElement().OwnerDocument.CreateCDataSection(val);
     base.GetDomElement().AppendChild(this.mData);
 }
コード例 #20
0
 public CsiRequestField(ICsiDocument doc, XmlElement requestField) : base(doc, requestField)
 {
 }
コード例 #21
0
 public CsiRevisionedObject(ICsiDocument doc, XmlElement domElement)
     : base(doc, domElement)
 {
 }
コード例 #22
0
 public CsiParameters(ICsiDocument doc, XmlElement element) : base(doc, element)
 {
 }
コード例 #23
0
 public CsiRequestSelectionValuesEx(ICsiDocument doc, XmlElement element)
     : base(doc, element)
 {
 }
コード例 #24
0
 public CsiField(ICsiDocument doc, XmlElement domElement) : base(doc, domElement)
 {
 }
コード例 #25
0
 public CsiObjectList(ICsiDocument doc, string name, ICsiXmlElement parent) : base(doc, name, parent)
 {
 }
コード例 #26
0
 public CsiField(ICsiDocument doc, string name, ICsiXmlElement parent) : base(doc, name, parent)
 {
 }
コード例 #27
0
 public CsiSubentity(ICsiDocument doc, XmlElement domElement)
     : base(doc, domElement)
 {
 }
コード例 #28
0
 public CsiNamedSubentityList(ICsiDocument doc, XmlElement domElement)
     : base(doc, domElement)
 {
 }
コード例 #29
0
 public CsiParentInfo(ICsiDocument doc, string name, ICsiXmlElement parent)
     : base(doc, name, parent)
 {
 }
コード例 #30
0
 public CsiContainerList(ICsiDocument doc, XmlElement domElement) : base(doc, domElement)
 {
 }