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


C# NodeType类代码示例

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


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

示例1: NetworkNode

 /// <summary>
 /// Constructs with the provided node ID, type and activation function ID.
 /// </summary>
 public NetworkNode(uint id, NodeType nodeType, int activationFnId)
 {
     _id = id;
     _nodeType = nodeType;
     _activationFnId = activationFnId;
     _auxState = null;
 }
开发者ID:MrChocolateMoose,项目名称:DeepHyperNEAT,代码行数:10,代码来源:NetworkNode.cs

示例2: should_get_node

 public void should_get_node(NodeType type)
 {
     var parent = new Node { NodeType = type };
     var child = new Node("hai");
     parent.Add(child, x => { });
     parent.GetNode("hai").ShouldEqual(child);
 }
开发者ID:carl-berg,项目名称:Bender,代码行数:7,代码来源:NodeBaseTests.cs

示例3: Update

	public void Update(NodeType nextType)
	{
		if (nextType == nodeType)
		{
			return;
		}

		switch(nextType)
		{
			case NodeType.Sequence:
				mInternalNode = new BirdNest.Nodes.Sequence();
				break;
			case NodeType.Selector:
				mInternalNode = new BirdNest.Nodes.Selector();
				break;
			case NodeType.Parallel:
				mInternalNode = new BirdNest.Nodes.Parallel();
				break;
			case NodeType.UsePlan:
				mInternalNode = new BirdNest.Nodes.UsePlanNode(this);
				break;
			default:
				mInternalNode = null;
				return;
		}
		nodeType = nextType;
	}
开发者ID:tgsstdio,项目名称:BirdNest.Nodes,代码行数:27,代码来源:PlanNode.cs

示例4: QuadNode

        public QuadNode(NodeType nodeType, int nodeSize, int nodeDepth, QuadNode parent, QuadTree parentTree, int positionIndex)
        {
            NodeType = nodeType;
            _nodeSize = nodeSize;
            _nodeDepth = nodeDepth;
            _positionIndex = positionIndex;

            _parent = parent;
            _parentTree = parentTree;

            //Add the 9 vertices
            AddVertices();

            Bounds = new BoundingBox(_parentTree.Vertices[VertexTopLeft.Index].Position,
                        _parentTree.Vertices[VertexBottomRight.Index].Position);

            if (nodeSize >= 4)
                AddChildren();

            //Make call to UpdateNeighbors from the parent node.
            //This will update all neighbors recursively for the
            //children as well.  This ensures all nodes are created
            //prior to updating neighbors.
            if (_nodeDepth == 1)
            {
                AddNeighbors();

                VertexTopLeft.Activated = true;
                VertexTopRight.Activated = true;
                VertexCenter.Activated = true;
                VertexBottomLeft.Activated = true;
                VertexBottomRight.Activated = true;

            }
        }
开发者ID:MenosGrandes,项目名称:mrowisko-pbl,代码行数:35,代码来源:QuadNode.cs

示例5: Node

 /// <summary>
 /// Constructs a new node.
 /// </summary>
 internal Node(String name, NodeType type = NodeType.Element, NodeFlags flags = NodeFlags.None)
 {
     _name = name ?? String.Empty;
     _type = type;
     _children = new NodeList();
     _flags = flags;
 }
开发者ID:jogibear9988,项目名称:AngleSharp,代码行数:10,代码来源:Node.cs

示例6: NodeGreetingMessageVerifier

        public NodeGreetingMessageVerifier(NodeType localNodeType, NodeType expectedRemoteNodeType, params NodeType[] allowOtherRemoteNoteTypes)
        {
            _expectedRemoteNodeTypes = new HashSet<NodeType> { expectedRemoteNodeType };
            if (allowOtherRemoteNoteTypes != null) _expectedRemoteNodeTypes.UnionWith(allowOtherRemoteNoteTypes);

            _greetingMessage = new NodeGreetingMessage(localNodeType);
        }
开发者ID:tleviathan,项目名称:redfoxmq,代码行数:7,代码来源:NodeGreetingMessageVerifier.cs

