• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IXPathNavigable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IXPathNavigable的典型用法代码示例。如果您正苦于以下问题:C# IXPathNavigable类的具体用法?C# IXPathNavigable怎么用?C# IXPathNavigable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IXPathNavigable类属于命名空间,在下文中一共展示了IXPathNavigable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Property

        public Property(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // Key
            XPathNavigator navigatorKey = navigator.SelectSingleNode("Key");
            if (navigatorKey != null) {
                this._key = navigatorKey.Value;
            }

            // Type & Value
            XPathNavigator navigatorValue = navigator.SelectSingleNode("Value");
            if (navigatorValue == null) {
                // Set VALUE to null if the node does not exist
                this._value = null;
            }
            else {
                // Type
                this._type = navigatorValue.GetAttribute(Xml._TYPE, Xml.XMLSCHEMAINSTANCE);

                // Value
                if (this._type == "esri:XMLPersistedObject") {
                    XPathNavigator navigatorBytes = navigatorValue.SelectSingleNode("Bytes");
                    if (navigatorBytes != null) {
                        this._value = navigatorBytes.Value;
                    }
                }
                else {
                    this._value = navigatorValue.Value;
                }
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:32,代码来源:Property.cs


示例2: GeometricNetworkControllerMembership

        public GeometricNetworkControllerMembership(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <GeometricNetworkName>Empty_Net</GeometricNetworkName> 
            XPathNavigator navigatorGeometricNetworkName = navigator.SelectSingleNode("GeometricNetworkName");
            if (navigatorGeometricNetworkName != null) {
                this._geometricNetworkName = navigatorGeometricNetworkName.Value;
            }

            // <EnabledFieldName>Enabled</EnabledFieldName> 
            XPathNavigator navigatorEnabledFieldName = navigator.SelectSingleNode("EnabledFieldName");
            if (navigatorEnabledFieldName != null) {
                this._enabledFieldName = navigatorEnabledFieldName.Value;
            }

            // <AncillaryRoleFieldName /> 
            XPathNavigator navigatorAncillaryRoleFieldName = navigator.SelectSingleNode("AncillaryRoleFieldName");
            if (navigatorAncillaryRoleFieldName != null) {
                this._ancillaryRoleFieldName = navigatorAncillaryRoleFieldName.Value;
            }

            // <NetworkClassAncillaryRole>esriNCARNone</NetworkClassAncillaryRole> 
            XPathNavigator navigatorNetworkClassAncillaryRole = navigator.SelectSingleNode("NetworkClassAncillaryRole");
            if (navigatorNetworkClassAncillaryRole != null) {
                this._networkClassAncillaryRole = (esriNetworkClassAncillaryRole)Enum.Parse(typeof(esriNetworkClassAncillaryRole), navigatorNetworkClassAncillaryRole.Value, true);
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:28,代码来源:GeometricNetworkControllerMembership.cs


示例3: SubtypeField

        public SubtypeField(IXPathNavigable path) : base(path) {
            XPathNavigator navigator = path.CreateNavigator();

            // <FieldName></FieldName>
            XPathNavigator navigatorFieldName = navigator.SelectSingleNode("FieldName");
            if (navigatorFieldName != null) {
                this._fieldName = navigatorFieldName.Value;
            }

            // <DomainName></DomainName>
            XPathNavigator navigatorDomainName = navigator.SelectSingleNode("DomainName");
            if (navigatorDomainName != null) {
                this._domainName = navigatorDomainName.Value;
            }

            // <DefaultValue></DefaultValue>
            XPathNavigator navigatorDefaultValue = navigator.SelectSingleNode("DefaultValue");
            if (navigatorDefaultValue != null) {
                this._defaultValue = navigatorDefaultValue.Value;
            }

            // Initialize
            this.UpdateText();

            // Set Element Properties
            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:27,代码来源:SubtypeField.cs


示例4: NetWeight

        public NetWeight(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <WeightID>0</WeightID> 
            XPathNavigator navigatorWeightID = navigator.SelectSingleNode("WeightID");
            if (navigatorWeightID != null) {
                this._weightID = navigatorWeightID.ValueAsInt;
            }

            // <WeightName>MMElectricTraceWeight</WeightName> 
            XPathNavigator navigatorWeightName = navigator.SelectSingleNode("WeightName");
            if (navigatorWeightName != null) {
                this._weightName = navigatorWeightName.Value;
            }

            // <WeightType>esriWTInteger</WeightType> 
            XPathNavigator navigatorWeightType = navigator.SelectSingleNode("WeightType");
            if (navigatorWeightType != null) {
                this._weightType = (esriWeightType)Enum.Parse(typeof(esriWeightType), navigatorWeightType.Value, true);
            }

            // <BitGateSize>0</BitGateSize> 
            XPathNavigator navigatorBitGateSize = navigator.SelectSingleNode("BitGateSize");
            if (navigatorBitGateSize != null) {
                this._bitGateSize = navigatorBitGateSize.ValueAsInt;
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:28,代码来源:NetWeight.cs


示例5: EdgeFeatureSource

        //
        // CONSTRUCTOR
        //
        //public EdgeFeatureSource() : base() { }
        public EdgeFeatureSource(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <FromElevationFieldName>
            XPathNavigator navigatorFromElevationFieldName = navigator.SelectSingleNode("FromElevationFieldName");
            if (navigatorFromElevationFieldName != null) {
                this._fromElevationFieldName = navigatorFromElevationFieldName.Value;
            }

            // <ToElevationFieldName>
            XPathNavigator navigatorToElevationFieldName = navigator.SelectSingleNode("ToElevationFieldName");
            if (navigatorToElevationFieldName != null) {
                this._toElevationFieldName = navigatorToElevationFieldName.Value;
            }

            // <Connectivity><PropertyArray><PropertySetProperty>
            this._connectivity = new List<Property>();
            XPathNodeIterator interatorProperty = navigator.Select("Connectivity/PropertyArray/PropertySetProperty");
            while (interatorProperty.MoveNext()) {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._connectivity.Add(property);
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:32,代码来源:EdgeFeatureSource.cs


示例6: SaveAsync

        /// <summary>
        /// The preferred way to save - this should be a <see cref="System.Xml.XmlDocument" /> straight from CCP.
        /// </summary>
        /// <param name="filename">The filename.</param>
        /// <param name="xdoc">The xml to save.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException"></exception>
        public static async Task SaveAsync(string filename, IXPathNavigable xdoc)
        {
            xdoc.ThrowIfNull(nameof(xdoc));

            EveMonClient.EnsureCacheDirInit();

            XmlDocument xmlDoc = (XmlDocument)xdoc;
            XmlNode characterNode = xmlDoc.SelectSingleNode("//name");
            filename = characterNode?.InnerText ?? filename;

            // Writes in the target file
            string fileName = Path.Combine(EveMonClient.EVEMonXmlCacheDir, $"{filename}.xml");
            string content = Util.GetXmlStringRepresentation(xdoc);
            await FileHelper.OverwriteOrWarnTheUserAsync(fileName,
                async fs =>
                {
                    using (StreamWriter writer = new StreamWriter(fs, Encoding.UTF8))
                    {
                        await writer.WriteAsync(content);
                        await writer.FlushAsync();
                        await fs.FlushAsync();
                    }
                    return true;
                });
        }
开发者ID:,项目名称:,代码行数:32,代码来源:


示例7: AreXmlEquivalent

		public static void AreXmlEquivalent(string expected, IXPathNavigable actual)
		{
			if (expected == null) throw new ArgumentNullException("expected");
			if (actual == null) throw new ArgumentNullException("actual");

			AreXmlEquivalent(GetElement(expected), GetElement(actual));
		}
开发者ID:jeremymeng,项目名称:Core,代码行数:7,代码来源:CustomAssert.cs


示例8: RasterDef

        public RasterDef(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Description></Description>
            XPathNavigator navigatorDescription = navigator.SelectSingleNode("Description");
            if (navigatorDescription != null) {
                this._description = navigatorDescription.Value;
            }

            // <IsByRef></IsByRef>
            XPathNavigator navigatorIsByRef = navigator.SelectSingleNode("IsByRef");
            if (navigatorIsByRef != null) {
                this._isByRef = navigatorIsByRef.ValueAsBoolean;
            }

            // <SpatialReference></SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:25,代码来源:RasterDef.cs


示例9: NetworkAttributeParameter

        public NetworkAttributeParameter(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Name>
            XPathNavigator navigatorName = navigator.SelectSingleNode("Name");
            if (navigatorName != null) {
                this._name = navigatorName.Value;
            }

            // <VarType>
            XPathNavigator navigatorVarType = navigator.SelectSingleNode("VarType");
            if (navigatorVarType != null) {
                this._varType = navigatorVarType.ValueAsInt;
            }

            // <Value>
            XPathNavigator navigatorValue = navigator.SelectSingleNode("Value");
            if (navigatorValue != null) {
                this._value = navigatorValue.Value;
            }

            // <DefaultValue>
            XPathNavigator navigatorDefaultValue = navigator.SelectSingleNode("DefaultValue");
            if (navigatorDefaultValue != null) {
                this._defaultValue = navigatorDefaultValue.Value;
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:28,代码来源:NetworkAttributeParameter.cs


示例10: NetworkSourceDirections

        //
        // CONSTRUCTOR
        //
        //public NetworkSourceDirections() : base() { }
        public NetworkSourceDirections(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <AdminAreaFieldName>
            XPathNavigator navigatorAdminAreaFieldName = navigator.SelectSingleNode("AdminAreaFieldName");
            if (navigatorAdminAreaFieldName != null) {
                this._adminAreaFieldName = navigatorAdminAreaFieldName.Value;
            }

            // <Shields>
            XPathNavigator navigatorShields = navigator.SelectSingleNode("Shields");
            if (navigatorShields != null) {
                this._shields = new Shields(navigatorShields);
            }
            else {
                this._shields = new Shields();
            }

            // <StreetNameFields><StreetNameFields>
            this._streetNameFields = new List<StreetNameFields>();
            XPathNodeIterator interatorStreetNameFields = navigator.Select("StreetNameFields/StreetNameFields");
            while (interatorStreetNameFields.MoveNext()) {
                // Get <StreetNameFields>
                XPathNavigator navigatorStreetNameFields = interatorStreetNameFields.Current;

                // Add StreetNameFields
                StreetNameFields streetNameFields = new StreetNameFields(navigatorStreetNameFields);
                this._streetNameFields.Add(streetNameFields);
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:35,代码来源:NetworkSourceDirections.cs


示例11: Index

        public Index(IXPathNavigable path): base(path) {
            // Suspend Events
            this.SuspendEvents = true;

            // Get Naviagator
            XPathNavigator navigator = path.CreateNavigator();

            // <Name></Name>
            XPathNavigator navigatorIndexName = navigator.SelectSingleNode("Name");
            if (navigatorIndexName != null) {
                this._name = navigatorIndexName.Value;
            }

            // <IsUnique></IsUnique>
            XPathNavigator navigatorIsUnique = navigator.SelectSingleNode("IsUnique");
            if (navigatorIsUnique != null) {
                this._isUnique = navigatorIsUnique.ValueAsBoolean;
            }

            // <IsAscending></IsAscending>
            XPathNavigator navigatorIsAscending = navigator.SelectSingleNode("IsAscending");
            if (navigatorIsAscending != null) {
                this._isAscending = navigatorIsAscending.ValueAsBoolean;
            }

            // Initialize Text
            this.UpdateText();

            // Collapse group
            this.Expanded = false;

            // Resume Events
            this.SuspendEvents = false;
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:34,代码来源:Index.cs


示例12: Validate

        public Domain.ErrorCode Validate(IXPathNavigable configSectionNode)
        {
            log.Debug("Validating the configuration");

            lock (syncLock)
            {
                try
                {
                    isValid = true;

                    //TODO: is there a better way to do this?
                    var navigator = configSectionNode.CreateNavigator();
                    var doc = new XmlDocument();
                    doc.LoadXml(navigator.OuterXml);
                    doc.Schemas.Add(Schema);
                    doc.Validate(ValidationCallback);

                    if (isValid)
                    {
                        log.Debug("The configuration is valid");
                    }
                    else
                    {
                        log.Error("The configuration is invalid");
                    }
                }
                catch (XmlException ex)
                {
                    log.Error("An error occurred when validating the configuration", ex);
                    isValid = false;
                }

                return isValid ? Domain.ErrorCode.Ok : Domain.ErrorCode.InvalidConfig;
            }
        }
开发者ID:binarymash,项目名称:DatabaseScripter,代码行数:35,代码来源:ConfigurationValidator.cs


示例13: TerrainPyramid

        public TerrainPyramid(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            //<PyramidLevelStatus>1</PyramidLevelStatus> 
            XPathNavigator navigatorPyramidLevelStatus = navigator.SelectSingleNode("PyramidLevelStatus");
            if (navigatorPyramidLevelStatus != null) {
                this._pyramidLevelStatus = (TerrainElementStatus)Enum.Parse(typeof(TerrainElementStatus), navigatorPyramidLevelStatus.Value, true);
            }

            //<PointCount>-1</PointCount> 
            XPathNavigator navigatorPointCount = navigator.SelectSingleNode("PointCount");
            if (navigatorPointCount != null) {
                this._pointCount = navigatorPointCount.ValueAsInt;
            }

            //<MaxScale>1000</MaxScale> 
            XPathNavigator navigatorMaxScale = navigator.SelectSingleNode("MaxScale");
            if (navigatorMaxScale != null) {
                this._maxScale = navigatorMaxScale.ValueAsInt;
            }

            //<Resolution>2</Resolution> 
            XPathNavigator navigatorSourceStatus = navigator.SelectSingleNode("Resolution");
            if (navigatorSourceStatus != null) {
                this._resolution = navigatorSourceStatus.ValueAsDouble;
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:28,代码来源:TerrainPyramid.cs


示例14: Subtype

        //
        // CONSTRUCTOR
        //
        public Subtype(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <SubtypeName>
            XPathNavigator navigatorSubtypeName = navigator.SelectSingleNode("SubtypeName");
            if (navigatorSubtypeName != null) {
                this._subtypeName = navigatorSubtypeName.Value;
            }

            // <SubtypeCode>
            XPathNavigator navigatorSubtypeCode = navigator.SelectSingleNode("SubtypeCode");
            if (navigatorSubtypeCode != null) {
                this._subtypeCode = navigatorSubtypeCode.ValueAsInt;
            }

            // <FieldInfos><SubtypeFieldInfo>
            XPathNodeIterator interatorSubtypeFieldInfo = navigator.Select("FieldInfos/SubtypeFieldInfo");
            while (interatorSubtypeFieldInfo.MoveNext()) {
                // Create Field
                XPathNavigator navigatorSubtypeFieldInfo = interatorSubtypeFieldInfo.Current;
                SubtypeField subtypeField = new SubtypeField(navigatorSubtypeFieldInfo);

                // Add Field To Group
                this.Rows.Add(subtypeField);
            }

            // Refresh
            this.Refresh();
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:33,代码来源:Subtype.cs


示例15: PolicyResponseSummary

        public PolicyResponseSummary(string xmlPath)
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(xmlPath);

            m_xmlWrapper = xmlDoc as IXPathNavigable;
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:PolicyResponseSummary.cs


示例16: Feed

 public Feed(IXPathNavigable navigable)
 {
     navigator = navigable.CreateNavigator();
     manager = new XmlNamespaceManager(navigator.NameTable);
     manager.AddNamespace("f", "http://hl7.org/fhir");
     manager.AddNamespace("atom", "http://www.w3.org/2005/Atom");
 }
开发者ID:wdebeau1,项目名称:fhir-net-api,代码行数:7,代码来源:FhirFeed.cs


示例17: TopologyControllerMembership

        public TopologyControllerMembership(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <TopologyName>Landbase_Topology</TopologyName> 
            XPathNavigator navigatorTopologyName = navigator.SelectSingleNode("TopologyName");
            if (navigatorTopologyName != null) {
                this._topologyName = navigatorTopologyName.Value;
            }

            //    <Weight>5</Weight> 
            XPathNavigator navigatorWeight = navigator.SelectSingleNode("Weight");
            if (navigatorWeight != null) {
                this._weight = navigatorWeight.ValueAsInt;
            }

            //    <XYRank>1</XYRank> 
            XPathNavigator navigatorXYRank = navigator.SelectSingleNode("XYRank");
            if (navigatorXYRank != null) {
                this._xyRank = navigatorXYRank.ValueAsInt;
            }

            //    <ZRank>1</ZRank> 
            XPathNavigator navigatorZRank = navigator.SelectSingleNode("ZRank");
            if (navigatorZRank != null) {
                this._zRank = navigatorZRank.ValueAsInt;
            }

            //    <EventNotificationOnValidate>false</EventNotificationOnValidate> 
            XPathNavigator navigatorEventNotificationOnValidate = navigator.SelectSingleNode("EventNotificationOnValidate");
            if (navigatorEventNotificationOnValidate != null) {
                this._eventNotificationOnValidate = navigatorEventNotificationOnValidate.ValueAsBoolean;
            }
        }
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:34,代码来源:TopologyControllerMembership.cs


示例18: setupTabs

        private void setupTabs(IXPathNavigable data) {

            GraphSetupTabPage graphSetupTabPage = null;
            TabPage tabPage = null;
            for (int i = 0; i < tabCount; i++) {

                // graphSetupTabPage            
                graphSetupTabPage = new GraphSetupTabPage(i, data);
                graphSetupTabPage.Location = new System.Drawing.Point(-4, 0);
                graphSetupTabPage.Name = "graphSetupTabPage" + i;
                graphSetupTabPage.Size = new System.Drawing.Size(332, 200);
                graphSetupTabPage.ActivateEvent += 
                    new GraphSetupTabPage.EventHandler(this.graphSetupTabPage_ActivateEvent);
                if (i > 0) //enable only the first tab
                    graphSetupTabPage.Enabled = false;

                // tabPage1
                tabPage = new TabPage("Graph " + (i + 1));
                tabPage.Controls.Add(graphSetupTabPage);
                tabPage.Location = new System.Drawing.Point(4, 22);
                tabPage.Name = "tabPage" + i;
                tabPage.Padding = new System.Windows.Forms.Padding(3);
                tabPage.Size = new System.Drawing.Size(324, 193);
                tabPage.TabIndex = i;
                tabPage.UseVisualStyleBackColor = true;

                this.graphPanel.Controls.Add(tabPage);
            }
        }
开发者ID:wshanshan,项目名称:DDD,代码行数:29,代码来源:AssessmentGraphSetupForm.cs


示例19: ReadXml

        public IResourceActions ReadXml(IXPathNavigable idoc)
        {
            // Basic check on the input
            if (idoc == null)
            {
				Logger.LogError("XmlResourceReader.ReadXml: null XmlDoc input");
                throw new ApplicationException(Properties.Resources.COULD_NOT_READ_RESOURCES);
            }

            XPathNavigator doc = idoc.CreateNavigator();
            XPathNavigator rootNode = doc.SelectSingleNode(@"PolicySetResources");
            if (rootNode == null)
            {
                XmlNode node = new XmlDocument().CreateElement("PolicySetResources");                
                rootNode = node.CreateNavigator();
                doc.AppendChild(rootNode);
            }

            // Check if the document contains an actions node
            XPathNavigator actionsNode = rootNode.SelectSingleNode(@"Actions");
            if (actionsNode == null)
            {
                // No actions already defined in the resources so nothing to read
                // Return an empty collection of resource actions
                return new ResourceActions();
            }

            return ReadActions(actionsNode);
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:29,代码来源:XmlResourceReader.cs


示例20: To

		public static XmlEquivalent To(IXPathNavigable source)
		{
			if (source == null)
				throw new ArgumentNullException("source");

			return XmlEquivalent.To(GetElement(source));
		}
开发者ID:AllEmpty,项目名称:Core,代码行数:7,代码来源:XmlEquivalent.cs



注:本文中的IXPathNavigable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IXamlTypeConverterContext类代码示例发布时间:2022-05-24
下一篇:
C# IXLWorksheet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap