コード例 #1
0
ファイル: WitsmlBhaRun.cs プロジェクト: li201605pgi/witsmllib
        /**
         * Factory method for this type.
         *
         * @param server   Server the new instance lives within. Non-null.
         * @param parent   Parent instance. May be null.
         * @param element  XML element to create instance from. Non-null.
         * @return         New WITSML bha run instance. Never null.
         */
        static WitsmlObject newInstance(WitsmlServer server, WitsmlObject parent, XElement element)
        {
            //Debug.Assert(server != null : "server cannot be null";
            //Debug.Assert(element != null : "element cannot be null";

            String id       = element.Attribute("uidTubularAssy").Value;
            String parentId = element.Attribute("uidWellbore").Value;
            String name     = element.Element(element.Name.Namespace + "nameTubularAssy").Value.Trim(); //, element.getNamespace());

            WitsmlBhaRun bhaRun = new WitsmlBhaRun(server, id, name, parent, parentId);

            bhaRun.update(element);

            return(bhaRun);
        }
コード例 #2
0
ファイル: WitsmlBhaRun.cs プロジェクト: jstuyck/witsmllib
        /**
         * Factory method for this type.
         *
         * @param server   Server the new instance lives within. Non-null.
         * @param parent   Parent instance. May be null.
         * @param element  XML element to create instance from. Non-null.
         * @return         New WITSML bha run instance. Never null.
         */
        static WitsmlObject newInstance(WitsmlServer server, WitsmlObject parent, XElement element)
        {
            //Debug.Assert(server != null : "server cannot be null";
            //Debug.Assert(element != null : "element cannot be null";

            String id = element.Attribute("uidTubularAssy").Value ;
            String parentId = element.Attribute("uidWellbore").Value;
            String name = element.Element(element.Name.Namespace + "nameTubularAssy").Value.Trim(); //, element.getNamespace());

            WitsmlBhaRun bhaRun = new WitsmlBhaRun(server, id, name, parent, parentId);
            bhaRun.update(element);

            return bhaRun;
        }