示例7: XmlNodeInformation

 public XmlNodeInformation(string contentValue, int depth, CommonNamespaces commonNamespaces)
 {
     m_contentValue = contentValue;
     iDepth = depth;
     nodeType = NodeType.content;
     m_commonNamespaces = commonNamespaces;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:XmlNodeInformation.cs

示例8: Find

		public override INode Find(INodeResolver resolver, string uri, NodeType nodeType, FileSystemOptions options)
		{
			var address = LayeredNodeAddress.Parse(uri);

			if (address.Port >= 0 || address.UserName != "" || address.Password != "" || address.ServerName != "")
			{
				throw new MalformedUriException(uri, "Network & Authentication information not permitted");
			}

			if (nodeType.Is(typeof(IFile)))
			{
				var uri2 = address.InnerUri;

				if (StringUriUtils.ContainsQuery(uri2))
				{
					uri2 += "&shadow=true";
				}
				else
				{
					uri2 += "?shadow=true";
				}

				return resolver.Resolve(uri2, nodeType);
			}

			return resolver.Resolve(address.InnerUri);
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:27,代码来源:ShadowNodeProvider.cs

示例9: CreateNode

		protected override INode CreateNode(INodeAddress address, NodeType nodeType)
		{
			if (!address.IsRoot)
			{
				var parent = (IDirectory)this.Resolve(address.Parent, NodeType.Directory);

				if (parent is ImaginaryDirectory)
				{
					var retval = ((ImaginaryDirectory)parent).GetImaginaryChild(address.Name, nodeType);

					if (retval != null)
					{
						return retval;
					}
				}
			}

			if (nodeType == NodeType.Directory)
			{								
				return new ImaginaryDirectory(this, address);
			}
			else if (nodeType == NodeType.File)
			{
				return new ImaginaryFile(this, address);
			}

			throw new NotSupportedException(String.Format("{0}:{1}", address, nodeType));
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:28,代码来源:ImaginaryFileSystem.cs

示例10: GetNameToValueCollectionFromElementForType

        /// <summary>
        /// Gets the type of the name to value collection from element for.
        /// </summary>
        /// <param name="mainDocumentPart">The main document part.</param>
        /// <param name="elementName">Name of the element.</param>
        /// <param name="forNodeType">Type of for node.</param>
        /// <returns></returns>
        public Dictionary<string, string> GetNameToValueCollectionFromElementForType(MainDocumentPart mainDocumentPart, string elementName, NodeType forNodeType)
        {
            Dictionary<string, string> nameToValueCollection = new Dictionary<string, string>();
            CustomXmlPart customXmlPart = this.customXmlPartCore.GetCustomXmlPart(mainDocumentPart);

            if (customXmlPart != null)
            {
                XElement element = this.customXmlPartCore.GetFirstElementFromCustomXmlPart(customXmlPart, elementName);

                if (element != null)
                {
                    if (forNodeType == NodeType.Element)
                    {
                        foreach (XElement elem in element.Elements())
                        {
                            nameToValueCollection.Add(elem.Name.LocalName, elem.Nodes().Where(node => node.NodeType == XmlNodeType.Element).FirstOrDefault().ToString());
                        }
                    }
                    else if (forNodeType == NodeType.Attribute)
                    {
                        foreach (XAttribute attr in element.Attributes())
                        {
                            nameToValueCollection.Add(attr.Name.LocalName, attr.Value);
                        }
                    }
                }
            }

            return nameToValueCollection;
        }
开发者ID:chutinhha,项目名称:tvmcorptvs,代码行数:37,代码来源:CustomXmlPartHelper.cs

示例11: AddGeoTreeNode

 public void AddGeoTreeNode(NodeType mapNodeType, List<GeoNodePara> clutterNodeParas)
 {
     if (clutterNodeParas.Count != 0)
     {
         List<GeoTreeNode> treeNode = new List<GeoTreeNode>();
         foreach (GeoNodePara para in clutterNodeParas)
         {
             GeoTreeNode item = this.GetGeoFolderNodeByName(this.m_DynamicNodeCollection, mapNodeType, para.FolderName);
             if (item == null)
             {
                 item = new GeoTreeNode(para.FolderName, LayerIDCreator.GetExclusiveID(), mapNodeType, CheckedState.Checked);
                 this.m_DynamicNodeCollection.Add(item);
                 treeNode.Add(item);
             }
             GeoTreeNode node2 = new GeoTreeNode(para.LayerName, para.LayerId, mapNodeType, CheckedState.Checked);
             foreach (KeyValuePair<int, string> pair in para.ClutterIdNameDict)
             {
                 int tag = (para.LayerId << 0x10) + ((short) pair.Key);
                 GeoTreeNode node3 = new GeoTreeNode(pair.Value, tag, mapNodeType, CheckedState.Checked);
                 node2.ChildrenNodes.Add(node3);
             }
             item.ChildrenNodes.Add(node2);
         }
         if (this.OnAddModelNodeEvent != null)
         {
             this.OnAddModelNodeEvent(treeNode);
         }
     }
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:29,代码来源:GeoTreeModel.cs

示例12: NodeValue

 //Constructor
 public NodeValue(string name, Object value, NodeType type)
     : base(name, Node.EmptyNodes)
 {
     _type = type;
     _value = value;
     _desc = "Value";
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:NodeValue.cs

示例13: BaseNode

        public BaseNode(string nodename)
        {
            NodeType = NodeType.Base;
            this.Text = nodename;
            this.ImageIndex = DataConvert.GetInt32(IconType.VsTemplates);
            this.SelectedImageIndex = DataConvert.GetInt32(IconType.VsTemplates);
		}
开发者ID:jojozhuang,项目名称:Projects,代码行数:7,代码来源:Nodes.cs

示例14: addClassInfoGraphNode

 IClassInfoGraphNode addClassInfoGraphNode(ObjectSpace objectSpace, IMemberInfo memberInfo, NodeType nodeType) {
     var classInfoGraphNode =(IClassInfoGraphNode)objectSpace.CreateObject(TypesInfo.Instance.ClassInfoGraphNodeType);
     classInfoGraphNode.Name = memberInfo.Name;
     classInfoGraphNode.TypeName = getSerializedType(memberInfo).Name;
     classInfoGraphNode.NodeType=nodeType;            
     return classInfoGraphNode;
 }
开发者ID:corzar,项目名称:eXpand,代码行数:7,代码来源:ClassInfoGraphNodeBuilder.cs

示例15: DoGetChildren

		public override IEnumerable<INode> DoGetChildren(NodeType nodeType, Predicate<INode> acceptNode)
		{
			foreach (string key in Environment.GetEnvironmentVariables().Keys)
			{
				yield return GetImaginaryChild(key, NodeType.File);
			}
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:7,代码来源:EnvironmentVariablesDirectory.cs


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