当前位置: 首页>>代码示例>>C#>>正文


C# IXPathNavigable.CreateNavigator方法代码示例

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


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

示例1: 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

示例2: 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

示例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: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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